E-mail and Text


 

Chris D Norton

TVWBB Member
I had the configuration down and nothing has changed but I keep getting errors to send an alert to my e-mail and phone.


Any one else having issues?

My settings are correct I think. I wonder if Gmail has tightened up their security with this.

I have use less secure apps selected on their Account Profile page.
 
Tue Jul 11 16:26:11 2017 daemon.err uhttpd[381]: wc: /proc/net/nf_conntrack: No such file or directory
Tue Jul 11 16:26:11 2017 daemon.err uhttpd[381]: sysctl: error: 'net.nf_conntrack_max' is an unknown key
Tue Jul 11 16:26:16 2017 user.warn : Alarm 0H started ringing
Tue Jul 11 16:26:16 2017 user.warn : Alarm stopped
Tue Jul 11 16:26:16 2017 user.notice lmalarm: Sending email from HeaterMeter <chris8837@gmail.com> to Chris <chris8837@gmail.com>
Tue Jul 11 16:26:16 2017 user.notice lmalarm: sendmail: cannot connect to smtp.gmail.com, port 587: Permission denied
Tue Jul 11 16:26:16 2017 user.notice lmalarm: sendmail: could not send mail (account default from /etc/msmtprc)
Tue Jul 11 16:26:16 2017 mail.err msmtp: host=smtp.gmail.com tls=on auth=on user=chris8837@gmail.com from=chris8837@gmail.com recipients=chris8837@gmail.com errormsg='cannot connect to smtp.gmail.com, port 587: Permission denied' exitcode=EX_TEMPFAIL
Tue Jul 11 16:26:16 2017 user.notice lmalarm: Sending SMS to XXXXXXXXX@txt.att.net
Tue Jul 11 16:26:16 2017 user.notice lmalarm: sendmail: cannot connect to smtp.gmail.com, port 587: Permission denied
Tue Jul 11 16:26:16 2017 user.notice lmalarm: sendmail: could not send mail (account default from /etc/msmtprc)
Tue Jul 11 16:26:16 2017 mail.err msmtp: host=smtp.gmail.com tls=on auth=on user=chris8837@gmail.com from=chris8837@gmail.com recipients=XXXXXXXXX@txt.att.net errormsg='cannot connect to smtp.gmail.com, port 587: Permission denied' exitcode=EX_TEMPFAIL
 
The "cannot connect to smtp.gmail.com, port 587: Permission denied" is odd. It's possible that your ISP could be blocking port 587, but I'd be surprised.

Try changing the port to 465 and see if works.
 
Thu Oct 19 19:55:12 2017 user.warn : Alarm 0H started ringing
Thu Oct 19 19:55:12 2017 user.warn : Alarm stopped
Thu Oct 19 19:55:12 2017 user.notice lmalarm: Sending email from HeaterMeter <chris8837@gmail.com> to Chris <chris8837@gmail.com>
Thu Oct 19 19:55:12 2017 user.notice lmalarm: sendmail: cannot connect to smtp.gmail.com, port 465: Permission denied
Thu Oct 19 19:55:12 2017 user.notice lmalarm: sendmail: could not send mail (account default from /etc/msmtprc)
Thu Oct 19 19:55:12 2017 mail.err msmtp: host=smtp.gmail.com tls=on auth=on user=chris8837@gmail.com from=chris8837@gmail.com recipients=chris8837@gmail.com errormsg='cannot connect to smtp.gmail.com, port 465: Permission denied' exitcode=EX_TEMPFAIL

Just pulled the SD card and reflashed the firmware from scratch.
Tried 465 and I posted the Log
 
I have no idea what could cause that, I mean where would a "Permission denied" error come from in connecting? The man page for connect() says you can only get EACCES connecting to a UNIX socket.

I just tried with the default heatermeter.com credentials on port 587 sending to a gmail account, worked fine.
Changed the host to smtp.gmail.com, I get a proper SMTP error code '535-5.7.8 Username and Password not accepted...', not permission denied error.

You can try sending a test with the default credentials to see if it is blocked too, which would indicate the ISP blocking maybe?
 
I'm not sure if I have the same problem, as I have not checked the logs, but I too can not get email or text working..

Comcast internet
 
FWIW, if you're forwarding outbound email through your ISP, you may have some funny issues to work through. If I set my return address to anything but my ISP's domain (but still a valid email address domain,) the pages get silently dropped. One of these days I may need to tinker with using Google's outbound SMTP gateway as my general purpose smart mail handler. That may become academic, as I'm really hoping to switch ISPs at home fairly soon (symmetric 100mbps fiber to the house.)

Edit: Empirically, this appears to only be an issue with text messages to my phone, and I see all messages in my SMTP service logs.

One other thing to be aware of. Some systems, such as AT&T Cellular, will silently drop SMS messages sent from an email domain that fails to resolve, such as john.q.public@donotreply.com.
 
Last edited:
ssh into your heatermeter and run this command to see if it works.

Code:
echo test | msmtp chris8837@gmail.com
 
Wed Nov 1 22:45:53 2017 user.warn : Alarm 0H started ringing
Wed Nov 1 22:45:53 2017 user.warn : Alarm stopped
Wed Nov 1 22:45:53 2017 user.notice lmalarm: Sending email from HeaterMeter <chris8837@gmail.com> to Chris <chris8837@gmail.com>
Wed Nov 1 22:45:56 2017 mail.info msmtp: host=smtp.gmail.com tls=on auth=on user=chris8837@gmail.com from=chris8837@gmail.com recipients=chris8837@gmail.com mailsize=347 smtpstatus=250 smtpmsg='250 2.0.0 OK 1509576355 l1sm2515489pff.77 - gsmtp' exitcode=EX_OK

Just checked again today and it worked!!

I did nothing different. I'm using 465, but both the e-mail and text work. Must have been an off day or something.
 

 

Back
Top