Tried to test my smtp server (centos server), I am using telet at centos

When I tried to test using code:

telnet 25

Trying Connected to Escape character is '^]'. 220 smtp.mail.forexmart.eu ESMTP Postfix

But when I tried to test using:

telnet localhost 25

Trying ::1...

Connected to localhost.

Escape character is '^]'.

Connection closed by foreign host.

  • this can be also problem with different configuration for IPv4 and IPv6, can you please provide /var/log/mail.err from the time of failed connection attempt – Quantim Jan 23 at 16:12

localhost is resolver to IPv6 address ::1 (which is equivalent to IPv4 Your postfix maybe listen only on IPv4 address, To listen on IPv6 , you need to specify correct IPv6 address for inet_interfaces directive in /etc/postfix/main.cf file.

line should looks like inet_interfaces =, [::1]

  • 1
    That is equivalent to inet_interfaces = loopback-only which will do the same thing. In any case, checking the value of inet_interfaces is definitely a good first step here. – Michael Hampton Jan 23 at 16:08

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.