[HOWTO] Configure SMTP routes in Qmail server


2016-11-16 12:59:11 UTC


2017-08-16 17:01:07 UTC


Was this article helpful?

Have more questions?

Submit a request

[HOWTO] Configure SMTP routes in Qmail server

Applicable to:

  • Plesk 12.5 for Linux
  • Plesk 10.x for Linux
  • Plesk 11.x for Linux
  • Plesk 12.0 for Linux
  • Plesk 9.x for Linux


I would like to configure a Qmail server to relay all outgoing messages from a particular domain to another mail server. How do I do that?


Make sure the domain is listed in /var/qmail/control/rcpthosts . This configures Qmail to accept mail for the domain.

Create the SMTP routes for the domain to the new server in /var/qmail/control/smtproutes .

To relay email for a specific domain.com to another mail server, create the line:


To relay all email to another mail server, regardless of the destination domain, create this line:


Here's a working configuration example where all mail to domain1.com , domain2.com is relayed via relay-mail-server.com , domain3.com via relay2-mail-server.com and all other domains mail is relayed via relay3-mail-server.com :

# cat /var/qmail/control/smtproutes

Restart xinetd:

/etc/init.d/xinetd restart

Have more questions? Submit a request
Please sign in to leave a comment.