Re: [exim] e-mail usage restrictions

Top Page

Reply to this message
Author: Kirill Miazine
Date:  
To: exim-users
CC: Odhiambo G. Washington
Subject: Re: [exim] e-mail usage restrictions
* Odhiambo G. Washington [2004-12-20 09:33]:
> Hello everyone,
>
> I have googled and googled, but I believe it's the correct search
> keyword that I am missing.
> What I am about to ask has been discussed on this list, but I just don't
> seem to be able to track it down - in the archives, FAQ, sample configs!
>
> I have one of those *stupid* requests again: Allowing only certain users
> (or group of users) to send mail to the Internet, while allowing
> everyone to send e-mail locally.
>
> I am sure I did see a solution on this list detailing how someone did
> it, no?


Make a copy of you router that delivers messages to other hosts (it's
called "dnslookup" in the default exim.conf), put it just before that
router and modify it a bit, e.g. too look like this (remember to write a
"condition" that checks if a user should be allowed remailing the
Internet or not):

Put following just below your first router that delivers messages to
remote hosts (it's called "dnslookup" in the default exim.conf):

    restrict_dnslookup:
        driver = redirect
        domains = !+local_domains
        condition = ...
        allow_fail
        data = :fail: You are not permitted to send mail to the Internet


You have to write a valid "condition" yourself. "local_domains" is a
domainlist containing all your local domains.

Bye!

--
Drive defensively. Buy a tank.