Tres Seaver a écrit :
I was surprised by the behavior of asynchronous mailing in zope 2.11.3 MailHost product. It creates a thread by instance of MailHost by the mean of using self.absolute_url(1) as key for the queue_threads dictionnary.
It seems obviously wrong, IMO, if several instances share the same queue directory, mesages actually get sent more than once.
Following is the monkey patch which works fine for me, but the idea is straightforward, it's to use the realpath of the smtp_queue_directory as the identifier of the thread, ensuring that MailHosts that share the same queue directory will also share the same thread for processing mails.
It looks like a bug to me: could you please report it to the tracker at:
http://bugs.launchpad.net/zope2
Also, if you could convert your monkeypatch into a real diff against the source, that would help expedite. The basic procedure is outlined at:
Ok, I'll do that, soon. -- _____________ Maric Michaud