Hello,

we use smtpd_sender_restrictions on our outgoing smtp gateway to filter
mails from users who are not allowed to send mails to external
recipients. We use the following config:

smtpd_sender_restrictions=check_sender_access
hash:/etc/postfix-outbound/sender_restrictions, check_sender_access
regexp:/etc/postfix-outbound/sender_nice_reject.db

The sender_restrictions file contains a list of valid mail addresses
exported from our active directory in the following form:
daniel.fiederl...@warema.de
OK

The sender_nice:_reject.db contians only the following line to generate
a custom error message:
/./     554 Sie duerfen keine eMails nach Extern senden, bitte wenden
Sie sich an die IT Hotline. / You are not allowed to send mail to
external addresses, please contact the it hotline.

Our problem is that we offend rfc complaince because those filtering
rules prevent internal generated non delivery reports to be sent out to
the sender of the failed message. How can I weaken the filter to achive
NDRs being sent out?

I tried regular expressions in sender_nice_reject.db like these without
success:
/^\<\>$/  ok
or
/^$/  ok

Any help or pointers are appreciated.

bye
Daniel

Reply via email to