[Exim] Text string search using lsearch

Top Pagina
Delete this message
Reply to this message
Auteur: tom.frost
Datum:  
Aan: exim-users
Onderwerp: [Exim] Text string search using lsearch



Exim Guru's,

I have what i am sure is a small and easy problem with my exim config and
hopefully one of you will take two minutes to point out the fix for me.

I am trying to set an acl condition on the rcpt acl that basically says; if
your email address is not in the list you not getting in. The list of email
address is actually the aliases file for that domain and so only contains
the email address that we need/want to allow to receive emails, postmaster
etc...

The motivation for this comes from one of our domains that receives alot of
junk mail to old or spoofed address, this is causing bounce emails some of
which are going to users because of a spoofed reply to address (by virus',
etc.). These users have reported these mails to spamcop and we are getting
our mta blocked which is stopping legitimate emails from being received by
mtas using bl.spamcop.net.

Anyway, the problem i have is that the email address in the alias file has
a colon on the end, i.e. "tom.frost@???:" and hence
when i look for "tom.frost@???" it isn't found in the
file and the acl isn't accepted. So i need to make the acl search for the
email@address: (preferable) or email@address*but i don't understand how to
do this. The acl is as follows;

# Accept mail to specific local address only, which get rewritten later
(ALIASES FILE)
      accept      recipients  =
lsearch;/usr/local/exim/config/virtual_domains/local_domains.aliases
            domains           = ssetest.co.uk
            endpass
            message           = 1: Invalid User - $local_part@$domain



Should/could i just use the following (or without the quotes) ???

# Accept mail to specific local address only, which get rewritten later
(ALIASES FILE)
      accept      recipients  =
${lookup{"$recipient:"}lsearch{/usr/local/exim/config/virtual_domains/local_domains.aliases}}
            domains           = ssetest.co.uk
            endpass
            message           = 1: Invalid User - $local_part@$domain


Thank you for anyhelp
Tom.



**********************************************************************
The information in this E-Mail is confidential and may be legally
privileged. It may not represent the views of Scottish and Southern
Energy Group.
It is intended solely for the addressees. Access to this E-Mail by
anyone else is unauthorised. If you are not the intended recipient,
any disclosure, copying, distribution or any action taken or omitted
to be taken in reliance on it, is prohibited and may be unlawful.
Any unauthorised recipient should advise the sender immediately of
the error in transmission.

Scottish Hydro-Electric, Southern Electric, SWALEC and S+S
are trading names of the Scottish and Southern Energy Group.
**********************************************************************