SSMTP works on CLI but not in ZM

Forum for questions and support relating to the 1.34.x releases only.
Post Reply
1oldgeek
Posts: 3
Joined: Fri Mar 26, 2021 6:03 pm
Location: Foley, AL

SSMTP works on CLI but not in ZM

Post by 1oldgeek »

New to board but not Zoneminder
New install of 1.34.23 on Centos 7 running in a VM on Proxmox. SSMTP works from command line and events are logged in maillog. Using Gmail as account. Zoneminder only shows "Notification email sent" in all it's logging. I even used debug level of 3 but only "Notification email sent" ( and way too much other info LOL ). Nothing shows in maillog from Zoneminder though. Any advice on debugging would be most welcome.
User avatar
knight-of-ni
Posts: 2404
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: SSMTP works on CLI but not in ZM

Post by knight-of-ni »

When testing from the command line, you have to test as the web account user, which in your case is apache. Did you do you that?

It's been years since I set up email on CentOS 7, but I do recall I had to remove a package, sendmail I think, in order to get it to work. Installing SSMTP and configuring it per the zoneminder wiki was not sufficient. From the logs I could see that the operating system was still trying to use sendmail. It's been too long to recall any further details... try searching the forums for other centos users with the same issue.
Visit my blog for ZoneMinder related projects using the Raspberry Pi, Orange Pi, Odroid, and the ESP8266
All of these can be found at https://zoneminder.blogspot.com/
1oldgeek
Posts: 3
Joined: Fri Mar 26, 2021 6:03 pm
Location: Foley, AL

Re: SSMTP works on CLI but not in ZM

Post by 1oldgeek »

Thx for reply. I did test as apache user. I also made a simple php file using the php mail cmd (IE: $send = mail('HIDDEN@gmail.com','My subject',$msg);" and that works fine and transactions show in maillog. ZM still saying notification sent but nothing in maillog. Short of ripping zm code apart, is there a log level in zm that might show more pertinent info?
User avatar
bkjaya1952
Posts: 282
Joined: Sat Aug 25, 2018 3:24 pm
Location: Sri Lanka

Re: SSMTP works on CLI but not in ZM

Post by bkjaya1952 »

Please try MSMTP instead of SSMTP.

For details on installation please refer:-

https://bkjaya.wordpress.com/2019/10/21 ... ntu-19-04/
User avatar
knight-of-ni
Posts: 2404
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: SSMTP works on CLI but not in ZM

Post by knight-of-ni »

1oldgeek wrote: Sat Mar 27, 2021 5:38 pm Thx for reply. I did test as apache user. I also made a simple php file using the php mail cmd (IE: $send = mail('HIDDEN@gmail.com','My subject',$msg);" and that works fine and transactions show in maillog. ZM still saying notification sent but nothing in maillog. Short of ripping zm code apart, is there a log level in zm that might show more pertinent info?
CentOS wants to keep using sendmail despite configuring SSMTP. I could see this in the system log at the time.
Simplest thing to do is to remove sendmail package, then it will start using SSMTP.
Visit my blog for ZoneMinder related projects using the Raspberry Pi, Orange Pi, Odroid, and the ESP8266
All of these can be found at https://zoneminder.blogspot.com/
1oldgeek
Posts: 3
Joined: Fri Mar 26, 2021 6:03 pm
Location: Foley, AL

Re: SSMTP works on CLI but not in ZM

Post by 1oldgeek »

Actually it was my own stupidity. I had issues with ssmtp with TLS so I tried postfix ( couldn't get auth to work ) went back to ssmtp and forgot to recheck NEW_MAIL_MODULES. Retired 8 mths ago as IT Director and I guess I retired my brain as well.
Post Reply