Page 1 of 1
SSMTP works on CLI but not in ZM
Posted: Fri Mar 26, 2021 6:19 pm
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.
Re: SSMTP works on CLI but not in ZM
Posted: Sat Mar 27, 2021 12:52 pm
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.
Re: SSMTP works on CLI but not in ZM
Posted: Sat Mar 27, 2021 5:38 pm
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?
Re: SSMTP works on CLI but not in ZM
Posted: Mon Mar 29, 2021 7:17 am
by bkjaya1952
Please try MSMTP instead of SSMTP.
For details on installation please refer:-
https://bkjaya.wordpress.com/2019/10/21 ... ntu-19-04/
Re: SSMTP works on CLI but not in ZM
Posted: Mon Mar 29, 2021 2:37 pm
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.
Re: SSMTP works on CLI but not in ZM
Posted: Mon Mar 29, 2021 3:53 pm
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.