SPAM Assassin
Stephen Warren
swarren-tag-list-nclug at wwwdotorg.org
Fri May 10 17:05:54 UTC 2024
On 5/10/24 09:21, Michael D Wailes wrote:
> Hello!
>
> I have a question about SPAM Assassin and hoping maybe I can find some
> help here.
> My inbox is getting bombed with SPAM right now -- so bad that I've had
> to set the SPAM Assassin Threshold Score to 1 and am still getting 40-60
> emails a day that are slipping through.
> I've attempted to also blacklist the domains that are consistently
> sneaking through but don't think I have those set correctly. I'm hoping
> someone here can offer some insight.
Are you putting all the spam into a folder and training Spam Assassin on it?
I have this:
crontab:
11 0 * * * /home/swarren/cron_scripts/silent_if_ok.sh \
/home/swarren/cron_scripts/email/train-sa.sh 2>&1
(line split just for email; I don't think crontab supports that)
Which runs this script:
swarren at avon:~$ cat /home/swarren/cron_scripts/email/train-sa.sh
#!/bin/sh
trash=~/Maildir/.Trash
spam=~/Maildir/.SPAM
latest_archive=`ls -d ~/Maildir/.Ar*|grep -P '\.\d{4}\.\d{2}$'|\
sort|tail -1 2> /dev/null`
dirs_ham="${trash} ${latest_archive}"
dirs_spam="${spam}"
for dir in ${dirs_ham}; do
cmd="sa-learn --ham --dir ${dir}/cur"
echo ${cmd}
${cmd}
done
for dir in ${dirs_spam}; do
cmd="sa-learn --spam --dir ${dir}/cur"
echo ${cmd}
${cmd}
done
> Most of these spammers are using sub-domains such as, m.domain.com, so
> I've been setting the domain in the blacklist filter like this:
> *domain.com
>
> Shouldn't that cover any and all traffic from the specified domain?
>
> --
> *Michael Wailes*
> mwailes at mdwailes.com <mailto:mwailes at mdwailes.com>
More information about the NCLUG
mailing list