Email not working?


 

RalphTrimble

TVWBB Diamond Member
So far I haven't used email/alarms with my HeaterMeter, but with the recent update to the alarms config I thought I would give them a try. Unfortunately they don't seem to be working for me....

I've gone into the network diagnostics section and Ping, TraceRoute and NSLookup work just fine, and when I put the name of my SMTP server into the NSLookup it returns the IP address as well. I know my credentials are proper for the SMTP server.

Since I had the LAN and WIFI both set to static IP initially I changed the LAN over to DHCP and booted up without a LAN cable connected to be sure the WIFI was the only connection available. No email.

I powered down the HM, removed the WIFI adaptor, then powered back up with a LAN cable connected and waited for the DHCP IP to show (which it did). I logged in and did an alarm test email again, no dice still.

I took a look at the system log and I see "Alarm 0L started ringing" but that's it. The email is never delivered?

I don't know what could be wrong? HELP! LOL
 
Post the alarm portion of you log. Who is you email provider? I had trouble with the standard Gmail SMTP ports and landed on a TLS specific port that worked once the correct options were set in the SMTP setups.
 
I just took a fresh SD card, wrote the HMv10 image to it, booted the HM from this card for a fresh start.
I set the basic settings and at least it is showing in the SystemLog that it is trying to send the email, and reporting some errors that I am going to investigate further. This is different behavior than before, so hopefully I will be able to work it out, if not I will post back more details. Thanks for your reply and suggestions....
 
OK, still not working, but i've got an error message.....

errormsg='cannot use a secure authentication method' exitcode=EX_UNAVAILABLE

On my regular email client I use the same SMTP server, the same user/pass, and the "Requires Authentication" option, but I do NOT use the "Log in using Secure Password Authentication" option. On the HM I do not see the option to enable/disable "Secure Password Authentication"??? I think if I could disable the "SECURE" password authentication it would work....
 
MSMTP doesn't have support for SPA that I know of anyway. You can ssh in and do a `msmtp --serverinfo` and post the results here and maybe we help you check the right boxes.
 
Here is what is returned..... Says PLAIN LOGIN for Auth Method. Don't know where SPA is coming from, I had assumed it was from the HM system?

root@OpenWrt:~# msmtp --serverinfo
SMTP server at smtp.covad.net (mail.carrierinternetsolutions.com [69.49.109.11]), port 25:
mail110c8.megamailservers.com ESMTP Sendmail 8.13.6/8.13.1; Wed, 9 Oct 2013 19:25:10 +0000
Capabilities:
SIZE 52428800:
Maximum message size is 52428800 bytes = 50.00 MiB
DSN:
Support for Delivery Status Notifications
STARTTLS:
Support for TLS encryption via the STARTTLS command
AUTH:
Supported authentication methods:
PLAIN LOGIN
This server might advertise more or other capabilities when TLS is active.
root@OpenWrt:~#
 
Just to confirm....

Email Alarm working great now!

SMS Alarm text working on my TracFone using the AT&T Gateway

Awesome!

Thanks Bryan!
 
OK. seems to be working now....

I had to check:

Enable TLS

and

Use StartTLS



I have tried to click these two commands on mine and even did a winscp and putty and still not clicked. I click them and then Try to save and every time the web page locks up and I have to restart the browser(EI or Firefox).
 
I have tried to click these two commands on mine and even did a winscp and putty and still not clicked. I click them and then Try to save and every time the web page locks up and I have to restart the browser(EI or Firefox).

Well, what you click for your smtp server and I click for mine may be different.... or the same... but locking up isn't normal. I actually had another problem with the mail config I didn't post about, for some reason there was an error on the SMTP page (which the HM warned me about at the top of the page) and it wouldn't let me alter any of the settings. I ended up using diskimager to write the most recent release to the SD card fresh and after that those problems went away and I was able to puzzle through the SMTP setup and arrive at the answer I posted above....

Perhaps you should re-image your SD card fresh and try again?
 
I figured it out. I can now Email and receive sms messages

In Winscp I have to turn off "Look up user Groups"

Advance options on
SCP/Shell>Other options

After I did that I longer received the errors when I tried to edit the file needed to turn on the two settings(Enable TLS, Use StartTLS) that were needed for Gmail.
 
I need some help just updated to the latest version and the HM wont send an email out when the alarms are triggered.
I have tried every possible possibility i think with the options as far as setting up the smtp client.

Here is the log the it kicks out

Oct 29 05:41:36 OpenWrt user.notice lmalarm: sendmail: cannot locate host smtp.live.com: Name or service not known
Oct 29 05:41:36 OpenWrt user.notice lmalarm: sendmail: could not send mail (account default from /etc/msmtprc)
Oct 29 05:41:36 OpenWrt mail.err msmtp: host=smtp.live.com tls=on auth=on user=xxxxxxxx@msn.com from=xxxxxxxxxx@tmomail.net recipients=xxxxxxxxxx@tmomail.net errormsg='cannot locate host smtp.live.com: Name or service not known' exitcode=EX_NOHOST
Oct 29 05:41:39 OpenWrt user.warn lucid[564]: Alarm stopped

any help would be great!!
 
Last edited:
For some reason it can't find the host smtp.live.com, as in the DNS lookup is failing. I don't know what you can check though to fix that though. Check to make sure there's a gateway and DNS information listed on the Status > Overview page under the Network section. You can also log in over SSH and try to ping smtp.live.com.
 
I just checked looked and there is no connections in that network section... i do have a static ip set at 192.168.1.18
 
Last edited:
If you've given it a static IP, does it have a valid gateway and DNS? Check Network -> Interfaces -> (interface you're connecting through). If you're set to "static address" then all the boxes need to be filled in.

If they are, try pinging your gateway from the LinkMeter. If that works, ping an IP on the other side of your gateway. If that works try pinging a name on the other side of your gateway.
 
ops i forgot about the other two fields... is the "Use custom DNS servers" supposed to be filled in also? i so I'm not sure what... ok I filled in the gateway and the broadcast fields. now the network is showing up but still no active connections. and still no emails going out... i can ping my pc ip and that is ok but the the gateway ip comes back as 100% loss
 
Last edited:
Ok i figured out my problem. The IPv4-Address was not registering on the network wifi page so i made a new Static Leases on the DHCP and DNS page. and it did the trick. All is working great now thanks again for all the help and great knowledge on this great forum!!
 
Hey guys I have a problem with my email. I had to reset my heatermeter and I had it working previously. This is the errors in the log:

Dec 19 14:30:25 OpenWrt mail.err msmtp: host=smtp.gmail.com tls=on auth=on user=XXXXXXXXX@gmail.com from=XXXXXXXXXX@vtext.com recipients=XXXXXXXXXX@vtext.com errormsg='the server sent an empty reply' exitcode=EX_PROTOCOL
Dec 19 14:30:25 OpenWrt user.notice lmalarm: sendmail: the server sent an empty reply
Dec 19 14:30:25 OpenWrt user.notice lmalarm: sendmail: could not send mail (account default from /etc/msmtprc)
 
Ok so I edited the file manually and now it seems to work. Also I had port 465 for gmail but the one example I saw said 587 so I switched to that and it seems to work well now! Thanks.
 
If you use 465, it should be tls_starttls=off. If you use 587 it should be tls_starttls=on.

I didn't realize gmail now supported 587 but if you just changed the port number, the issue was that "start tls" was set incorrectly.
 

 

Back
Top