Address already in use error in Plesk is usually caused by Incorrect configuration entries in the postfix master.cf file.
Here at Ibmi Media, as part of our Server Management Services, we regularly help our Customers to perform related Plesk queries.
In this context, we shall look into method to resolve this Postfix error.
Before proceeding with this configuration procedure, you need to meet the following requirements:
Now, follow the steps given below:
1. Log in with SSH as root.
2. Configure the MTA
Update the postfix configuration by issuing the following commands:
postconf -e 'relayhost = [smtprelay.snel.com]:25'
postconf -e 'smtp_tls_security_level = may'
3. Restart the mail server
Restart the mail server by issuing the following command:
$ service postfix restart
Symptoms of the error includes:
1. Firstly, unable to start postfix.
It fails with the error below in /var/log/maillog log file:
postfix/postfix-script[9889]: starting the Postfix mail system
postfix/master[9890]: fatal: bind 0.0.0.0 port 25: Address already in use
2. Manual start for smtp service fails:
# plesk bin service –start smtp
ERR [util_exec] proc_close() failed [‘/opt/psa/admin/bin/mailmng-service’ ‘–start-service’ ‘–mail-component=mta’] with exit code [1] mailmng-service failed: exit status 1
Above error is caused due to wrong configuration entries in /etc/postfix/master.cf
Follow the steps given below to resolve this error.
1. Firstly, connect to the server via SSH
2. Then, verify that another application is not using port 25 (output should be exactly as below):
# netstat -ntpl | grep 25
tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN 21078/master
tcp6 0 0 :::25 :::* LISTEN 21078/master
3. If output is different and a 3rd-party service is running, kill the process:
# kill -9 <id>
4. Edit file /etc/postfix/master.cf and comment out all duplicate lines in the configuration, for example:
203.0.113.2- unix – n n – – smtp -o smtp_bind_address=203.0.113.2 -o
smtp_bind_address6= -o smtp_address_preference=ipv4
5. Save the changes and close the file.
6. Finally, restart Postfix to apply the changes:
$ service postfix restart
Please note the line with the IP address should exist only once in the /etc/postfix/master.cf configuration file.
This article covers methods to resolve Postfix address already in use error in Plesk. To fix this error, simply Edit file /etc/postfix/master.cf and comment out all duplicate lines in the configuration, for example:
203.0.113.2- unix - n n - - smtp -o smtp_bind_address=203.0.113.2 -o
smtp_bind_address6= -o smtp_address_preference=ipv4
Note: The line with the IP address should exist only once in the /etc/postfix/master.cf configuration file.