Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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 'stats@vista.sophos.com' - 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

1 Answer 1

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  
 permit_mynetworks  
 permit_sasl_authenticated

/etc/postfix/check_sender_access
<> restriction_class1

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

Your Answer

 
discard

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.