voodoodyne / subetha

SubEtha Mail is a J2EE-based mailing list manager
Other
13 stars 6 forks source link

Endless loop when mail gets sent twice #42

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
We use a blog that sends out a mail to a mailing list hosted by subetha 
whenever a user submits a new blog entry. Due to a misconfiguration, the blog 
system sent out 2 emails per blog entry. No big deal - 2 mails were sent to the 
mailinglist.

Unfortunately, subetha referenced both mails as parent of one another in the 
database. In mysql it would look like this:

25689 | foobar subject | www-data@foo.bar.com | 2010-06-28 10:54:38 | 
2010-06-28 10:54:34 | NULL | 25690 | 25

25690 | foobar subject | www-data@foo.bar.com | 2010-06-28 10:54:38 | 
2010-06-28 10:54:34 | NULL | 25689 | 25

The mail with the id 25689 has 25690 as its parent and vice versa.

This leads to an endless loop whenever a user tried to browse the archive in 
subetha of the specific list (99% cpu and subetha hangs forever). As soon as I 
fixed the parent id column in mysql, everything worked fine again.

I fixed the misconfiguration in our blog so that it doesn't send out 2 mails at 
once, but subetha should definitely check for this and not create those loops.

We are using the latest subetha with the latest resin on a Linux server.

Original issue reported on code.google.com by patrick....@gmail.com on 24 Sep 2010 at 11:37