Mailing List Archive

Limit Inbound E-mail to Certain IP Range Per cPanel Domain
Hello,

I'm trawling through the Exim ACL documentation but don't think I can
find a way to for this to work.

I'm trying to make it so only a certain IP range will be allowed through
Exim to a specific domain, with other domains unaffected by this ACL.

Is something like this possible? If so, where might I start looking? For
more context, this is in cPanel, though I imagine that just adds an
unnecessary layer of complexity to the question.

Thank you,

--
Danielle M


--
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/
Re: Limit Inbound E-mail to Certain IP Range Per cPanel Domain [ In reply to ]
On 21/09/2020 20:34, Danielle McLeod via Exim-users wrote:
> I'm trying to make it so only a certain IP range will be allowed through
> Exim to a specific domain, with other domains unaffected by this ACL.

OK, ACL's chapter in the docs. And you're looking at the sender's IP.
This is available is any ACL you fancy... you may as well hit it early.

Is there a neat condition that looks at the sender, that you could use?

You probably want a "deny everything but such-and-such" construct -
so think in term of a condition which selects what IPs you want
to permit, negated.
--
Cheers,
Jeremy

--
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/
Re: Limit Inbound E-mail to Certain IP Range Per cPanel Domain [ In reply to ]
Am 21.09.20 um 21:34 schrieb Danielle McLeod via Exim-users:
> Hello,
>
> I'm trawling through the Exim ACL documentation but don't think I can
> find a way to for this to work.
>
> I'm trying to make it so only a certain IP range will be allowed
> through Exim to a specific domain, with other domains unaffected by
> this ACL.
>
> Is something like this possible? If so, where might I start looking?
> For more context, this is in cPanel, though I imagine that just adds
> an unnecessary layer of complexity to the question.
>

Database SQL lockup with a regex match on the IP-Range: -> something <-
like this:

ACCEPT condition = ${if eq{1}{${lookup mysql{SELECT '1' FROM ipranges
WHERE '${quote_mysql:${domain}}' = domain AND $sender_ip REGEXP range
limit 1 }}}{yes}{no}}

DENY condition = ${if eq{0}{${lookup mysql{SELECT '1' FROM
whitelistdomains WHERE '${quote_mysql:${domain}}' = domain limit 1
}}}{yes}{no}}


best regards,
Marius

--
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/