On Wed, 2005-04-13 at 11:52 -0700, joe wrote:
> Does anyone have a maildrop script for a spamtrap. I want to have email
> sent to a old email address automatically learned as spam. Does anyone
> have one that they want to share?
>
>
> Thank you,
>
>
> --Joe Young
--
I found this script time ago, for any maildrop learner:
http://mymail.alien77.com/maildropMEGAEXAMPLE
You can redirect mail as follows
if(/[EMAIL PROTECTED]/:h)
{
cc /domains/blah.com/spamhole/Maildir
exit
}
Then do whatever using a cron job script.
But if all you want is tag as spam any email arriving to a certain
account that's what I use, small bash script:
cat spamtrap
#!/bin/bash
DIR='/domains/blah.com/spamhole/Maildir/cur'
X="`(cd $DIR ; echo *)`"
if [ "$X" != "*" ] ; then
cd /domains/blah.com/spamhole/Maildir/cur
su vpopmail -c 'sa-learn --spam ./'
ls . | xargs -i mv ./{} ../.already/cur/
fi
HTH
David <[EMAIL PROTECTED]>