Using an external SMTP service for email delivery can prevent your server’s IP from being blacklisted and significantly improve your deliverability rate.
In this guide, we’ll explain step-by-step how to integrate the MailBaby SMTP service with servers using Plesk Panel.
Add the following line:
Save and exit with
Edit the content as follows:
Replace
Set proper permissions:
NOTE: Run these commands in the correct order.
Add the following lines at the bottom:
To quickly reach the bottom of the file, use
Restart the service:
This record authorizes MailBaby servers to send emails on behalf of your domain.
In this guide, we’ll explain step-by-step how to integrate the MailBaby SMTP service with servers using Plesk Panel.
🧩 1. Add X-Sender Header Configuration
First, create a custom header rule for MailBaby:
Bash:
nano /etc/postfix/header_custom
Add the following line:
Bash:
/^Received: (.*Authenticated sender:)([^)]*)(.*)/i PREPEND X-Sender-id: $2
CTRL + X, then Y, and finally Enter.🔐 2. Define SMTP Credentials
Bash:
nano /etc/postfix/sasl_passwd
Edit the content as follows:
Code:
relay.mailbaby.net mbXXXX:XXXXXXX
mbXXXX:XXXXXXX with your MailBaby account’s username and password.Set proper permissions:
Bash:
chown root:root /etc/postfix/sasl_passwd
chmod 600 /etc/postfix/sasl_passwd
postmap hash:/etc/postfix/sasl_passwd
⚙️ 3. Configure Postfix Settings
Open the main configuration file:
Bash:
nano /etc/postfix/main.cf
Add the following lines at the bottom:
Bash:
relayhost = relay.mailbaby.net:25
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options = noanonymous
smtpd_sasl_authenticated_header = yes
smtp_tls_security_level = encrypt
smtp_header_checks = regexp:/etc/postfix/header_custom
CTRL + V.🔁 4. Update Configuration and Restart Service
Verify Postfix configuration:
Bash:
postconf
Restart the service:
Bash:
service postfix restart
🌐 5. Update SPF Record
Add the following SPF record to your domain’s DNS settings:
Code:
v=spf1 a mx include:relay.mailbaby.net ~all