0

I am on host-server with Centos 7 and KVM virtualization. I have 2 guest systems which are in routed virtual LAN. One of them is WEB server, the other is a mail server. Web server has hostname example.com and mail server is mail.example.com (both have dedicated static ip's).

I want SSMTP to route all mails from applications to my mail server.

root=root
mailhub=mail.example.com:465
Hostname=example.com
FromLineOverride=YES
AuthUser=no-reply@example.com
AuthPass=*PASS*
UseSTARTTLS=YES

Maybe I am a bit misunderstanding, but the mail doesnt go out not from Mail::Sendmail nor from NET::SMTP_auth.

In WEB machine mail log I see:

...status=deferred (connect to mail.example.com[*IP_ADDR*]:25: Connection refused)

Please help to understand what's wrong.

AnFi
  • 5,883
  • 1
  • 12
  • 26
tester3
  • 165
  • 2
  • 8

1 Answers1

0

As it stands, you are trying to send an email and telling the SMTP server that the localhost name is example.com.

The SMTP server is most probably expecting a FQDN as the hostname, not a domain.

This could lead the SMTP server into thinking your machine's name is example and that it's domain is .com

Hostname should be the FQDN of the server sending the email.

Alex
  • 3,079
  • 20
  • 28