fetchmail-friends
[Top] [All Lists]

Re: [fetchmail]Preventing fetchmail from marking message read with pop3

2004-04-27 02:20:18
Brian Candler <B(_dot_)Candler(_at_)pobox(_dot_)com> writes:

That means there's some private sharing of state between the POP3 server and
the voicemail server. For example, maybe the POP3 server is adding a header
(e.g. Status:) after a RETR command, and the voicemail server is looking at
this header. Or maybe the voicemail server is accessing the message
directly, not using POP3 at all; e.g. if it were a Maildir then it might be
looking at flags on the filename (:2,S for Seen)
http://cr.yp.to/proto/maildir.html

The easy thing would be to just hang up, without saying QUIT. That must
not mark any mail read although I understand that some servers violate
the protocol and mark the mail read nonetheless.

But that doesn't help you much, since you can't control that internal state
by means of the POP3 protocol.

Yes he can. POP3 has a transactional model, all actions in a session are
tentative. The transaction is the update to the mailbox (delete, read
flags etc.), it allows for two ways out: (1) COMMIT (2) ABORT =
ROLLBACK. Action (2) undoes all changes, all deletes and so on -
provided the server is written properly. Note though that keeping the
read/unread state of a mail is outside of POP3 (RFC-1939). It was last
used in RFC-1460; RFC-1725 dropped the LAST command, RFC-1939 was the
current POP3 standard last time I checked.

To achieve (1) COMMIT, the client needs to quit the session with the
QUIT command. To achieve (2) ROLLBACK explicitly, the client can use
the RSET comment. (2) is implicit when the connection aborts prematurely.

-- 
Matthias Andree

Encrypt your mail: my GnuPG key ID is 0x052E7D95