Re: [Exim] dated addresses (ACL version)

Top Page
Delete this message
Reply to this message
Author: Kirill Miazine
Date:  
To: Kevin Reed
CC: exim-users
Subject: Re: [Exim] dated addresses (ACL version)
* Kirill Miazine [2003-12-28 13:56]:
> * Kirill Miazine [2003-12-25 12:59]:
> > ACL version, more features!
> [..]
> > ACLs (modify domains to suit your needs):
> >
> > === start ACL ===
> [...]
> > === end ACL ===
>
> === 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 ===


It should be mentioned that the above ACL handles addresses of the form:

    * user-dated-XXX@???
    * user-exp-XXX@???


In the original post addresses were of the form:

    * user-expXXX@???


The reason for the change is that I simply cut and pasted the fixed ACL
from exim.conf on my system. :)

Happy holidays.

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