System Admin: Undeliverable mail (postfix + SpamAssassin)

Linux OS Topics
Post Reply
User avatar
Saman
Lieutenant Colonel
Lieutenant Colonel
Posts: 828
Joined: Fri Jul 31, 2009 10:32 pm
Location: Mount Lavinia

System Admin: Undeliverable mail (postfix + SpamAssassin)

Post by Saman » Thu Nov 04, 2010 2:11 pm

If you get an error as below with postfix when you try to send an email, here is the solution to fix that.

Your message did not reach some or all of the intended recipients.
Subject: Your Subject
Sent: 05/10/2010 5:49 PM
The following recipient(s) cannot be reached:
'[email protected]' on 05/10/2010 5:49 PM
554 5.7.1 Service unavailable; Client host [xxx.xxx.xxx.xxx] blocked using zen.spamhaus.org; http://www.spamhaus.org/query/bl?ip=xxx.xxx.xxx.xxx


Cause
Misconfiguration in Postfix (/etc/postfix/main.cf) for smtpd_client_restrictions setting.
You can read the current configuration using following command.

Code: Select all

postconf -n
Solution
  1. Open Postfix config file

    Code: Select all

    ex: vi /etc/postfix/main.cf
  2. Find smtpd_client_restrictions which is almost at the end of the file.
  3. Add permit_sasl_authenticated at the beginning of the setting
    ex: smtpd_client_restrictions = permit_sasl_authenticated, reject_rbl_client sbl-xbl.spamhaus.org, reject_rbl_client bl.spamcop.net

    Code: Select all

    if you use vim editor, Press i to start inserting text
  4. Save file

    Code: Select all

    if you use vim editor, Press :w to save and then :q to exit
  5. Restart Postfix

    Code: Select all

    /sbin/service postfix restart
Good luck!
Post Reply

Return to “Linux”