[exim] Limit SMTP by domain.

Pàgina inicial
Delete this message
Reply to this message
Autor: Chuck Rock
Data:  
A: exim-users
Assumpte: [exim] Limit SMTP by domain.
I have researched this for a week now, but I have not had any success with
the solutions mentioned.



I need some help if anyone can.



I have an external mail filter to my Exim sever. The server still needs to
accept port 25 connections for most of the domains but select few will need
to be rejected unless they are being delivered from the filter device.



Searching the list and other search engines, I have found this solution
several times.



Exim.conf in this section:



#!!# ACL that is used after the RCPT command

check_recipient:



I've added



deny !hosts = +relay_hosts

message = Please use the MX

domains = +filtered_domains



in various orders and different uses of the !



At the top of the config file where the lists are defined I have.



hostlist relay_hosts = lsearch;/etc/relayhosts : \

    localhost


domainlist filtered_domains = lsearch;/etc/filtereddomains



It seems the only way I can process both the host IP's and domains in this
is to specify the hosts in the Exim.conf file. If I use lsearch, none of the
host ip entries work. In either case, the domain lookup is working.



So if the line: deny host = ! 123.456.789.1 : ! 123.654.123.1 is used, it
works by rejecting messages sent from IP's other than listed for the list of
filtered domains. When I change the list of hosts to an lsearch file, it
always fails any domains listed in the domains file as if it's not even
doing the host lookup in the relay_hosts file.



I'm running
exim-4.63-1_cpanel_smtpctl_av_rewrite_mm2_mmmtrap_exiscan_md5pass



Is there something I'm missing, even the Exim documentation seems to support
the above configuration?



Thanks,

Chuck