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.

I am having Postfix installed mailserver and I am using that server for legitimate purpose only.

I need to block some outgoing emails for a particular blacklisted domain. Is there anyway to do through the configurations ?

Your help is greatly appreciated.

Thanks in advance Karthick

share|improve this question

1 Answer 1

up vote 2 down vote accepted

A closer look at the basic access controls available should help you out; just specify the appropriate access map in smtpd_recipient_restrictions that denies access to those domains:

smtpd_recipient_restrictions = check_recipient_access hash:/etc/postfix/blacklisted_domains, permit_mynetworks, reject_unauth_destination, permit

and in /etc/postfix/blacklisted_domains:

bad.domain1    REJECT
bad.domain2    REJECT
baduser@bad.domain3    REJECT

Don't forget to postmap that file.

share|improve this answer
    
Thank you very much !... Its working fine now.... –  karthick Jan 10 '13 at 11:04

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.