Exim SMTP Smarthost Setup

eximsmarthostsmtp

I used these settings to set up exim to use gmail as a smarthost, which worked. However, I don't seem to be able to use these settings against other smtp servers, such as Yahoo or Fastmail (both with port 465 instead of 587). Both of these fail with the message defer (-18): Remote host smtp.example.com [x.x.x.x] closed connection in response to initial connection. Is there anything wrong with these settings? What could be going wrong?

my_route:
  driver = manualroute
  domains = ! +local_domains
  transport = my_relay
  route_list = * smtp.mail.yahoo.com

my_relay:
  driver = smtp
  port = 465
  hosts_require_auth = $host_address
  hosts_require_tls = $host_address

my_login:
  driver = plaintext
  public_name = LOGIN
  hide client_send = : my_username@yahoo.com : my_password

Best Answer

Had same challenge and solved it by changing smtp port from 465 (SSL/TLS) to 587 (STARTTLS).