Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Rule for message filename is too strict #2

Closed
LukeShu opened this Issue Aug 6, 2012 · 1 comment

Comments

Projects
None yet
2 participants

LukeShu commented Aug 6, 2012

In api.py the regex MDMSG_FILENAME looks like it tries to extract information from the "unique name" section of the filename, resulting in it potentially discarding valid files (such as those created by offlineimap).

Further, to quote the Maildir spec:

Unless you're writing messages to a maildir, the format of a unique name is none of your business. A unique name can be anything that doesn't contain a colon (or slash) and doesn't start with a dot. Do not try to extract information from unique names.

To comply with this I've written the following regex; I figured a 1-line change wasn't worth a pull request.

MDMSG_FILENAME_PATTERN = "(?P<key>[^.:/][^:]*)(:2,(?P<flags>[PRSTDF]*))?"
Owner

nicferrier commented Jan 12, 2013

I'd be really happy for you to fix this... I am no longer supporting this code. See the README.creole for details.

@nicferrier nicferrier closed this Jan 12, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment