Viktor Dukhovni wrote:
On Sat, May 29, 2021 at 11:30:51AM -0500, David Favor wrote:

# cat /etc/postfix/sender_dependant_default_transport
/.*@davidfavor.com/ :
/.*@fixdeliver.com/ :
/.*/ discard:

7) Sending message still allows random sending domains...

The transport table only selects a delivery channel, you've chosen
discard as the delivery channel for messages from unexpected domains.

# echo test | mailx -r some...@foo.com -s "Test Message - $(date)" 
da...@davidfavor.com

May 29 11:29:47 net17-david-favor-smtp postfix/qmgr[48007]: F25241BA2030: 
from=<some...@foo.com>, size=430, nrcpt=1 (queue active)
May 29 11:29:47 net17-david-favor-smtp postfix/discard[48021]: F25241BA2030: 
to=<da...@davidfavor.com>,
                                         ----------------------
   relay=none, delay=0.01, delays=0.01/0/0/0, dsn=2.0.0, status=sent 
(davidfavor.com)
     ----------

The message was discarded (delivered nowhere, as requested).

Mention what to use in place "discard" to block disallowed sending domains,
then log a message with DNS != 2.0.0 as the reason code.

Thanks.

Reply via email to