1. Knowledge base
  2. E-mail
  3. Set up SMTP relay with DirectAdmin

Set up SMTP relay with DirectAdmin

Updated on 10 June 2026 1 min read Snel.com support team

Introduction

If you want or need to setup your mailserver to send all outgoing mail to a specific server which will handle the delivery to the recipients you need to setup a SMTP relay or smarthost.

Prerequisites

  • You need to know the hostname of the SMTP server which is going to relay the mail for your mailserver, which is smtprelay.snel.com in our case
  • This article assumes that no authentication is necessary on the SMTP relay server
  • This article is written for DirectAdmin with Exim
  • You need to be running exim.conf 4.5.7 or newer, please see this article if you need to update
  • You need to have the SSH login details of your server ready

Log in with SSH

Log in as root. Please see this article for instructions if you don’t know how to connect.

Configure the MTA

Copy/paste complete command:

Code
cat <<'EOF' > /etc/exim.routers.pre.confsmart_route:  driver = manualroute  ignore_target_hosts = 127.0.0.0/8  condition = ${if or { \    {bool{FORCED_MX_DNS_CHECK}} \    {!match_domain{$domain}{+local_domains}} \  }}  transport = ${if eq{$domain}{$original_domain} \    {remote_smtp} \    {remote_smtp_forward_transport} \  }  self = pass  route_list = * smtprelay.snel.com::587  no_moreEOF

Step 3: Restart the mailserver

Restart the mailserver by issuing the following command:

Code
service exim restart

Conclusion

Congratulations, you have successfully setup SMTP relay / smarthost with DirectAdmin.

Was this article helpful?

Spot a mistake in this article? Email us at support@snel.com

This article was last checked on 10 June 2026. · 5,699 views

Your own VPS online within 2 minutes

Windows or Linux, root access and hosted in Rotterdam.

View VPS from € 6.99

Support

Can't figure it out? We are happy to help

You always talk to a real engineer. We typically respond within 15 to 30 minutes, and 24/7/365 for outages.

Call us

+31 88 3 088 099

Create a ticket

Through the client area we immediately see which service it is about.

Email us

Send your question via the contact form, also outside office hours.