Bobcares

Instant fix for Exim4 ‘mailing to remote domains not supported’ error

by | Nov 27, 2018

A message that you sent could not be delivered to one or more of its recipients. This is a permanent error. The following address(es) failed: user@domain.com . Mailing to remote domains not supported.

 

This is a commonly noticed error in new servers or servers with newly installed mail server such as Exim4, when sending mails to external mail addresses.

In our experience providing Technical Support Services for web hosting companies, we come across many sorts of email errors, and resolve them for our customers.

Today, we’ll see what causes the error ‘mailing to remote domains not supported’ and how we fix it in Exim4 servers.

When do you see the error ‘mailing to remote domains not supported’ in Exim4 servers?

Suppose you are trying to send mails from your server to addresses outside your server, such as gmail. For a mail delivery to work fine, there has to be a working MTA.

MTA (Mail Transfer Agent) is a service that delivers mails from one server to another. Exim4 is a popular MTA that comes by default in Debian servers.

By default, Exim4 is configured to handle only mail delivery locally (ie, to domains within the same mail server) and not to domains outside the server.

This configuration is specified in the Exim configuration file ‘/etc/exim.conf’.

#ifdef DCconfig_local
# configtype=local
#
# Stand-alone system, so generate an error for mail to a non-local domain
nonlocal:
debug_print = "R: nonlocal for $local_part@$domain"

driver = redirect

domains = !example.com

qualify_domain = example.com
# domains = ! +local_domains

allow_fail

data = :fail: Mailing to remote domains not supported

no_more

#.endif

 

If this Exim4 MTA is not installed or configured properly for delivering mails to remote servers, mail delivery to external domains fails and gives out error message:

Subject: Mail delivery failed: returning message to sender

This message was created automatically by mail delivery software.

Remote Domains
"Mailing to remote domains not supported"

 

How to fix Exim4 ‘mailing to remote domains not supported’ error

The first thing to do in email errors, is to examine the mail logs and get the details of the error. The exim logs are usually available at ‘var/log/exim_mainlog’ path.

Based on the information available from the log files, we debug and fix the error with these steps.

1. Install mail server

In cases where Exim4 MTA is not installed at all, we install and configure the mail server first.

2. Mail server configuration

By default, Exim4 is configured to send mails only locally. The fix is to reconfigure it to allow mails to be sent to remote domains.

Exim configuration can be changed in two ways:

1. Editing the exim.conf file and update the parameter “dc_eximconfig_configtype=’internet'”.

2. Running the configuration wizard using ‘dpkg-reconfigure exim4-config’ command. This wizard presents the options to choose the “mail server configuration type that best meets your needs.”

The supported mail server types are:

a. internet site – This type allows the mail server to connect to a network and send and receive mails using SMTP.

b. mail sent by smarthost – This allows to forward outgoing mails to a third party mail server, called a “smarthost”. This mail server delivers mails to the destination. It also stores stores incoming mails to your server, until you download them.

c. mail sent by smarthost; no local mail – In this option, a third party mail server is used and your mail server will not handle mails for local e-mail domains.

d. local delivery only – This is the default option in Exim4 and it supports only local delivery.

From these configuration settings, we choose the option ‘internet site; mail is sent and received directly using SMTP:’, as that it the option that supports external mail delivery.

Exim is restarted after the changes and confirmed that it is working fine. Care has to be exercised while modifying Exim configuration, as even a single mistake can render the service non-functioning.

3. Test the mail delivery

Whenever a mail server configuration change is done, we send test mails and examine the mail logs to confirm that everything is working fine as intended.

After reconfiguring Exim4 to send mails to external domains, mails were delivered fine to outside addresses like gmail.com, no longer showing the error ‘mailing to remote domains not supported’.

4. Additional mail configuration

Additional points we check in mail server functionality are the hostname settings, SPF, RDNS, mail filters, etc. Due to enhanced security restrictions, many of these features are now vital for mail function.

Hostname is usually set as FQDN (Fully Qualified Domain Name) in the format ‘hostname.domainname.tld’ . Exim is also configured to accept mail only from local addresses, to avoid open relay.

 

Conclusion

Today we saw how our Support Engineers resolve ‘mailing to remote domains not supported’ error in Exim4 servers. In our customers’ servers, we monitor all services 24/7. This helps us to pinpoint and resolve service related errors in no time.

 

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

SEE SERVER ADMIN PLANS

var google_conversion_label = "owonCMyG5nEQ0aD71QM";

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Never again lose customers to poor
server speed! Let us help you.

Privacy Preference Center

Necessary

Necessary cookies help make a website usable by enabling basic functions like page navigation and access to secure areas of the website. The website cannot function properly without these cookies.

PHPSESSID - Preserves user session state across page requests.

gdpr[consent_types] - Used to store user consents.

gdpr[allowed_cookies] - Used to store user allowed cookies.

PHPSESSID, gdpr[consent_types], gdpr[allowed_cookies]
PHPSESSID
WHMCSpKDlPzh2chML

Statistics

Statistic cookies help website owners to understand how visitors interact with websites by collecting and reporting information anonymously.

_ga - Preserves user session state across page requests.

_gat - Used by Google Analytics to throttle request rate

_gid - Registers a unique ID that is used to generate statistical data on how you use the website.

smartlookCookie - Used to collect user device and location information of the site visitors to improve the websites User Experience.

_ga, _gat, _gid
_ga, _gat, _gid
smartlookCookie
_clck, _clsk, CLID, ANONCHK, MR, MUID, SM

Marketing

Marketing cookies are used to track visitors across websites. The intention is to display ads that are relevant and engaging for the individual user and thereby more valuable for publishers and third party advertisers.

IDE - Used by Google DoubleClick to register and report the website user's actions after viewing or clicking one of the advertiser's ads with the purpose of measuring the efficacy of an ad and to present targeted ads to the user.

test_cookie - Used to check if the user's browser supports cookies.

1P_JAR - Google cookie. These cookies are used to collect website statistics and track conversion rates.

NID - Registers a unique ID that identifies a returning user's device. The ID is used for serving ads that are most relevant to the user.

DV - Google ad personalisation

_reb2bgeo - The visitor's geographical location

_reb2bloaded - Whether or not the script loaded for the visitor

_reb2bref - The referring URL for the visit

_reb2bsessionID - The visitor's RB2B session ID

_reb2buid - The visitor's RB2B user ID

IDE, test_cookie, 1P_JAR, NID, DV, NID
IDE, test_cookie
1P_JAR, NID, DV
NID
hblid
_reb2bgeo, _reb2bloaded, _reb2bref, _reb2bsessionID, _reb2buid

Security

These are essential site cookies, used by the google reCAPTCHA. These cookies use an unique identifier to verify if a visitor is human or a bot.

SID, APISID, HSID, NID, PREF
SID, APISID, HSID, NID, PREF