RE: [Exim] Search data in sender_domains

Startseite
Nachricht löschen
Nachricht beantworten
Autor: Rick Cooper
Datum:  
To: Nigel Wade
CC: Exim users list
Betreff: RE: [Exim] Search data in sender_domains

> -----Original Message-----
> From: exim-users-admin@???
> [mailto:exim-users-admin@exim.org]On
> Behalf Of Nigel Wade
> Sent: Thursday, March 11, 2004 10:54 AM
> To: Rick Cooper
> Cc: Exim users list
> Subject: 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_in
> fo_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...
>


Your welcome, the overhead will be less than you think because
the lookups should be cached as well.