From: Ken Hornstein Date: Fri, 8 Sep 2017 17:46:08 +0000 (-0400) Subject: Send a QUIT instead of RSET at session end when doing 'whom'. X-Git-Url: https://diplodocus.org/git/nmh/commitdiff_plain/6396778780e014c789e3d18a0880525ee1cde4f6 Send a QUIT instead of RSET at session end when doing 'whom'. When running 'whom -check' (which really invokes post(8)), at the end of the SMTP session we would send a RSET instead of a QUIT. This was technically a RFC violation (RFC 5321 says a QUIT has to be the last thing you send), and this would cause some SMTP servers to complain. So make sure if we're being invoked by whom to send a QUIT at the end of the session. Reported by Ralph Corderoy. --- diff --git a/uip/post.c b/uip/post.c index 6dc18d10..ec85d93c 100644 --- a/uip/post.c +++ b/uip/post.c @@ -1806,7 +1806,7 @@ verify_all_addresses (int talk, int eai, char *envelope, int oauth_flag, puts(" -- Address Verification Successful --"); if (!whomsw || checksw) - sm_end (DONE); + sm_end (whomsw ? OK : DONE); fflush (stdout); sigoff ();