This is a discussion on Qmail and messages with attachments within the alt.comp.mail.qmail forums, part of the Mail Servers and Related category; I've set up a small qmail server (150 users) with delivery to /var/spool/mail via procmail, then I'...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
I've set up a small qmail server (150 users) with delivery to
/var/spool/mail via procmail, then I've added an antivirus scanner Mks_Vir (popular in Poland) and attachment renamer (renattach) into message pipe. It works great, it's very fast and simple, removes or deactivates all fauna that comes to vulnerable clients (mostly MS Outlook). I've got some tasks to do with qmail. 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 ? Thanx in advance. Marcin (xpascal@_REMOVE_SPAM_FILTER_poczta.onet.pl) |
|
|||
|
"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. |
|
|||
|
Marcin M. wrote:
> I've set up a small qmail server (150 users) with delivery to > /var/spool/mail via procmail, then I've added an antivirus scanner Mks_Vir > (popular in Poland) and attachment renamer (renattach) into message pipe. It > works great, it's very fast and simple, removes or deactivates all fauna > that comes to vulnerable clients (mostly MS Outlook). > I've got some tasks to do with qmail. > > 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 ? > Thanx in advance. > > Marcin (xpascal@_REMOVE_SPAM_FILTER_poczta.onet.pl) > > Marcin: Take a look at the man page for qmail-command. $SENDER will contain the email address of the envelope sender. $RECIPIENT is the envelope recipient. AK |
![]() |
| Thread Tools | |
| Display Modes | |
|
|