Bouncemaxbytes

From Ye Ole Stash
Jump to: navigation, search

Somebody on the qmailrocks mailing list had a question about a patch to NOT include the entire original message when generating a bounce. I looked at it, and the patch is very nice- it only touches one file, it only makes the absolute minimum changes it needs in order to do its job, and it doesn't cut existing lines (which would prevent future patches from applying cleanly.)

However, I don't like the fact that it's always enabled, and has a 50,000 byte limit by default. I tend to feel that unless the administrator does something extra (defines an environment variable, creates a control file, etc.) the qmail system should behave as closely as possible to djb's original design.

Since I was playing with the code again anyway, I went ahead and added this patch to the mix. However, I made the following change: if the control/bouncemaxbytes file does not exist, or if it contains zero, there will be no limit on the size of a bounced message. This matches the original behavior of qmail-send (the program within qmail which actually builds the bounce messages, and which this patch affects). There is also no default of 50,000 anymore- the default is zero, meaning no trimming of bounce messages. If you want a limit, whether it's 50,000 or something else, you will need to create the control file.

Personal tools