Filter for mail attachment size ? (to be used from Procmail or similar)

H

Horst Lemminger

I have been looking for a long time for a filter on attachment size in
emails.

At the mailserver, which is running Postfix and Procmail, there
already is a an auto-reply filter in Perl that checks a DB for status,
so filtering with Perl in general works.

Here is what I would like to do:

* check mail if there is any attached files
* if attachment is above (xxx) bytes - this can be read from a
database per user - remove the attachment and send a reply back to
sender that they need to use an upload service.
* then forward rest of mail (main body) to recipient

I have studied the docs on Mail::Simple etc, but have not been able to
understand how.

So, anyone with a completed script or points on how to get started on
this ?

Ultimate goal is to get rid of people that mail 10Mb+ screenshots to
explain a simple thing.
PS: if anyone has a pointer on how to do this in Procmail or other
scripting languages, fine with me..

Thanks
 
D

Dr Eberhard Lisse

Me three, four, five :)-O

I am more interested from the perspective of doing really weird
stuff in developing countries, which involve cutting off of
attachments, batching and gzipping, and perhaps even uucp again :)-O

Of course at the same time one would need to check for the message
size so that one catches uu/mime-encoded stuff in the text, which
doesn't gzip nice and as such could just be bounced altogether...


el
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top