> Also I was wondering if there is a way to tell qmail-smtpd to exit
> with a 5xx error code rather than a 4xx error on spam or a virus?
> I am running qmail out of supervise, not that it should make any
> difference that I can see.

Look at the end of qmail.c in the qmail distribution.
The exit code of the child program (qmail-queue or $QMAILQUEUE)
determines what error message is spit out in SMTP.

The short answer is:
  Exit code 0 means successful delivery.
  Exit codes between 11 and 40 are permanent (5xx) errors.
  All other exit codes are temportary (4xx) errors.

A longer answer is:
  Have your program exit with a specific exit code and then add a custom
  message in qmail.c to handle that code.  For example:

   case 32: return "Dmail server thinks this message is spam(#5.3.0)";
   case 33: return "Dvirus rejected(#5.3.0)";
   case 34: return "Dyou send us nothing but crap(#5.3.0)";
   case 35: return "Dyou are listed in the our blackhole list(#5.3.0)";
   case 36: return "Dleave us alone, jackass(#5.3.0)";
   case 41: return "Zif you are not a spammer, try again in 5 minutes(#4.3.0)";
Eric Ziegast

Reply via email to