Hi,
I’m trying to set up email alerts for some events on my CRS device. OS version is 6.48. I followed mikrotik docs and some other docs as reference. Output of tool e-mail print:
/system logging add topics=e-mail
/log print follow-only file=e-mail-start where topics~“mail”
From another window, send the test e-mail, wait until it fails, and then break the /log print … and read the e-mail-start.txt file (you’ll probably have to download it to a PC as it will be too large for RouterOS editor)
It seems you connect to an IMAP server (normally used to receive/view received messages) instead of an SMTP server (used to send messages). Check the domain name and port, one or both are apparently wrong.
Okay got my email to work from port 25 to email server of my ISP.
Getting TLS working was a bit harder, using the right port and setting tls only, was the key to success.
I did not need to enable www-ssl at all.
I am using email addresses and passwords not domain names!
First, TLS is an evolution of SSL, and the actual (old) SSL should be deprecated everyhere, but people tend to stick with the old name.
Second, SMTP can be used in plaintext with no encryption all the time, or the TLS session may be established before the first SMTP packet is sent, or it may be requested after an initial conversation in plaintext which ends with a STARTTLS request and continues by TLS-encrypted connection re-using the already established TCP session.
If you configure start-tls=tls-only, it should work with your ISP as it skips the plaintext conversation. The description in the manual says it sends the starttls command but sniffer shows otherwise, the first payload packet the client sends is a TLS client-hello, so no starttls request in plaintext. Maybe if the server responds with HELO or EHLO, the starttls is there, no idea.