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.


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.

  • 1
    I may not understand what you are looking to do. Are you simply trying to make your servers send mail outbound via your mail server at "mail.example.com"? – Eirik Toft Aug 7 '15 at 4:36
  • yes, absolutely – tester3 Aug 7 '15 at 6:53

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.