How To Whitelist Hosts/IP Addresses In Postfix
How To Whitelist Hosts/IP Addresses In PostfixVersion 1.0 If you are administrating a mail server and use blacklists to block spam (like in this article: How To Block Spam Before It Enters The Server (Postfix)), you probably know this problem: from time to time your customers complain that they cannot receive emails from certain freemailers. Most often this happens because a freemailer was abused to send out spam and therefore got blacklisted. This short guide shows how you can whitelist such a mail server in Postfix to make your customers happy again. I do not issue any guarantee that this will work for you! If a blacklisted server tries to send mail to your server, you should find something like this in your mail log: SMTP error from remote mail server after RCPT TO:<bla@example.com>: host mail.example.com [4.3.2.1]: 554 5.7.1 Service unavailable; Client host [1.2.3.4] blocked using dnsbl.sorbs.net; Currently Sending Spam See: http://www.sorbs.net/lookup.shtml?1.2.3.4 In this example, the mail server 1.2.3.4 is blacklisted and therefore blocked. To whitelist that server, create the file /etc/postfix/rbl_override where you list all IP addresses or host names (one per line!) that you want to whitelist: vi /etc/postfix/rbl_override
After you've created/modified that file, you must run postmap /etc/postfix/rbl_override Next open /etc/postfix/main.cf and search for the smtpd_recipient_restrictions parameter. Add check_client_access hash:/etc/postfix/rbl_override to that parameter, after reject_unauth_destination, but before the first blacklist. So if smtpd_recipient_restrictions looks like this now... vi /etc/postfix/main.cf
... modify it so that it looks as follows:
That's it! Restart Postfix, and you're done: /etc/init.d/postfix restart
Links
|
www.seamlessenterprise.com
One number. One voicemail. Seize the lead. Sprint Mobile Integration.
www.seamlessenterprise.com
One Number. One Voicemail.
Make it easier for clients to reach you. Turn your desk phone and mobile phone into one with Sprint Mobile Integration.
www.seamlessenterprise.com
One number. One voicemail. Sprint Mobile Integration.
www.seamlessenterprise.com
One number. one voicemail. Seize the lead with Sprint. Learn more
AT&T Synaptic Compute as a Service. Boost your power on demand.
Trial: IBM Cognos Express Reporting, Analysis & Planning
Learn benefits of Simpana software.
View the Gartner Video
Sprint 4G - The Ultimate Mobile Broadband
Click here
SAP-Business Objects Crystal Reports Server
Complete reporting without hidden costs. Free Trial







Recent comments
5 hours 56 min ago
8 hours 47 min ago
14 hours 25 min ago
14 hours 28 min ago
15 hours 12 min ago
22 hours 15 min ago
22 hours 53 min ago
23 hours 55 min ago
1 day 3 hours ago
1 day 4 hours ago