Lisa Muir wrote:

> 
> Is there documentation that someone could point me to for this, or a
> setup that I can research. I'm getting nowhere with google apart from
> the above link but its more like a recipe that I won't understand than
> a documented approach.
> 

Lisa,

I have been experimenting with using Maia-Mailguard with Courier.  It is
an enhanced version of Amavisd-new.  See: http://www.maiamailguard.com/

The trick how to get from Courier to Maia and back.  I set up LDAP
aliases with different destinations for SMTP and local delivery.  The
SMTP delivered mail goes to a special userid that has a .courier file
that runs this perl script:

#!/usr/bin/perl
#
# This is designed to send messages from a Courier .courier delivery
instruction file.
# The messsage is piped into this program  with several environment
variables set.
# We send it to to amavis via SMTP which filters it and sends it
# back to be screwed around with some more.  We use a subroutine
override to replace
# the get_env_recipients subroutine in Email::Send::SMTP with one that
provides
# the recipient from the environment variable.
#

use Email::Send;
use Email::Send::SMTP;
use Sub::Override;

print "sendtoamavis: ";

local $/;   # enable localized slurp mode
my $msg = <STDIN>;

my $mailer = Email::Send->new({mailer => 'SMTP'});

my $override =
Sub::Override->new('Email::Send::SMTP::get_env_recipients', sub {return
$ENV{'RECIPIENT'} });

$mailer->mailer_args([Host => 'localhost:10024']);

my $ret = $mailer->send($msg);

unless ( $ret->bool ) {
        print "ERROR: ", $ret;;
        exit 51;
}

print "SUCCESS ", $return;
exit 0;

Maia virus scans, spam filters, quarantines, and then sends it back to
Courier with a sendmail command.  This time the LDAP alias uses the
"local" delivery instructions and those send it where I want it.  If
Maia was running on a different machine I would have to come up with a
different way of detecting that mail was coming back from Maia.

If this seems useful I will put it up on the Maia wiki.

Bill


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
courier-users mailing list
[email protected]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users

Reply via email to