I'm switching over to OpenSMTPD and struggling a little with
configuration. Relaying works normally, but breaks for me when I
enable SRS. Here's a simplified version of my config:

  table valid file:/usr/local/etc/mail/validusers
  # pki... omitted for brevity
  srs key "P4s$w0rd"
  filter "rspamd" proc-exec 
"/usr/local/libexec/opensmtpd/opensmtpd-filter-rspamd"
  # listen on... other stuff that doesn't matter here
  listen on localhost port 25 tag "submission-local" filter "rspamd"
  listen on socket            tag "submission-local" filter "rspamd"
  action "deliver" lmtp "/var/run/dovecot/lmtp" virtual <valid>
  action "relay" relay srs
  # matches for the omitted listens...
  match tag "submission-local" from any for rcpt-to <valid> action "deliver"
  match tag "submission-local" from any for any action "relay"

Entries in /usr/local/etc/mail/validusers look like:
  [email protected]     alice+e1
  [email protected]     [email protected],charlie+e2
  [email protected]     [email protected]

If I send through submission-local (using "sendmail
[email protected]") to [email protected]: good.
If I send to [email protected]: bad. Dana gets DSN about a
550 user unknown for <[email protected]>.
If I change the relay action to simply: action "relay" relay -- no
srs -- then example3 works and delivers as expected to Dana, no DSN.

AI hallucinated that I needed a "match ... for rcpt-to srs ..." but
that seems to be a syntax error. How is OpenSMTPD meant to accept
SRS bounce returns? And why does srs (ostensibly rewriting the
envelope sender) seem to instead be altering the recipient? Is
there a -T that covers srs?


Reply via email to