SquidGuard is a URL redirector used to use blacklists with the proxysoftware Squid. There are two big advantages to squidguard: it is fast and it is free.
validrcptto
Primary tabs
The validrcptto patch consults a CDB file, /var/qmail/control/validrcptto.cdb
which should contain every valid email address and alias on your server. Rather than generate this list manually or try to create our own script to do it, we'll utilize John Simpson's mkvalidrcptto script.
We've already installed djb's CDB program, so we can proceed with installing the CDB_File
Perl module. If you've never used the CPAN shell before on this server, you'll need to configure it the default options it provides should be adequate.
perl -MCPAN -e shell
install CDB_File
exit
In case the Perl module didn't install with the correct permissions, we'll use John Simpson's pfix script to fix them.
cd /usr/local/bin
wget http://www.jms1.net/code/pfix
chmod 755 pfix
pfix
Installing the mkvalidrcptto
script is simple matter of downloading it:
cd /usr/local/bin
wget http://qmail.jms1.net/scripts/mkvalidrcptto
wget http://qmail.jms1.net/scripts/mkauth
chmod 755 mkvalidrcptto mkauth
To create the initial CDB files, run mkvalidrcptto and mkauth commands with the -c option:
cd /var/qmail/control
mkvalidrcptto -c /var/qmail/control/validrcptto.cdb
mkauth -c /var/qmail/control/auth.cdb
SMTP run script
The run script for your SMTP service might need to be modified to enable validrcptto checks. Uncomment:
VALIDRCPTTO_CDB="$VQ/control/validrcptto.cdb"
VALIDRCPTTO_LIMIT=5
VALIDRCPTTO_LOG=2
Excluding addresses from validrcptto
In order to exclude some email addresses from the validrcptto file and not accept delivery to them, they can be added to /usr/local/bin/mkvalidrcptto
by editing this section:
# any entries listed in this array will NOT be included in the output
my @exclude = qw
(
sample1@domain.xyz
sample2@domain.xyz
) ;
- Log in to post comments
Credits
Various bits of code, scripts, and procedures were put together with information from John Simpson's qmail.jms1.net website. It's an excellent resource on managing and setting up a Qmail server.