KNOWNHOST WIKI

User Tools

Site Tools


control-panels:directadmin:how-to-configure-remote-mailserver-with-directadmin

How To Configure Your DirectAdmin Server To Use a Remote Mailserver For Your Domain


The following instructions outlined have you logging in as admin initially just in case you need to enable the DSN Control option for the user. You will need to enable this option if the user's account doesn't have the MX Records menu in DirectAdmin. If you know for certain that DNS Control is enabled for the user, you can start at step #4.

  1. Log in as 'admin'
  2. List all users
  3. Select the user that owns the domain you will be making changes for
  4. Log in as that user
  5. Go to User Panel → domain.com → MX Records (If this option doesn't exist, click the logout icon in the top corner to be logged out as the user and return to being 'admin' and then enable DNS Control for the user).
  6. Uncheck the "Local Mail Server" option
  7. Remove the "mail" MX record and add a new MX record that resolves to the IP of the remote mailserver.

IMPORTANT: Make sure that you do not simply change the IP of the mail subdomain! For some reason, DirectAdmin sees this record and still sends mail locally, even when the domain no longer exists in /etc/virtual/domains! Thus, you may want to create a different subdomain, such as 'mx' or just use the domain name if it resolves to the remote mailserver (this may occur if you have an account that exists on both the local and the remote server, such as is common with migrations where one domain under the same account hasn't had its DNS updated to resolve to the new server yet).

Errors that are common when sending mail between a domain that exists on the local mailserver and on the remote mailserver, but are being routed incorrectly are as follows:

  R=lookuphost defer (-1): lowest numbered MX record points to local host

OR

  all relevant MX records point to non-existent hosts

The error message below indicates that the mail is being routed locally despite having deselected the local mailserver option.

  R=lookuphost defer (-1): lowest numbered MX record points to local host

This has occurred in instances where the 'mail' subdomain wasn't removed and had had its mail A record changed to point to the remote host instead.

  all relevant MX records point to non-existent hosts
control-panels/directadmin/how-to-configure-remote-mailserver-with-directadmin.txt · Last modified: 2020/06/01 11:14 by Karson N.