Re: [Exim] dated addresses (ACL version)

トップ ページ
このメッセージを削除
このメッセージに返信
著者: Kirill Miazine
日付:  
To: Kevin Reed
CC: exim-users
題目: Re: [Exim] dated addresses (ACL version)
* Kirill Miazine [2003-12-25 12:59]:
> ACL version, more features!

[..]
> ACLs (modify domains to suit your needs):
>
> === start ACL ===

[...]
> === end ACL ===


Uh-oh. The original ACL contained had a bug. In short, I forgot that
$acl_m[0-9] are only reset after MAIL, DATA and RSET. New version:

=== start ACL ===
accept domains = +local_domains
       local_parts = ^.+-(exp|dated)-0*(\\d{4,12})\$
       verify = recipient
       set acl_m0 = ${if match{$tod_log}{^(\\d\\d\\d\\d)-(\\d\\d)-(\\d\\d)}\
                      {y=$1 m=$1$2 d=$1$2$3}{}}
       set acl_m1 = ${if match{$local_part}{-(exp|dated)-0*(\\d\{4,12\})\$}\
                      {$2}{}}
       set acl_m2 = ${strlen:$acl_m1}
       set acl_m3 = ${if =={$acl_m2}{4}\
                      {${if <{$acl_m1}{${extract{y}{$acl_m0}}}{no}{yes}}}\
                      {${if =={$acl_m2}{6}\
                         {${if <{$acl_m1}{${extract{m}{$acl_m0}}}{no}{yes}}}\
                         {${if =={$acl_m2}{8}\
                            {${if <{$acl_m1}{${extract{d}{$acl_m0}}}{no}{yes}}}\
                            {${if <{$acl_m1}{$tod_epoch}{no}{yes}}}\
                           }\
                         }\
                        }\
                      }\
                     }
       endpass
       message = Invalid/expired address
       condition = ${if eq{$acl_m3}{yes}{yes}{no}}
=== end ACL ===


--
Kirill Miazine
mailto:km@krot.org
http://km.krot.org/