Re: [exim] Logging ACL denies

Pàgina inicial
Delete this message
Reply to this message
Autor: Jethro R Binks
Data:  
A: exim-users
Assumpte: Re: [exim] Logging ACL denies
On Wed, 5 Aug 2009, David Cantrell wrote:

> On Wed, Aug 05, 2009 at 01:20:17PM +0200, Peter Velan wrote:
> > am 05.08.2009 13:14 schrieb David Cantrell:
> > > In my ACLs I have this:
> > >   deny
> > >     message = sender IP $sender_host_address is blacklisted (in $host_data)
> > >     !acl = acl_whitelist_local_deny
> > >     hosts = ${if exists{CONFDIR/local_host_blacklist}\
> > >                  {CONFDIR/local_host_blacklist}\
> > >                  {}}
> > > It works, except that the (in $host_data) bit is interpolating nothing
> > > for the variable.
> > $sender_host_name [1] or $sender_helo_name [2] comes in mind.

>
> Ah, no. What I want is to show that, eg, 10.7.8.9 is being denied
> because it's in 10.0.0.0/8, which is listed in .../local_host_blacklist.
> Sorry if I wasn't clear!
>
> In that case I'd like the message logged to be:
> ... sender IP 10.7.8.9 is blacklisted (in 10.0.0.0/8)
>
> where now it's:
> ... sender IP 10.7.8.9 is blacklisted (in )


Here's one I have:

hostlist     hosts_reject_rcpt = net-iplsearch;HOSTSRCPTREJECT


  ## reject hosts
  ## Decline to receive mail from certain hosts.
  deny   message   = We decline to accept mail from sending host \
                     $sender_host_address.\n\
                     ${if def:host_data{Reason: ${host_data}\n}{}}\
                     REFUSENOTICE
       log_message = MSGTAG_REJECTSENDERHOST: Rejected mail from denied \
                     sender host address from $sender_host_address
         !hosts    = +hosts_reject_rcpt_excepted
         hosts     = +hosts_reject_rcpt


${host_data} is the data associated with the lookup in the file
HOSTSRCPTREJECT, which has lines like:

202.71.148.84 Source of Link Exchange Request and other spam

Jethro.

. . . . . . . . . . . . . . . . . . . . . . . . .
Jethro R Binks
Computing Officer, IT Services, University Of Strathclyde, Glasgow, UK