Re: [exim] fun with ACLs

Startseite
Nachricht löschen
Nachricht beantworten
Autor: Marc Perkel
Datum:  
To: exim-users
Betreff: Re: [exim] fun with ACLs
That's cool. Can you write a program to ballance my checkbook using ACLs?

Tony Finch wrote:

>hanoi:
>  require
>    set acl_c0 = ${if def:acl_c0 {$acl_c0} {0} }
>    set acl_c1 = ${if def:acl_c1 {$acl_c1} {a b c} }
>  accept
>    condition  = ${if >{$acl_c0}{9} }
>  accept
>    set acl_c0 = ${eval: $acl_c0 + 1 }
>    set acl_c1 = ${sg {$acl_c1} {(.) (.) (.)} {\N$1 $3 $2\N} }
>    acl        = hanoi
>    logwrite   = move ${eval: $acl_c0 - 1 } ${sg {$acl_c1} {(.) (.) (.)} {\Nfrom $1 to $2\N} }
>    set acl_c1 = ${sg {$acl_c1} {(.) (.) (.)} {\N$3 $1 $2\N} }
>    acl        = hanoi
>    set acl_c1 = ${sg {$acl_c1} {(.) (.) (.)} {\N$2 $1 $3\N} }
>    set acl_c0 = ${eval: $acl_c0 - 1 }

>
>fibonacci:
>  require
>    set acl_c0 = ${if def:acl_c0 {$acl_c0} {0} }
>    set acl_c1 = ${if def:acl_c1 {$acl_c1} {1} }
>    logwrite   = fibonacci $acl_c1
>    set acl_c2 = ${eval: $acl_c0 + $acl_c1 }
>    set acl_c0 = $acl_c1
>    set acl_c1 = $acl_c2
>    acl        = fibonacci

>
>reverse:
>  require
>    set acl_c0 = ${if def:acl_c0 {$acl_c0} {$smtp_command_argument} }
>  deny
>    condition  = ${if ={${strlen:$acl_c1}}{${strlen:$smtp_command_argument}} }
>    message    = $acl_c1
>  require
>    set acl_c1 = ${sg {$acl_c0} {(.)(.*)} {\$1} }$acl_c1
>    set acl_c0 = ${sg {$acl_c0} {(.)(.*)} {\$2} }
>    acl        = reverse

>
>Tony.
>
>