Re: [Exim] Search data in sender_domains

Página Principal
Apagar esta mensagem
Responder a esta mensagem
Autor: Nigel Wade
Data:  
Para: Rick Cooper
CC: Exim users list
Assunto: Re: [Exim] Search data in sender_domains
Rick Cooper wrote:
>
>>-----Original Message-----
>>From: exim-users-admin@???
>>[mailto:exim-users-admin@exim.org]On
>>Behalf Of Nigel Wade
>>Sent: Thursday, March 11, 2004 8:48 AM
>>To: Exim users list
>>Subject: [Exim] Search data in sender_domains
>>
>>
>>Hi,
>>
>>Finally, our new mail system with Exim is up and
>>running. Nice... (Finally,
>>those wonderfully transparent sendmail rewrite rules -
>>R<> $* < @ [ $* ] : $+ > $*     $1 < @ [ $2 ] : $3 > $4
>>are gone for ever!)

>>
>>But no sooner is it up and running than I want to play
>>with the configuration.
>>
>>I have a blacklist of sender domains in a file which I
>>check using
>>sender_domains in the rcpt acl. This works perfectly
>>well for rejecting
>>messages. However, now I'd like to be able to
>>customize the rejection
>>message with a specific reason for each domain.
>>
>>I can set up a blacklist with domains and reasons e.g.:
>>
>>misco.co.uk: sending spam and not desisting when told to do so.
>>bigfoot.net: sending virus alerts by replying to forged sender.
>>
>>and doing an lsearch on the file. However, I can't see
>>any way to get the
>>result of the search into the rejection message as
>>domainlist lookup data is
>>only returned for 'domains' and 'local_parts'.
>>
>>Is there any way that I can do this?
>
>
> deny message = Access denied because \
>
> ${lookup{$sender_address_domain}lsearch{/path/domain_info_file}}
> conditions go here
>
> read through section 9 in the exim spec. There are some
> interesting things that can be done with lookups (@@lsearch for
> one)
>
> Rick
>
>


Excellent, thanks. That works perfectly.

From debugging output it looks like two lookups are done, but the second
only occurs if the first succeeds so it's not going to be a major overhead.


It's always nice to tell people why you don't want their email...


--
Nigel Wade, System Administrator, Space Plasma Physics Group,
             University of Leicester, Leicester, LE1 7RH, UK
E-mail :    nmw@???
Phone :     +44 (0)116 2523548, Fax : +44 (0)116 2523555