Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Our relay servers running postfix are configured to block NDRs by default - unless from listed IP addresses.

This is done by having smptd_sender_restrictions with check_client_access (with the IP database of 'xx.xx.xx.xx OK') and then check_sender_access (with a database including '<> REJECT')

We have a client on a dynamic IP who needs to send NDRs (i.e. From <>) to a specific email address...

Question: where in postfix can I put a 'check_recipient_xxxxx' type check that will allow an 'OK' status and short-circuit the rest of the sender/client-restrictions?

Any ideas?

share|improve this question
"where in postfix can I put a 'check_recipient_xxxxx' type check that will allow an 'OK' status" by which criteria? – ALex_hha Aug 11 '13 at 19:13
By the destination address. The email I need to permit has a sender of '<>' and a recipient of '' - so it gets stomped by the sender_access restrictions before I can 'OK' it using the recipient_access restrictions... I would normally allow it through by specifying source IP - but it's coming from a dynamic address... – CrayFishUK Aug 13 '13 at 8:43

If I understood you correctly it should be something like the following

smtpd_restriction_classes = restriction_class1
restriction_class1 = check_recipient_access hash:/etc/postfix/check_recipient_access, reject

smtpd_recipient_restrictions =  
 check_sender_access hash:/etc/postfix/check_sender_access  

<> restriction_class1

/etc/postfix/check_recipient_access OK
share|improve this answer
Cool - didn't know about the smtpd_restriction_classes bit - and have also found which has more info. Thanks for the info!! :) – CrayFishUK Sep 5 '13 at 9:03

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.