0

I have developed an application that sends emails using my Exim server over a SSL connection.

According to my default exim configuration, to send e-mails over SSL connection I need to use port 465, while to send e-mails with no SSL, I have to use port 587.

Well, when I configure the e-mail sender to use SSL and I use port 587, it fails sending, but if I use port 465, it sends the e-mail correctly, which is the expected behaviour.

However, if I telnet to the server using port 587, server returns the SMTP banner and if I issue an EHLO command, this is returned:

250-vps.desytec.com Hello  [xxx.xxx.xxx.xxx]                                                                             
250-SIZE 52428800                                                                                                       
250-8BITMIME                                                                                                            
250-PIPELINING                                                                                                          
250-AUTH PLAIN LOGIN                                                                                                    
250-STARTTLS                                                                                                            
250 HELP

Notice that on port 587, TLS connection is supported.

But if I telnet the server to port 465, no banner neither EHLO response are shown.

How can I make my Exim server, on port 465, to send the banner, command echoes and command responses?

Regards Jaime

jstuardo
  • 155
  • 1
  • 7
  • What program is listening on port 465? – Michael Hampton Aug 17 '20 at 12:30
  • @MichaelHampton it is Exim server – jstuardo Aug 17 '20 at 13:35
  • 587 supports STARTTLS which is an upgrade to TLS from an initial cleartext connection. 465 is SMTP in wrapper mode, ie. over a pure TLS connection (from the moment the connection is established). – Ginnungagap Aug 17 '20 at 16:46
  • You do not want to make port 465 server work in a non-standard way. What is the actual problem you are trying to solve? – Tero Kilkanen Aug 18 '20 at 06:17
  • @TeroKilkanen nothing special..... it seems Mail classes in .NET Framework have some sort of problems. I changed to use MailKit and problem is gone. It allowed me to use 465 port with SSL connection. – jstuardo Aug 20 '20 at 20:32

1 Answers1

3

465 is smtps port, it's waiting for ssl connection. Use stunnel or openssl or socat for connecting to it.

Ipor Sircer
  • 1,226
  • 7
  • 8