|
From: Mark M. <Mar...@ij...> - 2005-03-10 14:08:53
|
Aaron,
> Some searching brings renattach to light. It takes a message in via
> > stdin, filters and renames attachments as needed, then outputs the
> > modified message to stdout. I haven't used the virus scanner part of
> > amavisd-new before, is this something I can put in as a custom virus
> > scanner? The docs state it can be used as a content filter by Postfix,
> > but I'd rather do it through amavis if it will work.
>
> Forgive me as I reply to myself. It's pretty clear from the
> configuration file that this isn't going to work through amavis, as
> there's no way I can find to allow a virus scanner to modify the
> message. So I'll have to figure out how to insert it into the content
> filtering chain in Postfix.
Perhaps the following chaining method can be used:
amavisd-new is able to feed passed mail to a piped process,
e.g. a sendmail binary (or to your program of choice in this case).
The setting is: $forward_method. An example form amavisd.conf-sample
shows how to feed mail to an external program, in this case
to the sendmail binary:
$forward_method =
'pipe:flags=q argv=/usr/sbin/sendmail -C/etc/sendmail.orig.cf -i -f ${sender} -- ${recipient}';
Replacing /usr/sbin/sendmail with a program of your choice which
can accept sender and recipient envelope addresses as arguments and
mail on stdin, and can pass this on to a Postfix, e.g. by calling
its sendmail binary or using mini_sendmail, can complete the chain.
Mark
|