Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

We are using qmail as a mail server.

If a user sends an email that cannnot be delivered he get's a message back from qmail with some details about this error.

Hi. This is the qmail-send program at our.server.tld
I'm afraid I wasn't able to deliver your message to the following addresses.
This is a permanent error; I've given up. Sorry it didn't work out.

<recpient@server.tld>: failed after I sent the message.
Remote host said: 552 5.3.4 Message is too large, rejected.

--- Below this line is a copy of the message.

... header information ...

... message ...

... attachments in base64 ...


Content-Type: application/pdf;
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
modification-date="Wed, 24 Oct 2012 14:27:24 +0000"


It is fine to have a copy of the message with the header and message information. But is it possible to tell qmail not to include the full attachment into this error message? This is a big overhead and it would be best to just limit the size of the message to a few kb since the user can't do anything with the base64 stream anyway.

share|improve this question

As far as I know there is no way to do this in vanilla Qmail. DJB had his own weird ideas of how things should work. Ofcourse just like everything else in QMail world there is a patch that does approximately what you want. If you are already using JMS's combined patch it is already included in there.

It is not a perfect solution really but still if it is critical enough and you can patch and update your qmail installation you can consider it.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.