Re: [EXIM] Mail filtering

Top Page
Delete this message
Reply to this message
Author: Vadim Vygonets
Date:  
To: exim-users
Subject: Re: [EXIM] Mail filtering
Quoth Daniel Quinlan on Thu, Jan 07, 1999:
> hi,


Umm, where have I heard your name? FHS?

> I have several sites who are screaming for some way to prevent their users
> from receiving exe's and the like as attachments in email.


> Something that stood infront of the MTA and acted as a configurable filter would
> be ideal.


Usually it is done to limit the message size, and exim has such
options. But if you really care for MIME, I believe that some
combination of perl and/or metamail will work fine. Make it your
system filter.

> being able to do things like decode all attachments and inspect them would be
> terrific.


Yup, metamail + perl. Or no metamail, perl alone is powerful
enough. Something like:

if (/^Content-Type:\s+multipart\/\w+;\s+boundary=(.*)$/) {
    $bound = $1;
}


And:
if (/^\-\-$bound/) {        # I'm not sure about this part,
                # check RFCs
    # Start processing
    # ...
    if (/^Content-Type:\s+(\w+)\/(\w+); charset=(.*)/) {
        $one = $1;    # Don't know the official names
        $two = $2;    # of those two.
        $charset = $3;
    }
    # ...
}


Vadik.

--
The reader this message encounters not failing to understand is
cursed.

--
*** Exim information can be found at http://www.exim.org/ ***