fetchmail-friends
[Top] [All Lists]

Re: [fetchmail] how to avoid "missed" mail

2002-12-19 19:49:58
On Thursday, December 19, 2002, at 12:55  PM, Matthias Andree wrote:

Then there's a driver bug. fetchmail must not mark a mail it could not
deliver "read". However, I only tested against POP3, so I may have
missed that one at that time.

Well looking at the source code I found this interesting tidbit.

#ifdef __UNUSED__
        /*
         * Any IMAP server that fails to set Seen on a BODY[TEXT]
         * fetch violates RFC2060 p.43 (top).  This becomes an issue
         * when keep is on, because seen messages aren't deleted and
         * get refetched on each poll.  As a workaround, if keep is on
         * we can set the Seen flag explicitly.
         *
         * This code isn't used yet because we don't know of any IMAP
         * servers broken in this way.
         */
        if (ctl->keep)
            if ((ok = gen_transact(sock,
                        imap_version == IMAP4
                                ? "STORE %d +FLAGS.SILENT (\\Seen)"
                                : "STORE %d +FLAGS (\\Seen)",
                        number)))
                return(ok);
#endif /* __UNUSED__ */

So the comment says that when we fetch the body, the message gets marked read as a side effect. If the problem I am experiencing is to be considered a but it would seem that after the delivery failure we need to go back and mark the message unseen. Is that correct? Is it reasonable to expect fetchmail to behave in this way?

Jim