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