Page 1 of 1

System Admin: Undeliverable mail (postfix + SpamAssassin)

Posted: Thu Nov 04, 2010 2:11 pm
by Saman
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!