[exim] for-loop inside an ACL

Páxina inicial
Borrar esta mensaxe
Responder a esta mensaxe
Autor: Cyborg
Data:  
Para: exim-users
Asunto: [exim] for-loop inside an ACL
Hi guys,

quick question ,

this is inside the acl_smtp_data :

...
   accept  condition  = ${if or{\
                                { and{ {!def:spam_score_int}{ 
eq{$authenticated_id}{} } }}\
                                { match{ ${lookup mysql { .... SQL .... 
which uses ${domain:$recipients}   }} }{1} }\
                               } {1}}
           add_header = X-Spam-Note: SpamAssassin uebersprungen :  
domain=${domain:$h_to:} e=${domain:$recipients}
...


it will skip spamassassin if it's disabled for the recipientdomain in
the database.

Can i use a for-loop in this acl to check all the entries in $recipients
if there is more than one entry ?

If theres one recipient whos using spamassassin, it has to be scanned,
which means in process logic.. only if all of those checks would skip
the spamcheck, skip it entirely . which leads me to the the next question:

If the for-loop is possible there, how do i manipulate let's say
"$acl_c_spamcheck" inside the loop ?

That the above construct won't work inside a loop is obviose.. it needs
to be something like this :

set acl_c_spamcheck = 1;
  for {
            condition  != ${if or{\
                                { and{ {!def:spam_score_int}{ 
eq{$authenticated_id}{} } }}\
                                { match{ ${lookup mysql { .... SQL .... 
which uses ${domain:$recipients}   }} }{1} }\
                               } {1}}
            set acl_c_spamcheck = 1;
}


accept  condition  = ${if eq{$acl_c_spamcheck}{0}}
           add_header = X-Spam-Note: SpamAssassin uebersprungen :  
domain=${domain:$h_to:} e=${domain:$recipients}



Has anyone, by accident, a working loop by hand ? I can imagine more
people need it.


mit freundlichen Grüßen,
M.Schwarz