Hi There,
I have read the FAQ and searched the past posts but I have only managed
to find the answer to half my problem.
I am using Exim 4.12 on SuSE 8.1
The First half was answered in the FAQ - "Q9802: How do I configure
Exim so that it sends mail to the outside world only from a restricted
list of our local users?"
check_outgoing:
driver = redirect
domains = ! +local_domains
senders = ! : ! lsearch;/etc/exim/senders
allow_fail
data = :fail: you are not allowed to send outside
That worked really nicely. The problem I have is that I need to use that
same list to determine who is allowed to receive email from outside our
domain. The users not in the above list must still be able to receive
and send mail to other users in our domain but must not be able to
receive email from any other domains.
I have come up with this but I would prefer if Exim could accept the
message, then generate a bounce to the sender containing the reasons for
the error.
check_incomming:
driver = redirect
domains = ! +local_domains
condition =
${lookup{$local_part@$domain}lsearch{/etc/exim/senders}\
{no}{${if
eq{$sender_address_domain}{mydomain.co.za}{no}{yes}}}}
allow_fail
data = :fail: Your email is being returned as the specified user is
not allowed to accept your email.
Can anyone provide a simpler or more elegant way of achieving this?
Kind regards
Gary van Blerk