Niels Gustäbel <[EMAIL PROTECTED]> added the comment: The problem is not limited to mboxes but also applies to maildirs. Any message file created inside a maildir has execute permissions set as well because the same function _create_carefully() is used.
Changing the umask is not an option because it also affects any folders that are created. Setting the umask to something like 0177 would render the base folder and the {new,cur,tmp} folders of a newly created Maildir unusable. To me the only solution is changing the _create_carefully() function, so that it provides a mode argument to os.open() as done in the attached patch. The patch also fixes another instance of this problem: the empty file "maildirfolder" which is created inside a maildir's base folder. It should not be executable as well. ---------- keywords: +patch nosy: +ngustaebel Added file: http://bugs.python.org/file11037/python-mailbox-patch.diff _______________________________________ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue3228> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com