Sending mail through another DA server

Magistar

Verified User
Joined
May 31, 2014
Messages
86
I have a new server that has a really low mail volume (e.g. 1-10 mails per day) and it is causing me headaches with Microsoft (Hotmail, live, outlook) delivery. For example their tools only start working from 500 daily volume.

For the next 6-12 months I would like to have these mails send through another DA server. Now I did find the following tutorial: https://help.directadmin.com/item.php?id=153. However I am unclear about about quite a few areas

-what sort of authentication do I need to set in order for the other DA server to accept it?
-do I need to make changes on the larger server to accept these mails?

Is there anyone that is willing to get me started? Maybe someone has done this and he/she can post an example smart_route?

edit: I think I am getting somewhere. However my other DA server is not accepting relay without AUTH. So far I have not been able to figure out how to whitelist a single ip OR setup auth.
 
Last edited:
Hello,

you need to update (on your "big" server):

Code:
hostlist relay_hosts =

and add your new server's IP there.

In case if you are using the latest exim.conf 4.5.2 (on your "big" server) add the line with your new server's IP into /etc/exim.variables.conf.custom and run

Code:
./build exim_conf

Related: https://forum.directadmin.com/showthread.php?t=54115&p=277503#post277503


p.s. make sure to update SPF records for domains ;)
 
Thanks a lot for taking the time to reply.

I think I have it working. I have not been able to test DKIM yet but I ran out of free tries with mail-tester.com for today. So I will have to check that in 24 hours. Anyway I had to make some small adjustments here and there and combined your suggestion with a suggestion of John (Via email). I will try do a little writeup. Feel free to correct me when wrong.

Tutorial start:

Goal: send mails from little.domain.com through big.domain.com , both running DA with custombuild 2.0 and exim 4.4.

Note: after rebuilding exim.conf (v4.4) the DA's knowledgebase "patch" didn't work (hunk #3 offset) so I do it manually

On little.domain.com

Open /etc/exim.conf

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

Replace with
Code:
smart_route:
     driver = manualroute
     domains = ! +local_domains
     ignore_target_hosts = 127.0.0.0/8
     condition = "${perl{check_limits}}"
     transport = remote_smtp
     route_list = * big.domain.com
     no_more
Then find and adjust (to add the auth_relay):
Code:
#COMMENT#53:
##################################################################################
# TRANSPORTS CONFIGURATION
##################################################################################
begin transports

auth_relay:
    driver = smtp
    port = 25
    hosts_require_auth = $host_address
    hosts_require_tls = $host_address
Ignore the part about auth_login from the DA tutorial.

Now go to big.domain.com and look at /etc/exim.conf and search for hostlist whitelist_hosts and find
Code:
hostlist whitelist_hosts = nwildlsearch;/etc/virtual/whitelist_hosts
hostlist whitelist_hosts_ip = /etc/virtual/whitelist_hosts_ip

add
Code:
hostlist relay_from_hosts = 127.0.0.1 : xx.xx.xx.xx
Where xx.xx.xx.xx is the IP of little.

Now for the authentication:
-add the ip of little to /etc/virtual/whitelist_hosts_ip
-add the hostname of little to /etc/virtual/whitelist_hosts

Then restart exim on both boxes. After that I was started receiving mail :cool:.

This of course leaves a few things to work on:
-Does DKIM still work? (edit: Yes it appears to be working)
-How do you change SPF for existing domains without having to do it manually
-What is exim 4.5 about, is it worth upgrading?
 
Last edited:
1. DKIM should work fine.
2. I want to change the SPF records for all of my domains. => https://help.directadmin.com/item.php?id=616
3. For me and my users it's worth. I don't know all of your details. And I don't want to be the guy who you will blame if it's does not work for you ;) So you should decide on your own.
 
1. DKIM should work fine.
2. I want to change the SPF records for all of my domains. => https://help.directadmin.com/item.php?id=616
3. For me and my users it's worth. I don't know all of your details. And I don't want to be the guy who you will blame if it's does not work for you ;) So you should decide on your own.

Thanks for the follow up.

If you don't mind I have two additional questions based on that answer:
1) For a standalone server that was pushing DNS info to the master NS1/NS2 I was able to run the regex. However NS1/NS2 themselves there are also domains coming in without local data that should not be modified. So not sure how to filter those out.... I guess I might have to do them manually. Or is there a better solution?

2) Could you mention the primary benefit of 4.5.2? I couldn't find much on it online.
 
Back
Top