New MailScanner Features
Julian Field
MailScanner at ecs.soton.ac.uk
Fri Sep 21 00:25:00 IST 2007
Jay Chandler wrote:
> Scott Silva wrote:
>> Jay Chandler spake the following on 9/20/2007 2:42 PM:
>>> The new version of MailScanner has a few nifty features that I
>>> like-- particularly the watermarking.
>>>
>>>
>>> The issue I'm having is in getting the phishing bad list updated via
>>> cron. I build Mailscanner from the FreeBSD ports tree, and until
>>> today didn't realize there were cron scripts living in
>>> /usr/local/libexec that did useful things, like updating the virus
>>> scanners.
>>>
>>> I don't see a script in there for updating the bad list, nor can I
>>> find a reference to one anywhere. Has this just not been written
>>> yet, or did the port maintainer miss something?
>>>
>> There should be something like update_phishing_sites called from cron
>> every day. Maybe the maintainer hasn't added the cron scripts yet.
>>
>
> Yeah, it's there, but it's solely targeting the whitelist, not the
> blacklist.
>
> Does someone have a copy of an update script that does what it's
> supposed to do that I can beat together, then submit as a patch?
>
> I'm rather surprised that the cron files aren't referenced in any of
> the installation procedure on FreeBSD-- I've been running MailScanner
> for almost a year now, and just discovered this aspect of things!
There should be an hourly cron job running update_bad_phishing_sites.
The guts of that script (minus all the copyright statements and the
like) is below.
#!/bin/sh
PATH=/bin:/usr/bin:/sbin:/usr/sbin:/usr/etc:/usr/local/bin:/usr/sfw/bin
export PATH
if [ -d /etc/MailScanner ]; then
cd /etc/MailScanner
else
logger -p mail.warn -t update.bad.phishing.sites Cannot find
MailScanner configuration directory, update failed.
echo Cannot find MailScanner configuration directory.
echo Auto-updates of phishing.bad.sites.conf will not happen.
exit 1
fi
wget http://www.mailscanner.eu/phishing.bad.sites.conf.master || \
curl -O http://www.mailscanner.eu/phishing.bad.sites.conf.master || \
( logger -p mail.warn -t update.phishing.sites Cannot find wget or curl,
update failed. ; echo Cannot find wget or curl to do phishing bad sites
update. ; exit 1 )
if [ -s phishing.bad.sites.conf.master ]; then
cp -f phishing.bad.sites.conf phishing.bad.sites.conf.old
mv -f phishing.bad.sites.conf.master phishing.bad.sites.conf
chmod a+r phishing.bad.sites.conf
logger -p mail.info -t update.bad.phishing.sites Phishing bad sites
list updated
else
logger -p mail.info -t update.bad.phishing.sites Phishing bad sites
list update failed!
fi
rm -f phishing.bad.sites.conf.master
exit 0
Jules
--
Julian Field MEng CITP
www.MailScanner.info
Buy the MailScanner book at www.MailScanner.info/store
MailScanner customisation, or any advanced system administration help?
Contact me at Jules at Jules.FM
PGP footprint: EE81 D763 3DB0 0BFD E1DC 7222 11F6 5947 1415 B654
For all your IT requirements visit www.transtec.co.uk
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
For all your IT requirements visit www.transtec.co.uk
More information about the MailScanner
mailing list