procmail or some program to zip email attachments over a given size -HELP-
I'm trying to find a way to process incoming mail to zip compress attachments. I am running postfix with procmail and dovecot with Maildir. I currently have procmail recipes for clamav and spamassassin as well has some pre-filter recipes to save some CPU cycles. I am not terribly elite with the procmailrc file!
The problem I have is that some users insist on sending very large attachments while on the local network with no concern as to how long it takes mobile users to get it. The people are the corporate level people that cant be told that they cant send 15MB emails. A 15MB excel file typically compresses to 2MB!, which is ok for mobile users.
I am currently setting up myentunnel on the windows desktops and doing a compressed ssh tunnel to the mailserver and setting up thier client to connect to localhost. This works for some people but it is not ideal.
Id like to just do a:
* > 1000000
|zip flags whatever -
if that conveys the concept! Compress the attachment of the email if it is a certain size and pass it on to the next recipes..
Anyone have an idea on how to do this? I also have formail available.
My OS is ubuntu 7.04 server...