Attachment stripping - wrong postfix message size

Markus Nilsson markus at markusoft.se
Tue Mar 23 09:53:07 GMT 2010


Hi,

I'm having a problem with a custom function for attachment stripping based on total attachment size. The custom function is made for 

Maximum Attachment Size = 

I successfully return 1 if the summed size of all attachments are larger than my configured value, and -1 otherwise. The custom function also stores the attachments in a safe place for later retrieval. I then want MailScanner/postifx to deliver the stripped mail to the recipient(s). MailScanner seems to do it right, but for some reason when postfix delivers the mail to the receiving mail server, it reports the message size as it was before the stripping, so that server might reject the mail even though it really isn't that big.

If I configure the mailserver to accept larger sizes, the received mail has the correct size (small, all attachments stripped), so the reported size by postfix is not correct!

Does postfix somehow approximate the message size? 
If so, is it possible to help postifix with this approximization?
Or am I completely missing something else out?

Any help greatly appreciated!

BR
Markus




More information about the MailScanner mailing list