Skip to content

Commit

Permalink
Send RFC2821-compliant response to unrecognized SMTP commands.
Browse files Browse the repository at this point in the history
Source: smtpd-502-to-500.patch
  • Loading branch information
icculus committed Dec 12, 2009
1 parent ddd7244 commit 52543d3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion qmail-smtpd.c
Expand Up @@ -85,6 +85,7 @@ void err_nogateway()
}
#endif
void err_unimpl(arg) char *arg; { out("502 unimplemented (#5.5.1)\r\n"); }
void err_unrecog() { out("500 unrecognised (#5.5.2)\r\n"); }
void err_syntax() { out("555 syntax error (#5.5.4)\r\n"); }
void err_relay() { out("553 we don't relay (#5.7.1)\r\n"); }
void err_wantmail() { out("503 MAIL first (#5.5.1)\r\n"); }
Expand Down Expand Up @@ -1040,7 +1041,7 @@ struct commands smtpcommands[] = {
#endif
, { "noop", err_noop, flush }
, { "vrfy", err_vrfy, flush }
, { 0, err_unimpl, flush }
, { 0, err_unrecog, flush }
} ;

void main(argc,argv)
Expand Down

0 comments on commit 52543d3

Please sign in to comment.