I have a server configured to accept mail for the domain of the server
itself (example.org) and virtual domains (example.com). The virtual
domain has several mappings of users to both local mbox accounts and
remote forwarding. That works correctly.

The problems I'm having are:

1. When I send mail to non-existent users in vusers from the local
machine, no bounce message is ever sent back to the user. I do see the
following log entries, but is there a way to configure bounce messages
sent back to the client in this case?

Feb 15 12:15:09 server smtpd[90604]: 886047b20afc9b3d smtp
disconnected reason=quit
Feb 15 12:15:22 server smtpd[90604]: 886047b5d8ac59a6 smtp connected
address=local host=server.example.org
Feb 15 12:15:22 server smtpd[90604]: 886047b5d8ac59a6 smtp
failed-command command="RCPT TO:<doesnotex...@example.com> "
result="524 5.2.4 Mailing list expansion problem:
<doesnotex...@example.com>"
Feb 15 12:15:22 server smtpd[90604]: 886047b5d8ac59a6 smtp
disconnected reason=disconnect


2. Even when sending from a local account to a local non-existent user
such as fakeu...@server.example.org, I don't get a bounce as I'd
expect.

Feb 15 12:18:05 server smtpd[90604]: 886047b616b4564e smtp connected
address=local host=server.example.org
Feb 15 12:18:05 server smtpd[90604]: 886047b616b4564e smtp
failed-command command="RCPT TO:<bobo...@server.example.org> "
result="550 Invalid recipient: <bobo...@server.example.org>"
Feb 15 12:18:05 lax smtpd[90604]: 886047b616b4564e smtp disconnected
reason=disconnect


3. When sending mail to non-existent users from an external mail
server, I get the same log message generated and a 524 error is sent
back to the sender with "Mailing list expansion problem" as the
message.

Is there a way to generate a standard 550 Invalid recipient message, instead?


Configurations are below; thank you very much in advance for assistance.

# uname -a
OpenBSD server 7.0 GENERIC#5 amd64

# hostname
server.example.org

# cat /etc/mail/vdoms
example.com

# cat /etc/mail/vusers
b...@example.com     b...@big-mail-provider.xyz
j...@example.com    jane

# cat /etc/mail/smtpd.conf
###### smtpd.conf
listen on em0 hostname server.example.org
listen on lo0
table aliases db:/etc/mail/aliases.db
table vusers file:/etc/mail/vusers
table vdoms file:/etc/mail/vdoms
#
action "local" mbox alias <aliases>
action "receive" mbox virtual <vusers>
action "outbound" relay
#
match for local action "local"
match from any for domain example.org action "local"
match from any for domain <vdoms> action "receive"
match from local for any action "outbound"

Reply via email to