Szerző: Jeremy Harris Dátum: Címzett: exim-users @ exim. org Tárgy: Re: [exim] Exim4 condition, need help
Michael Bordignon wrote: >
> Hi there,
>
> I'm trying to have exim look at the sender address for all incoming
> mail, if it matches more than one row (via a mysql query) then prepend
> the subject with 'foo'.
>
> I've come this far;
>
> --
> set acl_m9 = mysql;SELECT COUNT(*) FROM prospect_addresses WHERE email
> LIKE '$sender_address'
That's a list-syntax msql lookup; probably not what you want.
Try:
warn
set acl_m9 = ${lookup mysql{stuff} {$value}}
>
> if acl_m9 contains "1" then
That isn't acl syntax either. Perhaps
"condition = ${if match {foo}{bar}}
(but, also, you wanted "more than one", not "one, or eleven, or 21....")
>
> headers add "New-Subject: [foo] ${escape:$h_subject:}"
> headers remove Subject
> headers add "Subject: $h_new-subject:"
> headers remove New-Subject
That's router syntax....
>
> endif
> --
>
> I'm totally unsure where to place this within my Exim 4.60 config
> however, or even if I have the syntax correct (Exim syntax confuses me
> much).
>
> Could anyone lend a hand?