I think I remember something about an "import" required to get $SENDER:
Gerardo had posted these notes (does this fix your problem?):
# Import Variables
#
import HOME
import SENDER
import RECIPIENT
# Virus Scan
if ($SENDER ne "")
{
FROM=$SENDER
}
else
{
FROM="unknown"
}
xfilter "/usr/sbin/amavis $FROM $RECIPIENT"
if (/^Subject:.*VIRUS IN*/)
{
exception {
to "Maildir/.Virus"
}
}
If a virus was detected the mail goes to Maildir/.Virus and no further
checking is done for that piece of mail.
If no viruses are found then Spam Assasin is called next;
# Spam Assassin
xfilter "/usr/local/bin/spamassassin -x"
if (/^X-Spam-Flag: YES/)
{
to "Maildir/.Spam"
}
If Spam is detected no further checks are done and mail is delivered to
Maildir/.Spam
if no Spam is detected than Anomy is called,
# Anomy Sanitizer
ANOMY=/usr/local/anomy/
xfilter "/usr/local/bin/sanitizer.pl
/var/xxxxxxx/xxxxx/xxxxx/sanitizer2.cfg"
And mail is then delivered to Maildir (if it made it this far).
Hope this helps, I bet there are many different ways of doing this, and
mine
might not be the most efficient.
Gerardo
P.S. If you use Clam AV dont forget to setup freshclam for automatic
updates
to the virus.db (as far as I can tell they normally update twice daily)
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Scott
Sent: Saturday, October 18, 2003 9:09 PM
To: [EMAIL PROTECTED]
Subject: Re: [courier-users] Has anyone used courier & clam-av? What's
the preferred method of integration?
So I got clamav to work with amavis and courier. I doubt it's the most
efficient possible solution, but it works with some small hic-ups.
0. Get a clamav rpm if you can. Otherwise, at least clamav is well
documented for install.
1. Get the amavis-0.3.12.tar.gz source at www.amavis.org.
2. Get the courier patch
http://www.amavis.org/contrib/amavis-courier.patch.2
3. Patch away.
4. Due to some reason outside my understanding or patience I had to set the
default MTA to courier in 'configure' or it defaulted to sendmail.
5. I built it with ./configure --enable-courier --with-amavisuser=amavis;
make
6. Make sure /var/amavis /var/virusmails are chown amavis.amavis and have
the
correct permissions.
7. Add the following to /etc/courier/maildroprc (or where ever it is in your
install).
xfilter "/usr/sbin/amavis"
It works for me, your mileage will vary. This can definately be cleaned up.
One slight problem is that amavis can't get $SENDER from the email in this
incarnation. Perhaps there is a better implementation, but until I figure
out how to get amavis-ng to work I'll stick with this setup. Thanks to all
who helped.
-Scott
-------------------------------------------------------
This SF.net email sponsored by: Enterprise Linux Forum Conference & Expo
The Event For Linux Datacenter Solutions & Strategies in The Enterprise
Linux in the Boardroom; in the Front Office; & in the Server Room
http://www.enterpriselinuxforum.com
_______________________________________________
courier-users mailing list
[EMAIL PROTECTED]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users
-------------------------------------------------------
This SF.net email sponsored by: Enterprise Linux Forum Conference & Expo
The Event For Linux Datacenter Solutions & Strategies in The Enterprise
Linux in the Boardroom; in the Front Office; & in the Server Room
http://www.enterpriselinuxforum.com
_______________________________________________
courier-users mailing list
[EMAIL PROTECTED]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users