Postfix

06th August
2009
written by Chris

There is a method to bypass RBL checking for certain addresses and domains in Postfix. This assumes that you are using RBL checking in the first place.

First, create an rbl_override file in /etc/postfix.

vi /etc/postfix/rbl_override

Place the domains and/or IP addresses you would like whitelisted into that file.

192.168.0.1
192.168.0.2
domain.com
subdomain.example.com

Create the hash of that file.

postmap /etc/postfix/rbl_override

Edit the main.cf file.

vi /etc/postfix/main.cf

Locate the section marked smpt_recipient_restrictions. You need to add the following to that.

check_client_access hash:/etc/postfix/rbl_override

Restart Postfix and you should be all set.

/etc/init.d/postfix restart
25th April
2009
written by Chris

Change to the Postfix configuration directory. Usually this is in /etc/postfix.

cd /etc/postfix

Open the sender_access file or create it if it doesn't exist.

vi sender_access

Add the email address you want rejected on a new line in the file followed by REJECT.

email@address.com REJECT

Save the file.

Create the server_access database with the postmap command

postmap hash:sender_access

Edit the main.cf file and add the following

smtpd_recipient_restrictions = check_sender_access hash:/etc/postfix/sender_access

Restart Postfix

service postfix restart

Check your logs to make sure everything is good.

19th April
2009
written by Chris

Postfix has some spam fighting abilities built in. However, you will need to enable them for them to work. Just throw the code below into your main.cf file and restart Postfix. Voila.

smtpd_recipient_restrictions =
permit_mynetworks,
permit_sasl_authenticated,
reject_unauth_pipelining,
reject_non_fqdn_recipient,
reject_non_fqdn_sender,
reject_unknown_recipient_domain,
reject_unauth_destination,
reject_invalid_hostname,
reject_rbl_client sbl.spamhaus.org,
reject_rbl_client xbl.spamhaus.org,
permit
Tags: ,