KVKK & GDPR Compliant Turkey Data Center 24/7 Support
+90 850 455 35 01 | destek@mxgate.com.tr
MXGate
Türkçe Contact
Plesk Obsidian / Onyx

Plesk Smarthost Configuration

Authenticated relay host setup with Plesk Mail Server settings. Works on Postfix-based Plesk systems.

≈10 min
What does this guide do?
Ensures all emails sent from your Plesk server are delivered through the MXGate smarthost (with authentication). Works on Postfix-based Plesk systems.
Prerequisites
  • Plesk admin/root access
  • SMTP username and password created from MXGate panel
  • Plesk Obsidian 18.x+ or Onyx 17.x+
  • Postfix mail server (not QMail)
Setup

Step-by-Step Configuration

1

Access Plesk Mail Server Settings

Log in to Plesk admin panel and navigate to Tools & Settings > Mail Server Settings from the left menu.

Plesk Path
Tools & Settings > Mail Server Settings
2

SMTP Relay (Smarthost) Settings

In the Mail Server Settings page, find the SMTP relay section and configure:

SMTP Relay Settings
☑ Use SMTP relay Relay host: smtp.mxgate.com.tr Port: 587 ☑ Use SMTP authentication Username: MXGATE_KULLANICI_ADI Password: MXGATE_SIFRE
Port 587 automatically uses TLS encryption.
3

Save Settings

Click OK or Apply to save settings. Plesk will automatically update Postfix configuration and restart the service.

This process may take 30-60 seconds. Please wait for it to complete without closing the page.

Alternative: Configuration via SSH/CLI

If you prefer command line over GUI, you can use the following commands:

Set relay host via Plesk CLI
/usr/local/psa/bin/server_pref -u -smtp_relay_enable true /usr/local/psa/bin/server_pref -u -smtp_relay_host smtp.mxgate.com.tr /usr/local/psa/bin/server_pref -u -smtp_relay_port 587 /usr/local/psa/bin/server_pref -u -smtp_relay_auth_enable true /usr/local/psa/bin/server_pref -u -smtp_relay_auth_username MXGATE_KULLANICI /usr/local/psa/bin/server_pref -u -smtp_relay_auth_password MXGATE_SIFRE
Restart Postfix
plesk bin service --restart postfix
4

Manual Postfix Configuration (Advanced)

If Plesk GUI doesn't work, you can configure manually. Edit the Postfix main.cf file:

Back up and edit main.cf
# main.cf dosyasini yedekleyin: cp /etc/postfix/main.cf /etc/postfix/main.cf.backup # main.cf duzenleme: nano /etc/postfix/main.cf # Asagidaki satirlari ekleyin/degistirin: relayhost = [smtp.mxgate.com.tr]:587 smtp_sasl_auth_enable = yes smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd smtp_sasl_security_options = noanonymous smtp_tls_security_level = encrypt
SASL password file
# SASL sifre dosyasi olusturun: nano /etc/postfix/sasl_passwd # Icerik: [smtp.mxgate.com.tr]:587 MXGATE_KULLANICI:MXGATE_SIFRE # Dosya izinleri ve hash: chmod 600 /etc/postfix/sasl_passwd postmap /etc/postfix/sasl_passwd # Postfix yeniden baslat: systemctl restart postfix
Security: sasl_passwd file must be readable only by root (chmod 600).
5

Testing and Verification

Test if the configuration is working. Send an email and check the Postfix logs:

Watch logs and test
# Postfix loglarini izleyin: tail -f /var/log/maillog # Veya: tail -f /var/log/mail.log # Basarili baglanti gormelisiniz: "status=sent (250 2.0.0 Ok: queued as" # SMTP kimlik dogrulama testi: postqueue -p postsmtp -v smtp.mxgate.com.tr:587
Success! All your outgoing emails are now delivered encrypted and authenticated through MXGate.
Troubleshooting

Common Issues

How do I fix the "SASL authentication failed" error in Plesk?

Check username/password. Make sure you ran the postmap command after creating the sasl_passwd file.

Why does the Plesk smarthost return a "Connection timed out" error?

Firewall (Plesk Firewall or server firewall) may not allow port 587. Check outbound 587 permission.

Why does Plesk throw a "Relay access denied" error?

Ensure your server IP is whitelisted in the MXGate panel, or check authentication credentials.

Why won't my Plesk mail server settings save?

Ensure the Plesk "Mail Server" service is running. Check in Tools & Settings > Services.

Plesk Specific Notes
  • Smarthost settings in Plesk are global - they apply to all domains.
  • Separate relay settings per domain are not possible.
  • If Plesk's "Outbound Antispam Protection" is active, there may be some conflicts.
  • This guide is not valid for older Plesk installations using QMail.
1000+ enterprise customers
trust MXGate