[Dovecot] [PATCH] POP3: Fix RFC1939 non-compliance in STAT, LIST and UIDL commands

Nic Bellamy nic at bellamy.co.nz
Sat Feb 14 12:38:47 EET 2004


Hi all,
	attached is a patch against 0.99.10.4 that fixes the STAT, LIST and
UIDL POP3 command output in the case that they're issued after one or
more messages have been deleted.

Examples of incorrect behavior (bad spots marked with '***')

    C: STAT
    S: +OK 2 806
    C: LIST
    S: +OK 2 messages:
    S: 1 403
    S: 2 403
    S: .
    C: UIDL
    S: +OK
    S: 1 1076749908.12
    S: 2 1076749908.13
    S: .
    C: DELE 1
    S: +OK Marked to be deleted.
    C: STAT
    *** S: +OK 2 806
    C: LIST
    *** S: +OK 2 messages:
    *** S: 1 403
    S: 2 403
    S: .
    C: UIDL
    S: +OK
    *** S: 1 1076749908.12
    S: 2 1076749908.13
    S: .

What it should have been is:

    [snip]
    C: DELE 1
    S: +OK Marked to be deleted.
    C: STAT
    S: +OK 1 403
    C: LIST
    S: +OK 1 messages:
    S: 2 403
    S: .
    C: UIDL
    S: +OK
    S: 2 1076749908.13
    S: .
    

It's unlikely the above issue has been causing much in the way of
problems, as it's very rare for mail clients to use any of the faulty
commands after they've deleted messages (they tend to do it once at the
beginning of the POP3 session and cache the results).

Regards,
	Nic.

-- 
Nic Bellamy <nic at bellamy.co.nz>
Bellamy Consulting -- Software & Security -- http://www.bellamy.co.nz/
--
Phone: +64-6-377-4957   Fax: +64-6-377-0505   Mobile: +64-21-251-8954 
--
-------------- next part --------------
A non-text attachment was scrubbed...
Name: stat-list-uidl-rfc1939-compliance.patch.gz
Type: application/x-gzip
Size: 1211 bytes
Desc: not available
URL: <http://dovecot.org/pipermail/dovecot/attachments/20040214/2994d99a/attachment-0001.gz>


More information about the dovecot mailing list