Setup SMTP relay / smarthost with DirectAdmin

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 have the SSH login details of your server ready

Step 1) Login with SSH
Login as root. Please see this article for instructions if you don't know how to connect.

Step 2) Configure the MTA
Open the configuration file of exim with your favourite text-editor:

nano /etc/exim.conf

Find the following lines:

lookuphost:
  driver = dnslookup
  domains = ! +local_domains
  ignore_target_hosts = 127.0.0.0/8
  condition = "${perl{check_limits}}"
  transport = remote_smtp
  no_more

Change to:

smart_route:
  driver = manualroute
  domains = ! +local_domains
  ignore_target_hosts = 127.0.0.0/8
  condition = "${perl{check_limits}}"
  route_list = !+local_domains relay.mailchannels.net::587
  transport = remote_smtp

Save and exit with CTRL+X.

Step 3) Restart the mailserver
Restart the mailserver by issuing the following command:

service exim restart
 
 
  • email
  • 0 Utilisateurs l'ont trouvée utile
Cette réponse était-elle pertinente?

Articles connexes

Do you allow warez, warez link

No, we absolutely do not allow warez, warez linking or SPAM on our network.    

Setup SMTP relay / smarthost with Plesk with Postfix

Introduction If you want or need to setup your mailserver to send all outgoing mail to a...

Setup SMTP relay / smarthost with cPanel

Introduction If you want or need to setup your mailserver to send all outgoing mail to a...

Outgoing mail is blocked

Outgoing mail on port 25 is blocked on our network. This is done to prevent abuse of our network....