Search code examples
smtppostfix-mta

Postfix EHLO Banner


I have a peculiar problem with Postfix 3.1.0:

When a connecting client issues EHLO, the server responds with a line that contains its internal hostname, instead of the expected value of the smtpd_banner parameter.

telnet 127.0.0.1 25
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
220 mxdomain.com ESMTP
EHLO a.aa
250-localhost.name.internal
250-PIPELINING
250-SIZE 41943040
250-ETRN
250-STARTTLS
250-ENHANCEDSTATUSCODES
250 8BITMIME

In the above example

  • the mxdomain.com ESMTP has been configured using smtpd_banner = mxdomain.com ESMTP in main.cf.
  • The localhost.name.internal text, I would like to have to be the same mxdomain.com text. The current value comes from $myhostname

How do I make the second banner contain mxdomain.com, or can it be removed somehow?


Solution

  • How do I make the second banner contain mxdomain.com, or can it be removed somehow?

    Don't set smtpd_banner, set myhostname instead e.g.:

    myhostnasme = mx.domain.com