Re: [exim] limiting sender domains for some domains

Top Page
Delete this message
Reply to this message
Author: Dave Evans
Date:  
To: exim-users
Subject: Re: [exim] limiting sender domains for some domains
On Mon, Mar 03, 2008 at 11:52:16AM +0100, exim@??? wrote:
>
> Hi all,
>
> I have a centos server with several domains. For some domains I want to
> limit the allowed senders to just 2 ip addresses.
> All the other domains must be able to receive mail from any ip address.


So, when someone says "RCPT TO:<something@???>" you want to
reject the command, unless they are connecting from some nominated list of IP
addresses? And does that list of IPs vary depending on the domain? (I'll
assume it doesn't, in my example below).

Something like:

domainlist restricted_domains = some.restricted.domain : another.restricted.domain
hostlist ok_senders = trustedserver.example.com : 10.0.0.0

to define the domains and IPs in question, then

  deny
    domains = +restricted_domains
    !hosts = : 127.0.0.1 : +ok_senders
    message = Not allowed


in your acl_smtp_rcpt should do the trick.

> I have been reading all kinds of documentation but are unable to find
> the solution for this problem.


You don't have to use a domainlist / hostlist as I did above, but
fundamentally the answer is to add an acl_smtp_rcpt stanza using the "domains"
and "hosts" conditions.

http://www.exim.org/exim-html-current/doc/html/spec_html/ch40.html
http://www.exim.org/exim-html-current/doc/html/spec_html/ch40.html#SECID189
http://www.exim.org/exim-html-current/doc/html/spec_html/ch40.html#SECTaclconditions

--
Dave Evans
http://djce.org.uk/
http://djce.org.uk/pgpkey