-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Scott, I'm sending this to the expert mailing list and bcc'ing you to
protect your email address.
Scott St. John wrote on Wed, Mar 05, 2003 at 01:15:43PM -0500 :
>
> I run an ISP and we have a spam problem so I was looking for ways to
> block some of these jerks. I have SpamAssassin on the server, but
> they are still getting past it so I was thinking that iptables would
> stop them and take some load off Sendmail doing the reject messages.
> I am going to start doing that today.
Try this on for size:
[EMAIL PROTECTED] ~]# useradd missed-spam
(don't set a password for it though)
[EMAIL PROTECTED] ~]# crontab -l | grep spam
30 */2 * * * /root/bin/learn_spam
[EMAIL PROTECTED] ~]# cat /root/bin/learn_spam
#!/bin/bash
for MISSEDSPAM in /var/spool/mail/missed-spam \
/home/todd/mail/missed-spam
do
if [ -s ${MISSEDSPAM} ]; then
sa-learn --spam --mbox ${MISSEDSPAM} && \
> ${MISSEDSPAM} && \
echo "Truncated mail spool: ${MISSEDSPAM}"
fi
done
The script looks in two places to "learn" what messages are spam.
1) Anything that appears in the missed-spam inbox is spam. In my case,
I can use mutt's "bounce" feature to bounce mails directly to the
[EMAIL PROTECTED] email address.
2) I use imap to access mail at another site. When I get spam to that
site, I just move it to my personal mail into a folder named
"missed-spam" which is then located at /home/todd/mail/missed-spam (in
MBOX format, ie one long file, same as /var/spool/mail/*). I have to
use imap for this purpose and not bounce it to the missed-spam user
because my imap client does not have that capability, though I could use
mutt in imap mode. I might set that up one day, but if I'm using imap,
I prefer it to be a GUI.
On the above server, I'm running SpamAssassin 2.50.
Blue skies... Todd
- --
Todd Lyons -- MandrakeSoft, Inc. http://www.mandrakesoft.com/
Favourite shell: bash, though I also like 'init=/usr/bin/emacs'
--Andrew Tridgell
Mandrake Cooker Devel Version, Kernel 2.4.21-0.11mdk
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
iD8DBQE+Zknblp7v05cW2woRAh0dAJ0c38KGheA7dRDENp8whoPkH00E5QCfdZA3
MuPRx3BWl4/q+H+Gba12/X4=
=MVn2
-----END PGP SIGNATURE-----
Want to buy your Pack or Services from MandrakeSoft?
Go to http://www.mandrakestore.com