Very strange issue with Exim - Exim does not rout emails through the smart host (relay) for certain domains

ravgrg

Verified User
Joined
Mar 9, 2024
Messages
11
Hello

Exim does not rout emails through the smart host (relay) for certain domains (like custom ones) but works correctly for major providers like Gmail, Outlook, or Yahoo.

Emails are not being delivered to providers other than Gmail, Outlook, or Yahoo. For instance, if I try to send an email to a custom address like [email protected], it attempts to send using the local email and not the relay, Exim will try to send via the local email but if I send to Gmail, etc email accounts - the local mail server indeed sending using the relay correctly.

How come that very strange issue?
Does anyone know what is the issue? why does the local server(Exim) attempt to send emails using the local email instead of the smart host(relay) to custom emails?

For the purpose of the test, I made a direct call from SSH using the root user of the server where the DirectAdmin was installed:
swaks --to [email protected] --from [email protected] --server relay.mailwish.com --port 587 --tls --auth-user user --auth-password password --header "Subject: Test DKIM signing"

The email was delivered as excepted to [email protected] but when using DirectAdmin email, that did not even fire using the relay.
But If i try to send via the email accounts created in Directadmin to [email protected], Exim does not attempt to send using the relay.

So strange, anyone can help?
 
depending on your smartroute, if you have condition filter checking like "127.0.0.1" or localnet, ..etc.. , it will not sending by smartroute.
 
Hi
I followed the official guide:

And

Can you show an example? I want to send emails only using the relay, no local at all.
 
try comment out or remove this line and restart/checking again.
Code:
domains = ! +local_domains

I don't know, why you trying to using smartroute to sending email to local server.
 
The problem is that when I do this, DA attempts to send every root message using the relay which is flooding the relay.
As well, I found more weird cases:
root@arrow:/usr/local/directadmin/custombuild# exim -bt [email protected] ---> Any custom domain, even if i put @directadmin.com
[email protected] router = virtual_user, transport = dovecot_lmtp_udp

root@arrow:/usr/local/directadmin/custombuild# exim -bt [email protected] --> Any provider like gmail/outlook/yahoo - Works with the smart route
[email protected] router = smart_route, transport = auth_relay host relay.mailwish.com [15.235.10.99]

root@arrow:/usr/local/directadmin/custombuild# exim -bt [email protected] ---> No valid receipents here, while the email is valid and i can send using another provider to the same email and i can read the email since this is a working email of mine
[email protected] is undeliverable:

Exim is very very bad.
 
Ahh ok, I'm out of idea. Since recipient address domains is on local server, Exim will try to sending via local server, not smartroute.

I thinks, just config your App to sending email with SMTP. Is the best option ?
 
Some recipients are on local and some are not. I thought the smart route is the smtp, how I set the smtp other way than smart route?
 
Smartroute is SMTP thing. But it not work, if recipient is on same server.

Anouther ways, just do it in your Web App.
 
Hello
Can you share guide?
All I want is to connect the relay for outgoing. Either for local or external recipients.
 
No, I have to enable outgoing for the entire directadmin server. So I can use the emails.
 
yeah, I'm no idea. if you have some logics condition checking to not spamming your relays. you should fix that smartroute.
 
Back
Top