Qmail and messages with attachments

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'...


Go Back   Usenet Forums > Mail Servers and Related > alt.comp.mail.qmail

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 06-23-2003
Marcin M.
 
Posts: n/a
Default Qmail and messages with attachments

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)


Reply With Quote
  #2 (permalink)  
Old 06-24-2003
Dave Sill
 
Posts: n/a
Default Re: Qmail and messages with attachments

"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.
Reply With Quote
  #3 (permalink)  
Old 06-24-2003
AK
 
Posts: n/a
Default Re: Qmail and messages with attachments

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

Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 08:59 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0