[zope2-tracker] [Bug 602965] [NEW] zope.sendmail unnecessarily errors out when checking async directories
Elizabeth Leddy
602965 at bugs.launchpad.net
Wed Jul 7 21:36:36 EDT 2010
Public bug reported:
Noticed when testing plone 4 beta 5, which uses zope 2.12.7, which looks
to be zope.sendmail 3.5.1. Reviewing the changeset it doesn't look like
this bug has been addressed but if so I apologize for double reporting.
For async queuing, if you select a default directory that already
exists, i.e. /tmp (which is the default), and try to save the changes in
the ZMI, the following error throws:
Traceback (innermost last):
Module ZPublisher.Publish, line 127, in publish
Module ZPublisher.mapply, line 77, in mapply
Module ZPublisher.Publish, line 47, in call_object
Module Products.MailHost.MailHost, line 187, in manage_makeChanges
Module Products.MailHost.decorator, line 26, in method
Module Products.MailHost.MailHost, line 298, in _startQueueProcessorThread
Module zope.sendmail.delivery, line 229, in setQueuePath
Module zope.sendmail.maildir, line 59, in __init__
ValueError: /tmp is not a Maildir folder
Digging in maildir.py, this looks like a simple fix on logic - if the base directory already exists it doesn't create the required subfolders, however it errors on the check for them:
def __init__(self, path, create=False):
...
if create and not access(path):
os.mkdir(path)
os.mkdir(subdir_cur)
os.mkdir(subdir_new)
os.mkdir(subdir_tmp)
maildir = True
else:
maildir = (os.path.isdir(subdir_cur) and os.path.isdir(subdir_new)
and os.path.isdir(subdir_tmp))
if not maildir:
raise ValueError('%s is not a Maildir folder' % path)
....
On a somewhat related note, the names of those subfolders are extra
generic and there is a potential that if people were to put that in /tmp
as suggested, they would either get clobbered or accidentally deleted.
This could be easily fixed with the fix + a better default.
** Affects: plone
Importance: Unknown
Status: Unknown
** Affects: zope2
Importance: Undecided
Status: New
** Tags: async sendmail zope2
** Bug watch added: Plone Bug Tracker #10735
http://dev.plone.org/plone/ticket/10735
** Also affects: plone via
http://dev.plone.org/plone/ticket/10735
Importance: Unknown
Status: Unknown
--
zope.sendmail unnecessarily errors out when checking async directories
https://bugs.launchpad.net/bugs/602965
You received this bug notification because you are a member of Zope 2
Developers, which is subscribed to Zope 2.
More information about the zope2-tracker
mailing list