Question
-
How to change the hostname in Postfix on a Plesk server?
-
How to change the SMTP banner in Postfix on a Plesk server?
Answer
-
Connect to a Plesk server via SSH.
-
For security reasons, create a backup file of the Postfix configuration file
main.cf
:# cp /etc/postfix/main.cf /etc/postfix/main.cf.bak
-
Open the
main.cf
file in a text editor. In this example, we are using the vi editor:# vi /etc/postfix/main.cf
-
Add/modify the Postfix configuration parameters
myhostname
andsmtpd_banner
the following way:myhostname = server.example.com
smtpd_banner = $myhostname ESMTP $mail_nameNote: Make sure that other
myhostname
andsmtpd_banner
parameters are disabled (contain # at the beginning of the line). -
Save the changes and close the file.
-
Check Postfix configuration syntax:
# postfix check
(empty output - means syntax is OK) -
Restart Postfix:
# service postfix restart