Large file attachment filtering

Kevin Dermody kevind at GO2.IE
Tue Nov 15 16:25:00 GMT 2005


    [ The following text is in the "ISO-8859-1" character set. ]
    [ Your display is set for the "US-ASCII" character set.  ]
    [ Some characters may be displayed incorrectly. ]

Hi,

Ive done something like this, it isnt too hard at all. Basicly I have a 
modified Quarantine.pm which does something along the lines of:

if($report eq "MailScanner: Attachment is too large\n")
{
    copy("$indir/$attachment", "$userpath/$attachment");
    push @chownlist, "$userpath/$attachment";
}

$userpath is determined from a database entry which is retrieved by 
using details in the mail.

For security each $userpath is seperate and is located outside the 
webtree along side the Maildir folder. It is accessible only via an 
authenticated webmail login.

That way even if people got a copy of the url only the account holder 
can access the file.

This also took some hacking of the squirrelmail code.

Kevin Dermody
Go2web Ltd

Greg Borders wrote:
> Greetings!
> I'm looking into a method to strip off very large mime attachments on 
> outbound email, and store it locally on a HTTP / FTP server, and send a 
> link out to it in the email. The recipient can then download the file 
> via the web, and not clog the SMTP stream.
> 
> I've seen this done on some milter programs, but nothing yet for 
> MailScanner.  Has anyone done any development work on this? A quick 
> check of the archives didn't yield much.
> 
> I think we could develop something off of the Maximum Attachment Size, 
> with a rule set, and perhaps an external perl or shell script to handle 
> the mime storage, and link replacement.
> 
> Thoughts?
> 
> 
> -- 
> This transmission may contain information that is privileged, confidential
> and/or exempt from disclosure under applicable law. If you are not the
> intended recipient, you are hereby notified that any disclosure, copying,
> distribution, or use of the information contained herein (including any
> reliance thereon) is STRICTLY PROHIBITED. If you received this transmission
> in error, please immediately contact the sender and destroy the material in
> its entirety, whether in electronic or hard copy format. Thank you.
> 

------------------------ MailScanner list ------------------------
To unsubscribe, email jiscmail at jiscmail.ac.uk with the words:
'leave mailscanner' in the body of the email.
Before posting, read the Wiki (http://wiki.mailscanner.info/) and
the archives (http://www.jiscmail.ac.uk/lists/mailscanner.html).

Support MailScanner development - buy the book off the website!



More information about the MailScanner mailing list