Articles in this section

How to change the hostname and SMTP banner in Postfix on the Plesk server

kb: how-to Plesk for Linux ABT: Group B

Applicable to:

  • Plesk for Linux

Question

  • How to change the hostname in Postfix on the Plesk server?

  • How to change the SMTP banner in Postfix on the Plesk server?

Answer

  1. Connect to your Plesk server via SSH.

  2. For security reasons, create a backup file of the Postfix configuration file main.cf:

    # cp /etc/postfix/main.cf /etc/postfix/main.cf.bak

  3. Open the main.cf file in a text editor. In this example, we are using vi editor:

    # vi /etc/postfix/main.cf

  4. Add/modify the Postfix configuration parameters myhostname and smtpd_banner the following way:

    CONFIG_TEXT: myhostname = server.example.com
    smtpd_banner = $myhostname ESMTP $mail_name

    Note: Make sure that other myhostname and smtpd_banner parameters are disabled (have # at the beginning of the line).

  5. Save the changes and close the file.

  6. Check Postfix configuration syntax:

    # postfix check
    (empty output means syntax is OK)

  7. Restart Postfix service to apply the chnages:

    # service postfix restart

Was this article helpful?

Comments

1 comment
Date Votes
  • Hi Kuzma Ivanov,

     

    Plesk still lacks KB articles regarding postfix. For example:

    1. What are the keys in the pem file

    2. Where is the path to access the dkim private key file is set, and can that file be replaced, and set with a key to open it

     

    0

Please sign in to leave a comment.