]> Pileus Git - ~andy/fetchmail/commitdiff
Almost ready to ship.
authorEric S. Raymond <esr@thyrsus.com>
Wed, 25 Jul 2001 09:56:00 +0000 (09:56 -0000)
committerEric S. Raymond <esr@thyrsus.com>
Wed, 25 Jul 2001 09:56:00 +0000 (09:56 -0000)
svn path=/trunk/; revision=3422

NEWS
pop3.c
sink.c

diff --git a/NEWS b/NEWS
index 94e7ac21487548b8eab0e08064250d2204677a93..a0fac8a7456fa7887eb943c21fe11fa7366b93aa 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,16 @@
 
 (The `lines' figures total .c, .h, .l, and .y files under version control.)
 
+* Refuse mail that has no good addresses and can't be sent to postmaster.
+* Restore behavior of discarding mail on 550 (Debian bug #105237).
+* John Summerfield updated getfetchmail.
+* Cleanup patches by HMH.
+* Lock-file-name bug reported by Scott Johnson.
+* Updated Danish translation by Byrial Jensen.
+* Updated French translation by Thierry Vignaud.
+* Man page bugs pointed out by Andrew Benham.
+* POP3 end of session RSET on keep removed.
+
 fetchmail-5.8.14 (Thu Jul 12 03:19:57 EDT 2001), 21058 lines:
 
 * Corrected Rob Braun's remote-build change, it broke the build with NLS.
diff --git a/pop3.c b/pop3.c
index 83abbaf3524a55bb19b29bf2fdf0202dd62a85fd..f6e5ddef4cbfcee3a415f3e0b2870bfa0d0413bd 100644 (file)
--- a/pop3.c
+++ b/pop3.c
@@ -711,13 +711,23 @@ static int pop3_logout(int sock, struct query *ctl)
 {
     int ok;
 
+#ifdef __UNUSED__
     /*
-     * Just in case the server marks messages deleted when seen.
-     * Yes, this has been reported, in the MercuryP/NLM server.
-     * It's even legal under RFC 1939 (section 8) as a site policy.
+     * We used to do this in case the server marks messages deleted when seen.
+     * (Yes, this has been reported, in the MercuryP/NLM server.
+     * It's even legal under RFC 1939 (section 8) as a site policy.)
+     * It interacted badly with UIDL, though.  Thomas Zajic wrote:
+     * "Running 'fetchmail -F -v' and checking the logs, I found out
+     * that fetchmail did in fact flush my mailbox properly, but sent
+     * a RSET just before sending QUIT to log off.  This caused the
+     * POP3 server to undo/forget about the previous DELEs, resetting
+     * my mailbox to its original (ie.  unflushed) state. The
+     * ~/.fetchids file did get flushed though, so the next time
+     * fetchmail was run it saw all the old messages as new ones ..."
      */
-    if (ctl->keep)
+     if (ctl->keep)
        gen_transact(sock, "RSET");
+#endif /* __UNUSED__ */
 
     ok = gen_transact(sock, "QUIT");
     if (!ok)
diff --git a/sink.c b/sink.c
index bbe07cb8be31dd7b31e79f02adbd2ba90303bafe..061c9a9794597a9f326dbd33af99f59a6933445c 100644 (file)
--- a/sink.c
+++ b/sink.c
@@ -652,8 +652,10 @@ int open_sink(struct query *ctl, struct msgblk *msg,
 
        if (SMTP_from(ctl->smtp_socket, ap, options) != SM_OK)
        {
+           int err = handle_smtp_report(ctl, msg);
+
            SMTP_rset(ctl->smtp_socket);    /* stay on the safe side */
-           return(handle_smtp_report(ctl, msg));
+           return(err);
        }
 
        /*
@@ -1035,12 +1037,15 @@ int close_sink(struct query *ctl, struct msgblk *msg, flag forward)
        /* write message terminator */
        if (SMTP_eom(ctl->smtp_socket) != SM_OK)
        {
-           SMTP_rset(ctl->smtp_socket);    /* stay on the safe side */
            if (handle_smtp_report(ctl, msg) != PS_REFUSED)
+           {
+               SMTP_rset(ctl->smtp_socket);    /* stay on the safe side */
                return(FALSE);
+           }
            else
            {
                report(stderr, _("SMTP listener refused delivery\n"));
+               SMTP_rset(ctl->smtp_socket);    /* stay on the safe side */
                return(TRUE);
            }
        }