Re: [exim] I want to add a record found into the ACL with lo…

Top Page
Delete this message
Reply to this message
Author: isolderj
Date:  
To: exim-users
Subject: Re: [exim] I want to add a record found into the ACL with logwrite.

The Config Now looks like this

       set acl_m9 = ${extract{id}{$acl_m8}{$value}{-1}}
       # now acl_m9 contains the record id (or -1)


       set acl_m8 = ${extract{result}{$acl_m8}{$value}{unknown}}
       # now acl_m8 contains unknown/deferred/accepted


  # check if we know a certain triple, add and defer message if not
  accept
       # if above check returned unknown (no record yet)
       condition = ${if eq{$acl_m8}{unknown}{1}}
       # then also add a record
       condition = ${lookup mysql{GREYLIST_ADD}{yes}{no}}


# now log, no matter what the result was
# if the triple was unknown, we don't need a log entry
# (and don't get one) because that is implicit through
# the creation time above.
#.ifdef GREYLIST_LOG_ENABLED
#warn condition = ${lookup mysql{GREYLIST_LOG}}
#.endif

  # check if the triple is still blocked
  accept 
       # if above check returned deferred then defer
       condition = ${if eq{$acl_m8}{deferred}{1}}
       # and note it down
       #condition = ${lookup mysql{GREYLIST_DEFER_HIT}{yes}{yes}}
       condition = ${if eq{$acl_m8}{accepted}{1}}
       log_message = Record Found on greylist server.  Retry time Correct. Message Accepted.


But it still doesn't give me the log_message.



> Date: Wed, 4 Mar 2009 14:31:02 +0800
> From: wbh@???
> To: exim-users@???
> Subject: Re: [exim] I want to add a record found into the ACL with logwrite.
>
> isolderj@??? wrote:
> > Hi,
> >
> > I used the following guide to setup greylisting. It works well what I would like is if I could add into the ACL a logwrite that will give me a message like "Record Found on greylist server. Retry Time Ok. Message Accepted. Is it possible?
> >
> > The guide i used http://slett.net/spam-filtering-for-mx/exim-greylisting.html.
> >
> > The lines I am thinking of adding
> >
> >    condition = ${if eq{$acl_m8}{accepted}{1}}
> >    logwrite = :main: Record Found on greylist server.  Retry time Correct. Message Accepted.

> >
> > So My question is where do I put it and is the condition enough.
> >
> > Thanks
> >
> >
> >
> > _________________________________________________________________
> > Windows Live™: Life without walls.
> > http://windowslive.com/explore?ocid=TXT_TAGLM_WL_allup_1a_explore_032009
>
> You 'put it' where it happens - IOW in the acl that seeks (and gets) the
> greylist go-ahead. Just as you have it....
>
> That acl itself needs go where whatever needs the greylist must find are
> first met. If a raw-IP-only, then it can go in acl_smtp_connect
>
> More often it will be in acl_smtp_rcpt_to, so you will have the
> opportunity to apply it for some domains/users and not for others.
>
> You also want to change it to 'log_message', otherwise it will write a
> logline every time that acl is *traversed* - even if it is not 'triggered'.
>
> You also don't really need ':main:', as that is the default for
> other-than-panic/reject entries.
>
> OTOH, if you (temporarily) want to gather data on how often there was a
> greylist hold-off, you might reverse the condtion and write it to
> "reject:" log.
>
> Have a care to not let that log outgrow space .... 'temporary' gets
> forgotten about some days ...
>
>
> HTH,
>
> Bill
>
>
>
> --
> ## List details at http://lists.exim.org/mailman/listinfo/exim-users
> ## Exim details at http://www.exim.org/
> ## Please use the Wiki with this list - http://wiki.exim.org/


_________________________________________________________________
Windows Live™ Groups: Create an online spot for your favorite groups to meet.
http://windowslive.com/online/groups?ocid=TXT_TAGLM_WL_groups_032009