Page 1 of 2
Duplicate Emails (but only with multiple recipients)
Posted: April 26th, 2011, 2:40 am
by rembo10
Strange thing happening that I can't quite figure out. When I set just one email address for notifications, everything works great. However, when I add another email address, it sends 2 copies of the email to each recipient (4 emails total).
The only way I could get it to send at all was by using this format:
[email protected],
[email protected]
But each account gets one email addressed to
[email protected], and a 2nd one addressed to
[email protected].
Is this a known bug or am I doing something wrong? I tried searching around but couldn't really find a concrete answer. Just seems strange..... maybe it's my isp (using road runner smtp - smtp-server.socal.rr.com. I will try with another smtp and report back to try to narrow it down). Everything else is working 100%, no real issues so far.
Here's what I'm running:
Version: 0.6.0 RC2
OS: OSX Snow Leopard
Install-type: OS X App
Firewall Software: none
Are you using IPV6? no
Is the issue reproducible? yes
Re: Duplicate Emails (but only with multiple recipients)
Posted: April 26th, 2011, 2:44 am
by rembo10
Just tried with gmail smtp, same problem.
Re: Duplicate Emails (but only with multiple recipients)
Posted: April 26th, 2011, 3:09 am
by shypike
Are you using the original email templates or do you use your own?
Re: Duplicate Emails (but only with multiple recipients)
Posted: April 26th, 2011, 4:15 am
by rembo10
Happens with the stock template as well as my own....
I also tried: ,
It sends, but with the same problem. Both accounts get both emails :-/
Am I formatting it right? Anyone have any luck setting this up?
If I do ; (with a semicolon instead of comma) a gets the correct email but b doesn't get anything. So I think the comma is correct, just don't know why it duplicates.....
Appreciate the help.... This is like, the last little issue before I have a perfect little set up :-)
Re: Duplicate Emails (but only with multiple recipients)
Posted: April 26th, 2011, 5:44 am
by sander
Re: Duplicate Emails (but only with multiple recipients)
Posted: April 26th, 2011, 6:12 am
by shypike
I cannot check right now, but at least remove the '' signs.
They are not needed and may cause side-effects.
Re: Duplicate Emails (but only with multiple recipients)
Posted: April 26th, 2011, 6:50 am
by sander
I can confirm this behaviour in 060 RC3 (on Ubuntu): with two mail destination addresses, four mails in total are received.
And I found the reason too: using wireshark (aka ethereal) I had a look at the SMTP communication on the network level, and ... there are two SMTP-sessions, each with two RCPT TO: each with an address.
So solution: only one SMTP session, with all destiination addresses. (Or one SMTP-session per destination address)
Re: Duplicate Emails (but only with multiple recipients)
Posted: April 26th, 2011, 9:50 am
by shypike
Thanks for checking.
The two SMTP sessions are intended: this allows for recipient-specific template handling.
What is wrong is that each email is sent to *all* recipients.
I'll fix that.
Re: Duplicate Emails (but only with multiple recipients)
Posted: April 26th, 2011, 2:04 pm
by rembo10
Awesome, thanks!
So maybe a short term fix might be to have two templates, and use an "if $to=
[email protected]" line in there?
Re: Duplicate Emails (but only with multiple recipients)
Posted: April 26th, 2011, 3:33 pm
by rembo10
Ok, so as a temporary workaround you can add 2 lines in the template:
(and at the end)
I also deleted the $to in the To: field. That way it won't show the wrong recipient in one of the accounts.
Re: Duplicate Emails (but only with multiple recipients)
Posted: April 26th, 2011, 4:38 pm
by shypike
I have no idea what you are doing with the email, but I cannot get it to fail.
For two recipients I get just one email per recipient.
I checked the code and the headers, there is really only one recipient in the $to field.
Tested with Windows and Ubuntu and with gmail and my local ISP.
Please check the sabnzbd.ini file, it should contain something like this:
email_to =
[email protected],
[email protected]
Re: Duplicate Emails (but only with multiple recipients)
Posted: April 26th, 2011, 6:45 pm
by rembo10
I have a pretty basic set up. I'm on OS X if it makes a difference. I think what it might be doing is using the whole email address field as the $to variable within the email, and sends a new/separate email for each email address listed. I tried it with 3 emails addresses to check this, and each account receives 3 email alerts (using the default template). I haven't really seen anything about this so maybe it just happens on the Mac version?
I'd be happy to test anything else out, just lemme know what to do
Re: Duplicate Emails (but only with multiple recipients)
Posted: April 27th, 2011, 12:11 am
by sander
shypike wrote:
I have no idea what you are doing with the email, but I cannot get it to fail.
For two recipients I get just one email per recipient.
I checked the code and the headers, there is really only one recipient in the $to field.
Tested with Windows and Ubuntu and with gmail and my local ISP.
Please check the sabnzbd.ini file, it should contain something like this:
email_to =
[email protected],
[email protected]
I checked once more:
with two mail addresses with different domains, I get four mails.
with the same domain, I get two mails. (but that might be also caused the mailbox de-duplicating mails?)
email_to =
[email protected],
[email protected]
See screendump for dupe mails.
Re: Duplicate Emails (but only with multiple recipients)
Posted: April 27th, 2011, 12:20 am
by sander
... and the wireshark screendump: two SMTP sessions, each with two RCPT TO's...
However, the most interesting line could be
91 10.302784 195.241.79.132 192.168.178.32 SMTP S: 554 SMTP synchronization error
So the SMTP server is reporting an error, and SAB tries again? That could be the cause of the double mails.
Re: Duplicate Emails (but only with multiple recipients)
Posted: April 27th, 2011, 12:21 am
by sander
screendump