About 2 weeks ago, I posted my mailfilter script which does autoreply
using mailbot.
You can see it at the bottom of the courier-imap archives at
http://tinyurl.com/49vl4
I put my spam filtering and antivirus scripts in the systemwide
/etc/maildrop/maildroprc.
It looks like this:
if ($SIZE < 262144)
{
exception {
xfilter "/usr/bin/spamc -u $LOGNAME"
ANOMY=/usr/local/anomy
xfilter "/usr/local/f-prot/tools/scan-mail.pl"
}
if (/was a virus\/worm\/trojan. It was removed./:b)
{
logfile "/var/log/maildrop.log"
log "VIRUS DETECTED"
to "/dev/null"
}
}
~Rolan
Thierry B wrote:
Hello,
I'd like that my maildroprc, executes a shell script when a message is
sent to te...@linux.thierry.eu.org
But it doesn't work.
Could you tell me the good syntax?
Thanks.
this is my maildroprc:
SENDMAIL="/usr/sbin/sendmail -oi -f $FROM"
if ( $SIZE < 26144 )
{
exception {
xfilter "/usr/bin/spamassassin
--prefspath=$HOME/$DEFAULT/.spamassassin/user_prefs"
}
}
if (/^X-Spam-Flag: *YES/)
{
exception {
to "$HOME/$DEFAULT/.Spam/"
}
}
if (/^To: te...@linux.thierry.eu.org/)
{
exception {
to "$HOME/$DEFAULT/.Teil/"
'./autoreply.sh thie...@localhost.net $FROM'
}
}
else
{
exception {
to "$HOME/$DEFAULT"
}
}