Add new comment

Submitted by AlArenal (registered user) on Tue, 2008-06-10 14:44.

Sometimes you need to do manual whitelisting for mail users whose customers' admins don't respond to your complaints about their server settings.

Another option to consider ist automatic whitelisting by using the hand-crafted DNSWL ( http://www.dnswl.org/ ). You should also consider requesting to get added to DNSWL.

I use a simple shell script named dnswl-update.sh as a cron job to sync the data (see documentation for use of X-REPLACEME substitution):

#!/bin/sh
rsync --times rsync1.dnswl.org::dnswl/postfix-* /mypath/
cat /mypath/postfix-dnswl-header | sed "s/X-REPLACEME/X-MYSTRING/" > /etc/postfix/dnswl-header
cp /mypath/postfix-dnswl-permit /etc/postfix/dnswl-permit

In /etc/postfix/main.cf I added these two lines as first check_* commands within the smtpd_recipient_restrictions :

smtpd_recipient_restrictions =
[ ... ]
check_client_access cidr:/etc/postfix/dnswl-header,
check_client_access cidr:/etc/postfix/dnswl-permit,
[ ... ]

After that  you restart Postfix.

/etc/init.d/postfix restart

 My cron entry looks something like this and there is no need to restart or reload Postfix afterwards:

7 5,18 * * * /path-to-script/dnswl-update.sh &> /dev/null
Please do not use the comment function to ask for help! If you need help, please use our forum.
Comments will be published after administrator approval.

Reply

*
*
The content of this field is kept private and will not be shown publicly.


*

  • Images can be added to this post.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <img> <div>
  • Lines and paragraphs break automatically.