How to change Postfix hostname and SMTP banner on Plesk server

  Plesk, Postfix

Connect to a Plesk server via SSH.

Create a copy “postfix” configuration file:

# cp -a /etc/postfix/ /root/

Open “postfix” configuration file in a text editor, for example, “vi” editor:

# vi /etc/postfix/

Add the lines specified below to the configuration file and make sure that these lines are present only once in the file:

Note: replace with required mail server name.

myhostname =
smtpd_banner = $myhostname ESMTP $mail_name

Using command line tool. check “postfix” configuration syntax and restart postfix:

postfix check
(empty output - means syntax is OK)
# service postfix restart