Re: [exim] recording failed rcpt to's

Top Page
Delete this message
Reply to this message
Author: Andrew
Date:  
To: Giuliano Gavazzi
CC: exim-users
Subject: Re: [exim] recording failed rcpt to's
Thanks for the quick reply :)

I like this the most


warn domains = +local_domains
     !verify = recipient
*     *insert into db*
*
I changed it to


deny domains = +local_domains
     !verify = recipient
*      *condition = (insert insert into db statement)
     message = unknown user


The problem with warn is that if the user is unknown, it still tries to
pass it onto the next ACL, which doubles up on the queries :( - This
way, if the user doesn't exist, it doesn't waste the time trying the
vrfy again :)

Many thanks for your advice.

Cheers,
Andrew

Giuliano Gavazzi wrote:

> At 9:16 pm +1100 2004/11/09, Andrew wrote:
>
>> Hi All -
>>
>> I am trying to record failed rcpt's in real-time (not from searching 
>> through log-files).   At the moment my rcpt to ACL says -
>>  accept  domains       = +local_domains
>>      endpass
>>       message       = unknown user
>>       verify        = recipient

>>
>>
>> I plan on inserting the information about the failed rcpt to into a
>> db (I am already using the MySQL driver with no problems....) - I am
>> just confused about how to put the command in the ACL (so it only
>> executes if the verification fails?
>>
>> What would be the best method? Any suggestions/advice?
>
>
> given than
>
> accept conditionA
>        endpass
>        conditionB

>
>
> is equivalent to:
>
> deny conditionA
>      !conditionB

>
> accept conditionA
>        conditionB

>
> in either order
>
> and that you would need
>
> conditionB =
>           verify = recipient
>           insert into db

>
> but that when verify is false there is no need to do the lookup to
> establish if conditionB is false, and it is exactly when verify is
> false that you would need to insert in the database
>
> I would say that you cannot do this with the accept...endpass alone.
>
> Instead I would split this as depicted above:
>
> deny domains = +local_domains
>      !verify = recipient
>      insert into db

>
>
> accept domains = +local_domains
>      verify = recipient

>
>
> in the order that you find more convenient (that is, iff you reject
> more than accept put the deny before)
>
> or equivalently, but more cleanly, precede the accept...endpass with
>
> warn domains = +local_domains
>      !verify = recipient
>      insert into db

>
> g
>