"Marcin M." <xpascal@spam-precz-poczta.onet.pl> writes:
> I have to copy ALL mail WITH attachments to special mailbox
> (/var/spool/mail/archive) and do this only IF the message has come from
> preset IP address.
> I have to add an responder that gets From address from message that HAS
> attachments and composes warning message from file to sender (to address got
> from From: field). This also should be done if message comes from preset IP
> address.
> Note that only messages WITH attachments have to trigger those actions.
>
> How to do this ?
>
> Maybe procmail ?
See "How do I keep a copy of all incoming and outgoing mail messages?"
on:
http://cr.yp.to/qmail/faq/admin.html#copies
In your ~alias/.qmail-log, pipe messages to a script that checks the
message for attachments, and, if it finds one, extracts the From
address (perhaps using 822field from the mess822 package), checks the
originating IP address, and sends a warning message, if
necessary. Make sure that your warning message doesn't contain an
attachment (or that your script ignores your warnings), or you'll
create a loop (your warning will be caught, generate a warning, which
will be caught...)
--
Dave Sill Oak Ridge National Lab, Workstation Support
Author, The qmail Handbook <http://web.infoave.net/~dsill>
<http://lifewithqmail.org/>: Almost everything you always wanted to know.