How Do I Alter Exim To Only Allow Certain Domains To Relay

WestBend

Well-Known Member
Oct 12, 2003
173
0
166
I wanted to confirm the following before i break my email.. It would seem the following statement which is at the top of the exim.conf file is searching through the file of localdomains to decide which can send. Therefore if i pointed to another file and just copied those names that I wanted to allow would that work?.

Code:
domainlist relay_domains = lsearch;/etc/localdomains : \
    lsearch;/etc/secondarymx
 

linux-image

Well-Known Member
Jun 8, 2004
1,191
1
168
India
cPanel Access Level
Root Administrator
the same contents of /etc/localdomains copied to another file with the same permissions should be working fine. what difference do you intend to make ?
 

WestBend

Well-Known Member
Oct 12, 2003
173
0
166
I just intend to alter the statement from :

Code:
domainlist relay_domains = lsearch;/etc/localdomains : \
    lsearch;/etc/secondarymx
To

Code:
domainlist relay_domains = lsearch;/etc/relaydomains : \
    lsearch;/etc/secondarymx
Load up relaydomains with the domainnames that are allowed to send emails through the Exim server.

I checked the secondarymx and its empty so i don't have to worry about the contents of that file it seems.

The purpose of this is to allow auto account generation and not allow them to use my stmp server, only the pop server but I do have some domains I host that I want to be able to use the smtp server for outgoing instead of having to use their ISP's email server for outgoing.

Hopefully that made sense :)