echo "hello there username." | msmtp -a default buddy123@gmail.com
freezes in OpenWRT console until I Ctrl+C
Here is my /etc/msmtprc
account default
host smtp.mymail.com
port 465
from openwrt_friend@mymail.com
auth on
user openwrt_friend@mymail.com
password mysecurepassword
#tls on
#tls_starttls on
There is something wrong with my config or I need to obtain TLS-certificate? may pe most modern mail servers do not receive mail without certificates?
As far as I understand guy from topic changed his smtp server. It is not my case unfortunately.
It seems that msmtp freezes even before it can write any log file. Because I changed port to 25 and received message in log file that "25 Port authentication is not supported" or something like that. In other cases there is no logs at all.
servers are supposed to have certificates in order to support STARTTLS, but clients are usually not expected to use certificates.
port 465 is the standard submissions port, where s implies TLS. I never used msmtp, but I expect you have to use tls on.
I was thinking that config file is read awhole and then its parameters stored in memory... Well. in my case it helped to change tls port from 465 to 587, yet mail operator strictly define in his manual that TLS port is 465...
Here is my working config now:
account default
host smtp.mymail.com
#port 645
port 587
auto_from off
from_full_name OpenWRT Notifications
from openwrt.notifications@mymail.com
user openwrt.notifications@mymail.com
password mypass
auth on
tls_trust_file /etc/ssl/certs/ca-certificates.crt
tls on
tls_starttls on
tls_certcheck off
logfile /etc/msmtp.log
I am not sure why tls_sertcheck is off, yet it is working, so I leave it as it is.