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

CentOS 5.x - SendMail

Hi Guys,

I'm curious -- is there any way to customize the STMP error codes, response text, and/or DSN body text in sendmail?

If so, where is this stored?



share|improve this question
up vote 3 down vote accepted

It's possible, but probably not worth it.

You can go through the source code (benefit of open source) and modify the interesting parts by hand (most if not all strings seem to be hardcoded).

Fast way to find the strings is to use some recursive grep.

It would ruin your update path though, so I doubt it's a viable solution really.

share|improve this answer
Cool. I was hoping for something like an m4 variable but didn't see any listed in the sendmail docs. Thanks for the prompt reply. – Mike B Apr 21 '10 at 16:54

Once upon a time I wrote $#random, a mailer that returns random exit codes. You maybe interested in modifying that to your purpose.

share|improve this answer
This is a clever idea! – Mike B May 24 '12 at 14:57

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.