Issues getting SMTP Notifications working
-
Hi,
Apologies if I've not posted this to the correct area.
I've been trying to get SMTP Notifications working on 2.7.0.
I've installed ACME and successfully configured a wildcard cert and applied it.
I configured the cert with example.com *.example.com and *.homelab.example.comWhen I test the SMTP settings I get the following error: Could not send the message to blah@example.com -- Error: Failed to connect to ssl://smtp.example.com:587 [SMTP: Failed to connect socket: fsockopen(): Unable to connect to ssl://smtp.example:587 (Unknown error) (code: -1, response: )]
I can successfully telnet to the mailserver on port 587 from the command line on the router.
Any helpful suggestions greatly appreciated.
-
@tadl You don't need a certificate to send those notifications in the first place.
-
You installed that cert on your own mail server?
-
@stephenw10 it’s been installed for the web GUI so far.
-
Ok so I assume you are using example.com only as an example? You have your own domain you're using?
You don't need a client cert to connect to smtp.
You are trying to connect to an smtp server at your domain. Is that not your server?
-
@tadl try unchecking the SSL option.
-
@stephenw10 correct, sorry for not making that clear.
I have my own domain, mail is via a third party mail server, & I’ve followed instructions for sending mail via SMTP by generating a token/app password for use with the sending/from address.
-
Compare
@tadl said in Issues getting SMTP Notifications working:
Error: Failed to connect to ssl://smtp.example.com:587
with
@tadl said in Issues getting SMTP Notifications working:
I can successfully telnet to the mailserver on port 587
The first is TLS (SSL) and the second uses non-SSL, which is correct : 587 is not encrypted at the start.
It can, after connection, if the START-TLS server capability is available, use TLS.
pfSense will issue a START-TLS if this is the case.A pure, from the start, TLS connection can be used with smtp, server port 465.
-
@SteveITS I’ve tried the various SSL/TLS options with plain or login, but no luck.
-
@Gertjan Thank you.
The requirements are Port 587, Auth method is Plain, with STARTTLS
@SteveITS I've just tried it again, without Enable SMTP over SSL/TLS or Validate the SSL/TLS certificate presented by the server enabled, and it worked...
I thought I'd tried that earlier and it failed, not sure what I've tried now, been messing about with it for so long :)
But thanks everyone, all good now.