SMTP notifications not work with 587 port and SSL/TLS
SMTP notifications (System>Advanced>Notifications) not work with 587 port and SSL/TLS authentication checked. The system log shows the following:
php: /system_advanced_notifications.php: Could not send the message to firstname.lastname@example.org -- Error: could not connect to the host "smtp.mydomain.com": ??
My pfsense version: 2.0.3-RELEASE
Split SSL/TLS into separate checkboxes so that plaintext connections can be made secured by using STARTTLS. Support for SMTPS connections should probably be done away with in future. Fixes #3180
#2 Updated by Warren Baker over 7 years ago
That would be because your port 587 is not accepting secure connections. In a typical port 587 setup the connection is first established (unsecured) and then a STARTTLS command is sent. As it stands the existing library does not cater for that and tries to establish a secure connection to port 587, which would normally fail. Using port 465 would work as thats expecting a secure connection.
Ideally I guess, specifying port 465 should turn on a secure connection automatically. Any other port specified would be left as unsecure and if TLS is checked, then a STARTTLS would be issued after the connection has been established.
#3 Updated by Aitor Fraile over 7 years ago
#4 Updated by Warren Baker over 7 years ago
Aitor Fraile wrote:
On the other hand, it seems that 465 port is deprecated for SMTPS2.
Yes thats right, has been for awhile although the likes of GMail and similar still provide it due to old MUAs wanting to make use of it. Which brings up an interesting question, in pfSense a SSL connection should actually be done away with and only make use of STARTTLS.
I have a patch done, will commit it soon to HEAD.