Duplicate Emails (but only with multiple recipients)

Questions and bug reports for Beta releases should be posted here.
Forum rules
Help us help you:
  • Tell us what system you run SABnzbd on.
  • Adhere to the forum rules.
  • Do you experience problems during downloading?
    Check your connection in Status and Interface settings window.
    Use Test Server in Config > Servers.
    We will probably ask you to do a test using only basic settings.
  • Do you experience problems during repair or unpacking?
    Enable +Debug logging in the Status and Interface settings window and share the relevant parts of the log here using [ code ] sections.
rembo10
Jr. Member
Jr. Member
Posts: 56
Joined: April 26th, 2011, 2:29 am

Duplicate Emails (but only with multiple recipients)

Post 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
rembo10
Jr. Member
Jr. Member
Posts: 56
Joined: April 26th, 2011, 2:29 am

Re: Duplicate Emails (but only with multiple recipients)

Post by rembo10 »

Just tried with gmail smtp, same problem.
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: Duplicate Emails (but only with multiple recipients)

Post by shypike »

Are you using the original email templates or do you use your own?
rembo10
Jr. Member
Jr. Member
Posts: 56
Joined: April 26th, 2011, 2:29 am

Re: Duplicate Emails (but only with multiple recipients)

Post 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 :-)
User avatar
sander
Release Testers
Release Testers
Posts: 9033
Joined: January 22nd, 2008, 2:22 pm

Re: Duplicate Emails (but only with multiple recipients)

Post by sander »

Last edited by sander on April 26th, 2011, 7:39 am, edited 1 time in total.
If you like our support, check our special newsserver deal or donate at: https://sabnzbd.org/donate
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: Duplicate Emails (but only with multiple recipients)

Post by shypike »

I cannot check right now, but at least remove the '' signs.
They are not needed and may cause side-effects.
User avatar
sander
Release Testers
Release Testers
Posts: 9033
Joined: January 22nd, 2008, 2:22 pm

Re: Duplicate Emails (but only with multiple recipients)

Post 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)
If you like our support, check our special newsserver deal or donate at: https://sabnzbd.org/donate
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: Duplicate Emails (but only with multiple recipients)

Post 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.
rembo10
Jr. Member
Jr. Member
Posts: 56
Joined: April 26th, 2011, 2:29 am

Re: Duplicate Emails (but only with multiple recipients)

Post 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?
rembo10
Jr. Member
Jr. Member
Posts: 56
Joined: April 26th, 2011, 2:29 am

Re: Duplicate Emails (but only with multiple recipients)

Post 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.
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: Duplicate Emails (but only with multiple recipients)

Post 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]
rembo10
Jr. Member
Jr. Member
Posts: 56
Joined: April 26th, 2011, 2:29 am

Re: Duplicate Emails (but only with multiple recipients)

Post 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
User avatar
sander
Release Testers
Release Testers
Posts: 9033
Joined: January 22nd, 2008, 2:22 pm

Re: Duplicate Emails (but only with multiple recipients)

Post 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.


 
If you like our support, check our special newsserver deal or donate at: https://sabnzbd.org/donate
User avatar
sander
Release Testers
Release Testers
Posts: 9033
Joined: January 22nd, 2008, 2:22 pm

Re: Duplicate Emails (but only with multiple recipients)

Post 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.
If you like our support, check our special newsserver deal or donate at: https://sabnzbd.org/donate
User avatar
sander
Release Testers
Release Testers
Posts: 9033
Joined: January 22nd, 2008, 2:22 pm

Re: Duplicate Emails (but only with multiple recipients)

Post by sander »

screendump
If you like our support, check our special newsserver deal or donate at: https://sabnzbd.org/donate
Post Reply