Op Mon, 14 Nov 2011 15:28:43 +0100 schreef "James J. Lippard" <lippard-open...@discord.org>:
I had the same problem, which I worked around by changing my
spamd.conf to use a local file instead of FTP, and downloading the
traplist.gz file in my daily.local.

That is, my spamd.conf now looks like this:

uatraps:\
        :black:\
        :msg="Your address %A has sent mail to a ualberta.ca spamtrap\n\
        within the last 24 hours":\
        :method=file:\
        :file=/etc/mail/traplist.gz:

And my daily.local now has this:

echo "Getting traplist.gz."
/usr/bin/ftp -o /etc/mail/traplist.gz http://www.openbsd.org/spamd/traplist.gz

I have a slightly more complicated setup which fetches traplist and nixspam every two hours:

root's crontab:
# update spamd on :15 every two hours
15      */2     *       *       *       /etc/mail/spamd-setup.sh


spamd-setup.sh:
#!/bin/sh
# sleep 0..15 minutes
/bin/sleep $(($RANDOM / 72))
/usr/local/bin/wget -o /dev/null -NxP /home/ftp/pub/mirrors -nv \
        http://www.openbsd.org/spamd/{traplist,nixspam}.gz
/usr/libexec/spamd-setup


Also, china and korea are fetched in daily.local:
# http://www.openbsd.org/spamd/{china,korea}cidr.txt.gz are not mirrored
# regularly, so we use the original source
/usr/local/bin/wget -NxP /home/ftp/pub/mirrors -nv \
        http://www.okean.com/{china,korea}cidr.txt


The advantage of using wget(1) (or curl(1) if you like) is that it will only fetch the file if the timestamp has changed.



--
Gemaakt met Opera's revolutionaire e-mailprogramma: http://www.opera.com/mail/
(Remove the obvious prefix to reply.)

Reply via email to