0

Debian GNU/Linux 11.4 (bullseye), Linux 5.10.0-17-amd64

Installed OpenSMTPD 6.8.0p2-3 amd64 (including opensmtpd-extras 6.7.1-2 amd64) and tried to test sending a mail, but every smtp call (except smtp -h) results in this error message:

~# smtp -v
smtp: SSL_CTX_load_verify_locations: No such file or directory

Server itself is running:

:~# telnet localhost 25
Trying ::1...
Connected to localhost.
Escape character is '^]'.
220 SERVERNAME.local ESMTP OpenSMTPD
quit
221 2.0.0 Bye
Connection closed by foreign host.

Where is this error message generated? Which file or directory exactly is he looking for? Searching the internet for this error message gives me zero results.

smtpd.conf looks like this:

#       $OpenBSD: smtpd.conf,v 1.10 2018/05/24 11:40:17 gilles Exp $

# This is the smtpd server system-wide configuration file.
# See smtpd.conf(5) for more information.

table aliases file:/etc/aliases

# To accept external mail, replace with: listen on all
#
listen on localhost

action "local" maildir alias <aliases>
action "relay" relay host "smtp://mailrelay.local" mail-from "@mydomain.info"

# Uncomment the following to accept external mail for domain "example.org"
#
# match from any for domain "example.org" action "local"
match for local action "local"
match from local for any action "relay"
Stefan
  • 1
  • 1
  • A `No such file or directory` error is exactly that. You define a filename/directory somewhere that doesn't exist, often caused by a typo in a filename or directory name somewhere. `SSL_CTX_load_verify_locations` comes from an [openssl library](https://www.openssl.org/docs/manmaster/man3/SSL_CTX_load_verify_locations.html) which suggests that the error is somewhere in a directive relating to SSL/TLS CA certificates. That might be in the [`smtpd.conf`](https://man.openbsd.org/smtpd.conf) or maybe your system is misconfigured somewhere else – HBruijn Aug 16 '22 at 10:46
  • Please post the contents of `smtpd.conf`. – Paul Aug 16 '22 at 12:03
  • @Paul: I edited it above. The only file `/etc/aliases` mentioned there does exist and looks valid. – Stefan Sep 05 '22 at 14:32
  • @HBruijn: `smtpd.conf` is posted. I can't find a misconfiguration somewhere else as `wget`ing a SSL encrypted resource elsewhere works properly (so checking SSL certificate of relay should work too), and even if I try `smtp -s smtp+notls://localhost:25` (and/or adding `+notls` in `smtpd.conf`) the error message stays the same. – Stefan Sep 05 '22 at 14:53
  • Unfortunately, portable OpenSMTPD is not very well supported. Note that for the `action` rule, the syntax should be `host smtp://mailrelay.local` (without `""`). The only thing I can guess is `smtpd` is looking for a CA file, or something, that is is not in the expected location. You might check if there is something in a package README. Posting to the OpenSMTPD mailing list is probably a better solution, even though the version you are using is not currently supported, but that seems to be a problem everywhere I've seem OpenSMTPD besides OpenBSD. It would also be helpful to post your goal. – Paul Sep 06 '22 at 13:05
  • @Paul: Thanks! I got notification just some minutes ago. I changed the `action` rule and restarted `opensmtpd.service` but it didn't change anything. My goal is to have local mails delivered through mail relay. I wanted to do it step by step and thus test mail delivery by sending a mail using `smtp` tool. I'm free to use another tool to test - but which? I started from https://gist.github.com/dwilkie/41ae0c7acc48186e6058 (the large goal), a comment says `mailx` is not needed, use `sSMTP` but this is unmaintained and considers to use `msmtp` or `OpenSMTPD` and here am I. – Stefan Sep 07 '22 at 14:48

0 Answers0