Page 1 of 1

Completed email broken after update but test email still wor

Posted: September 23rd, 2012, 2:05 pm
by juliushibert
I've just started noticing in my SAB instillation that upon job completion no email notifications are being sent out. I'm running 0.7.3 on Ubuntu 12.04. All I can think of is that I've recently updated SAB via apt-get and this problem has started occurring.

Oddly, when I go into settings and click "Test Email" the email is sent successfully and I receive it in my inbox as expected. I also have a script that runs when my SAB queue complete which suspends the machine. It's a bash script which use sendmail to also send me an email (using the same details as I have in the Config >Notifications of SAB) to say the machine is about to suspend.

Any one got any ideas why the "Test Email" is working but SAB isn't sending out email notifications on completion of each job in the queue?

TIA

Re: Completed email broken after update but test email still

Posted: September 23rd, 2012, 4:34 pm
by shypike
Did you enabke email ande did not set it to just email-on-error?

Re: Completed email broken after update but test email still

Posted: September 25th, 2012, 3:49 am
by juliushibert
Email is enable and set to "Always" on Job Completion. So it should email when there's errors and when the job completes successfully. I've also got it set to email on Disk Full.

Re: Completed email broken after update but test email still

Posted: September 25th, 2012, 9:39 am
by shypike
Do you see any email activity in the log file?
You may need to enable "Debug" level on the Status page.

Re: Completed email broken after update but test email still

Posted: September 27th, 2012, 9:52 am
by juliushibert
I set my loglevel to Debug and have put a job through in my queue.

In the log it looks like email notifications are working successfully with no errors. Here's the excerpt right after the job finishes running the postproc script.

Code: Select all

2012-09-27 12:13:44,679::DEBUG::[emailer:59] Connecting to server smtp.gmail.com:25
2012-09-27 12:13:44,827::DEBUG::[emailer:72] Non-SSL mail server detected reconnecting to server smtp.gmail.com:25
2012-09-27 12:13:44,911::DEBUG::[emailer:86] TLS mail server detected
2012-09-27 12:13:47,570::INFO::[emailer:123] Notification e-mail succesfully sent

Re: Completed email broken after update but test email still

Posted: September 27th, 2012, 11:54 am
by shypike
Email servers may still refuse to route the emails properly...
Try to use the actual owner of the email account as the sender.

Re: Completed email broken after update but test email still

Posted: September 27th, 2012, 3:41 pm
by juliushibert
I'm a little confused by what you mean by your response. The sender of the email in SAB is the same email address as the account login details for the email accounting being used. Plus if the server was rejecting the email address then I'd have thought that the 'Test Email' button in SAB would fail. Which it doesn't

Re: Completed email broken after update but test email still

Posted: September 27th, 2012, 3:47 pm
by shypike
Well, SABnzbd is only getting good news from the email provider.
It doesn't send back error messages, so what can I say?

Re: Completed email broken after update but test email still

Posted: October 1st, 2012, 5:57 am
by juliushibert
shypike wrote:Well, SABnzbd is only getting good news from the email provider.
It doesn't send back error messages, so what can I say?
Apologies.... I didn't mean to be confrontational.

By pure accident I noticed this morning that SAB does send out email notification of a job finishing status when I have my custom script turned off. Don't know if this helps any further. FYI the custom script is just a bash script that basically sends out an email using sendmail and also puts the Linux machine to sleep with pm-suspend. I've tried using the built in Standby Script in SAB for when the queue finishes but have never been able to get it to work correctly.

Re: Completed email broken after update but test email still

Posted: October 1st, 2012, 9:55 am
by shypike
juliushibert wrote: Apologies.... I didn't mean to be confrontational.
No problem, I wasn't insulted or anything ;)
It was just expressing that I have no diagnostic options when the email server
basically says that all is OK.

Your further observation could mean that the output of your custom script is problematic.
SABnzbd adds the output of your script to the email.
It assumes that this output consists of "email"-able text.
If not, then possibly your email provider may choke on it.
Have you looked at this output (retrievable from the History entry)?

Re: Completed email broken after update but test email still

Posted: October 14th, 2012, 8:37 am
by juliushibert
So I managed to work out what was the problem.... Gmail was thinking that certain SAB emails were spam!

Boy do I feel like an idiot now!

Thank's for your patients and help none the less shypike!

Re: Completed email broken after update but test email still

Posted: October 15th, 2012, 1:00 am
by shypike
Ahum, I didn't think about it before, but our Wiki says about gmail:
Email sender || you@gmail.com || This can be a fake address, but you will have to put it in your Gmail contact list, otherwise Google will think you are sending spam.
Was that the cause?

Re: Completed email broken after update but test email still

Posted: October 15th, 2012, 3:08 am
by juliushibert
shypike wrote:Ahum, I didn't think about it before, but our Wiki says about gmail:
Email sender || you@gmail.com || This can be a fake address, but you will have to put it in your Gmail contact list, otherwise Google will think you are sending spam.
Was that the cause?
It's hard to say what the cause was. I guess either Gmail trying to be smart or human error and me accidentally hitting the spam button on Gmail or in the Gmail iPhone app and I just didn't notice at the time.

The machine had been running SAB for months before hand and I'd received plenty of confirmation of completion emails.

At least it's now fixed and working as intended. Thanks again!