]> diplodocus.org Git - nmh/commitdiff
Send a QUIT instead of RSET at session end when doing 'whom'.
authorKen Hornstein <kenh@pobox.com>
Fri, 8 Sep 2017 17:46:08 +0000 (13:46 -0400)
committerKen Hornstein <kenh@pobox.com>
Fri, 8 Sep 2017 17:46:08 +0000 (13:46 -0400)
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.

uip/post.c

index 6dc18d1..ec85d93 100644 (file)
@@ -1806,7 +1806,7 @@ verify_all_addresses (int talk, int eai, char *envelope, int oauth_flag,
        puts(" -- Address Verification Successful --");
 
     if (!whomsw || checksw)
        puts(" -- Address Verification Successful --");
 
     if (!whomsw || checksw)
-       sm_end (DONE);
+       sm_end (whomsw ? OK : DONE);
 
     fflush (stdout);
     sigoff ();
 
     fflush (stdout);
     sigoff ();