Duplicate Emails with multiple recipients

Report & discuss bugs found in SABnzbd
Forum rules
Help us help you:
  • Are you using the latest stable version of SABnzbd? Downloads page.
  • 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.
Post Reply
jag111
Newbie
Newbie
Posts: 2
Joined: June 24th, 2011, 5:00 pm

Duplicate Emails with multiple recipients

Post by jag111 »

Version: 0.6.5 (and 0.6.2 previously)
OS: Windows Server 2008 R2
Install-type: Windows Installer running as a windows service
Firewall Software: Windows Firewall
Are you using IPV6? No
Is the issue reproducible? Yes

This issue appears to have been reported during the 0.6 beta, but it doesn't look like it was resolved.  The thread is here: http://forums.sabnzbd.org/index.php?topic=6990.0

When specifying multiple addresses for "Email Recipient" in the Email Notification section, each recipient appears to get multiple copies of the email for however many total recipients are specified.  So if there are two comma separated addresses, each recipient gets two emails.  The To: fields in the emails appear to be correct (one addressed to each recipient), but both recipients get both copies of the email.  I'm not using any custom email templates and the "Email Templates Folder" value is empty.

The issue started when we upgraded from 0.5.6 to 0.6.2.  It has persisted through 0.6.5.  We're using authenticated Gmail as the SMTP server (smtp.gmail.com:587).  It happens both for normal Email notifications and using the "Test E-Mail" function.  The SABnzbd log file contains the following when sending a test email:

2011-06-24 15:29:15,144::INFO::[interface:2492] Sending testmail
2011-06-24 15:29:15,145::DEBUG::[emailer:59] Connecting to server smtp.gmail.com:587
2011-06-24 15:29:15,207::DEBUG::[emailer:72] Non-SSL mail server detected reconnecting to server smtp.gmail.com:587
2011-06-24 15:29:15,296::DEBUG::[emailer:86] TLS mail server detected
2011-06-24 15:29:16,914::INFO::[emailer:123] Notification e-mail succesfully sent
2011-06-24 15:29:16,917::DEBUG::[emailer:59] Connecting to server smtp.gmail.com:587
2011-06-24 15:29:16,976::DEBUG::[emailer:72] Non-SSL mail server detected reconnecting to server smtp.gmail.com:587
2011-06-24 15:29:17,063::DEBUG::[emailer:86] TLS mail server detected
2011-06-24 15:29:18,655::INFO::[emailer:123] Notification e-mail succesfully sent

It definitely appears to be something funky happening with the email headers.  Only two emails appear to be getting sent.  But it's like each recipient is BCC'd on each email.
User avatar
shypike
Administrator
Administrator
Posts: 19773
Joined: January 18th, 2008, 12:49 pm

Re: Duplicate Emails with multiple recipients

Post by shypike »

Nobody in the team was able to reproduce the problem.
That makes it impossible to solve.
We still don't have a clue about what's going on.
I'll have another look and follow your BCC hint.
jag111
Newbie
Newbie
Posts: 2
Joined: June 24th, 2011, 5:00 pm

Re: Duplicate Emails with multiple recipients

Post by jag111 »

Yeah, I understand how unreproducible problems are hard to solve.  And ultimately this is more of an annoyance than a super critical bug.  I just wanted to keep the issue open and add my name to the seemingly short list of people affected.
User avatar
shypike
Administrator
Administrator
Posts: 19773
Joined: January 18th, 2008, 12:49 pm

Re: Duplicate Emails with multiple recipients

Post by shypike »

jag111 wrote: this is more of an annoyance
You're right that it's an annoyance.
Also for us. We actually believe people who claim this issue.
It's very frustrating when one cannot reproduce it.
Especially since I use the same setup with gmail.
User avatar
zoggy
Release Testers
Release Testers
Posts: 89
Joined: February 8th, 2011, 3:08 pm

Re: Duplicate Emails with multiple recipients

Post by zoggy »

shypike wrote:
jag111 wrote: this is more of an annoyance
You're right that it's an annoyance.
Also for us. We actually believe people who claim this issue.
It's very frustrating when one cannot reproduce it.
Especially since I use the same setup with gmail.
my coworker is having this problem, he showed it to me tonight. I can provide you his sab ini / whatever you need to test. he is having gmail send out notices to 2 email addresses... both people get 2 emails... hit me up on irc and i can give you more details. I just entered in the info and tested it out myself.. I get 2 emails myself now.
User avatar
shypike
Administrator
Administrator
Posts: 19773
Joined: January 18th, 2008, 12:49 pm

Re: Duplicate Emails with multiple recipients

Post by shypike »

I have looked at this before.
What ever I tried, I couldn't get gmail to send duplicate emails.
Even Wireshark transcripts did not shed any light on it.
You can send the INI file (remove passwords!) and also the used email templates to bugs at sabnzbd.org
User avatar
zoggy
Release Testers
Release Testers
Posts: 89
Joined: February 8th, 2011, 3:08 pm

Re: Duplicate Emails with multiple recipients

Post by zoggy »

just emailed over my config. when my coworker gets in i'll have him send over his.
viama
Newbie
Newbie
Posts: 1
Joined: July 11th, 2011, 9:41 am

Re: Duplicate Emails with multiple recipients

Post by viama »

I am also experiencing this issue with duplicate mail using gmail smtp. I am using the stock templates.
User avatar
shypike
Administrator
Administrator
Posts: 19773
Joined: January 18th, 2008, 12:49 pm

Re: Duplicate Emails with multiple recipients

Post by shypike »

I can confirm that something odd is going on.
It will take some time to examine it properly.
User avatar
shypike
Administrator
Administrator
Posts: 19773
Joined: January 18th, 2008, 12:49 pm

Re: Duplicate Emails with multiple recipients

Post by shypike »

Nothing "odd" is going on, just a plain dumb-ass error in SABnzbd's emailing code.
SABnzbd sends an email in a separate session to each recipient, but the "to" address is always the full list of recipients.
So the email server dutifully sends the email twice to both recipients.

When testing this bug was masked because I have auto-forwarding on for almost all of my accounts.
Gmail helpfully recognizes two identical messages (the real duplicate and the forwarded copy) and shows only one.

Will be fixed in the next 0.6.6 Beta.
There's no work-around.
Post Reply