On Friday 31 July 2009 18:16:35 Ing. Davy Leon wrote:
> I have a Centos 5.3 with postfix 2.3.3. I'm using Amavisd-new and clamav
> for virus checking. My server daily receive lots of messages with JPG files
> attached. The number of JPF files in each message is variable. My question
> is. When receiving an email with at least one JPG file attached can I check
> if filesize is greater than let's say 100K and if yes, extract that file,
> change it's resolution (lowering file size) and put it again in the email
> message without modifiying the rest of the email and them make the local
Yes you could, but is it wise?
Almost certainly cheaper and easier to buy a bunch of TB disk drives and add a
bit of extra storage. Or address why you get so many oversized JPG files from
a business perspective.
If you really want to do this, might be easier to use existing scripts, I know
there are some around that extract attachments and save them to a webserver.
Anyway I'd suggest doing this as part of local delivery, ala procmail recipe.
So it wouldn't be much to do with Postfix at that point.
Fiddling with content of email is not something Postmasters usually should
concern themselves with. Down this path lies madness and responsibility for
the content of other people's emails.