[issue11935] MMDF/MBOX mailbox need utime

Steffen Daode Nurpmeso report at bugs.python.org
Mon May 2 12:58:28 CEST 2011


Steffen Daode Nurpmeso <sdaoden at googlemail.com> added the comment:

On Sun,  1 May 2011 00:15:11 +0200, R. David Murray <report at bugs.python.org> wrote:
> The problem with this patch is that it would also show 'new
> mail' if what had in fact happened was that a message had been
> *deleted* (see the comments at the beginning of the flush
> method).  So actually fixing this is a bit more complicated.

Well i don't think so because MUA's do some further checks,
like checking the size and of course the status of each mail;
some indeed use the mtime as an entry-gate for further inspection.
And deleting an entry should surely pass that gate, too.

Please do see the file mbox.c of the mutt(1) source repository,
which in fact seems to have been used as an almost copy-and-paste
template for the implementation of large parts of mailbox.py.

But note that i just search less than five minutes in mailbox.py
to find a place where i can add the code of the patch (after
i've added an identical workaround for my S-Postman), so of course
it may not catch all cases.  One error is obvious: it also sets the
mtime for that Babylon format.  I don't use emacs and i'm
a buddhist so i don't care about that Babylon mess anyway.
Right?

> A proper fix for this should also consider fixing issue 7359.

Hm.  #7359 refers to misconfiguration, not to Python or
mailbox.py.  Maybe Doc/library/mailbox.rst should be adjusted to
give users which are new to UNIX a hint about ,group mail` and the
set-group-ID on directories?  I think this would really be a good
thing?!?!  Should i open an issue on that?

But again, mailbox.py reflects almost one-to-one (except for the
naive file lock handling in comparison and AFAIK) mutt(1)'s
mbox.c, and i think that if mutt(1) does
create-temp-work-work-work-rename then this should be ok for
mailbox.py, too.

Did you know that ,bin Laden` ment ,am loading` in german?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue11935>
_______________________________________


More information about the Python-bugs-list mailing list