email fails 'Must issue a STARTTLS command first'

Forum for questions and support relating to the 1.25.x releases only.
Locked
rockets
Posts: 10
Joined: Thu Nov 29, 2012 12:55 am

email fails 'Must issue a STARTTLS command first'

Post by rockets »

I am using ssmtp for the simplest mail agent I could find. I set it up and can send mail from the terminal. I also get cron messages from zm.

I searched this forum and 'google' and could not determine how to approach this problem. It appears to be related to the perl script used by zm, but I don't have the ability to troubleshoot or modify the script.

When I trigger an event tru the zm filter for email I get the following log messages:

Code: Select all

 	Component 	PID 	Level 	Message 	File 	Line
2012-12-11 13:55:03.179970	zmfilter	887	ERR	Can't send email: SMTP mail() command failed: 5.7.0 Must issue a STARTTLS command first. p17sm29432135anh.12	zmfilter.pl	
2012-12-11 13:55:03.061200	zmfilter	887	INF	Sending notification email 'ZoneMinder: Alarm - ptcam-2-1633 (255 - 255 19)'	zmfilter.pl	
2012-12-11 13:55:01.589110	zmfilter	887	INF	Creating notification email	zmfilter.pl	
2012-12-11 13:55:01.416240	zmfilter	887	INF	Archiving event 1633	zmfilter.pl	
Any and all help will be appreciated....dan

EDIT: The above problem occurs with the isp (google) smtp server on the zm>options>email>(third line from bottom).

When I change that line back to "localhost" the following error occurs:

Code: Select all

Can't send email: SMTP Failed to connect to mail server: Connection refused at /usr/bin/zmfilter.pl line 1004
Will try to look at that, but do not know how to change....dan
rockets
Posts: 10
Joined: Thu Nov 29, 2012 12:55 am

Re: email fails 'Must issue a STARTTLS command first'

Post by rockets »

Still not working....

Edited ssmtp.conf to use TLS only...commented out line ref to STARTTLS. Now zm thinks its sent email but google mail don't get anything....

Need guidance to find zm failure...

Code: Select all

2012-12-14 05:54:50.176660	zmfilter	7377	INF	Notification email sent	zmfilter.pl	
2012-12-14 05:54:49.910030	zmfilter	7377	INF	Sending notification email 'ZoneMinder: Alarm - ptcam-2-1960 (255 - 255 135)'	zmfilter.pl	
2012-12-14 05:54:49.908100	zmfilter	7377	INF	Creating notification email	zmfilter.pl	
2012-12-14 05:54:49.905460	zmfilter	7377	INF	Archiving event 1960	zmfilter.pl	
2012-12-14 05:43:49.724040	zmfilter	7377	INF	Notification email sent	zmfilter.pl	
2012-12-14 05:43:44.124690	zmfilter	7377	INF	Sending notification email 'ZoneMinder: Alarm - ptcam-2-1959 (255 - 255 109)'	zmfilter.pl	
2012-12-14 05:43:44.115500	zmfilter	7377	INF	Creating notification email	zmfilter.pl	
2012-12-14 05:43:41.731240	zmfilter	7377	INF	Archiving event 1959	zmfilter.pl	
2012-12-14 05:43:36.716500	zmfilter	7377	INF	Scanning for events	zmfilter.pl	
2012-12-14 05:41:59.396110	zmfilter	6907	ERR	Can't send email: SMTP mail() command failed: 5.7.0 Must issue a STARTTLS command first. v8sm4259765yhi.15	zmfilter.pl	
2012-12-14 05:41:59.269610	zmfilter	6907	INF	Sending notification email 'ZoneMinder: Alarm - ptcam-2-1959 (255 - 255 109)'	zmfilter.pl	
2012-12-14 05:41:59.268050	zmfilter	6907	INF	Creating notification email	zmfilter.pl	
2012-12-14 05:41:59.265490	zmfilter	6907	INF	Archiving event 1959
rockets
Posts: 10
Joined: Thu Nov 29, 2012 12:55 am

Re: email fails 'Must issue a STARTTLS command first'

Post by rockets »

My bad !!!! after restart, the same response is back.... Looks like zmfilter is corrupt or just don't work with ssmtp.
zeke2135
Posts: 3
Joined: Sun Apr 14, 2013 8:23 pm

Re: email fails 'Must issue a STARTTLS command first'

Post by zeke2135 »

I don't know if you're still interested in this subject. I found out how to get email alerts to work w/ localhost and the NEWER_MAIL_MODULES option. Basically there is one line that needs to be commented out in zmfilter.pl. It is shown below. You would probably want to uncomment the line if you're using an external smtp server, but it looks like it would not work w/ one that would require authentication.

Code: Select all

               
    {
        if ( ZM_NEW_MAIL_MODULES )
        {

 ...

            ### Send the Message
            # the next line appears to be for systems w/o sendmail. See docs for MIME::Lite.
            # If localhost is used and has sendmail, it is not necessary and does not work.
            # Either nullmailer or ssmtp should work without it. Tested w/ nullmailer 4/14/2013
#            MIME::Lite->send( "smtp", ZM_EMAIL_HOST, Timeout=>60 );
            $mail->send();
        }
Locked