-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Maric Michaud wrote:
Hi all,
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: http://docs.zope.org/developer/noncommitter-svn.html E.g., get a read-only checkout of the 2.11 branch: $ cd /tmp $ svn co svn://svn.zope.org/repos/main/Zope/branches/2.11 Zope-2.11 build it and make an instance: $ cd /tmp/Zope-2.11 $ ./configure --with-python=/path/to/python2.4 && make inplace $ bin/mkzopeinstance /tmp/test_mailhost apply your changes in that tree, test them, and then create a diff using SVN: $ cd /tmp/Zope-2.11 $ svn diff -u > /tmp/mailhost_thread_fix.patch and attach that file to your bugreport. Bonus points (i.e., a faster resolution) if you can generate a unit test which fails without your changes, but passes with them. Tres. - -- =================================================================== Tres Seaver +1 540-429-0999 tseaver@palladion.com Palladion Software "Excellence by Design" http://palladion.com -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkva1BIACgkQ+gerLs4ltQ4sPQCgv7OmVZ3ynVInCddns4T1maar UnUAoMD1CKuMS0FKkZkX+34HWq02nkTq =5qyA -----END PGP SIGNATURE-----