Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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

I just found out that spamassassin skips checking for email bigger than 250KB by default. Due to a coding bug, I check for the X-Spam-Status header in incoming emails and did not take into account the fact that it might be null. I know that I can increase the size of the limit by configuration but it may cause a load issue on my server. Since I do not want to redeploy my application at this time I was wondering if there is a way to make sure this header exists automatically in every email, either by spamassassin configuration or by postfix or something else. Thanks, Dov.

share|improve this question

migrated from Aug 4 '11 at 22:25

This question came from our site for professional and enthusiast programmers.

up vote 1 down vote accepted

Such a setup violates the principles of:

  • KISS
  • Be liberal in what you accept

You'll be much farther ahead fixing your application rather than relying upon yet another independent piece of code or configuration that you'll need to maintain. Do it the right way.

share|improve this answer

As you mentioned, it is the "default" setting with spamassasin that it won't scan messages which are bigger than the default/configured size. Without passing the mails through spamd, the "X-Spam-Status" header is not going to be added to the mail, unless you add the header manually to the mail if it is not already present. You can use a pre-processing script to check the header and add it, if the header is not present and then pass that to your application.


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.