[exim] How do you use $run in an ACL - SOLVED

Startseite
Nachricht löschen
Nachricht beantworten
Autor: Marc Perkel
Datum:  
To: exim-users
Alte Treads: [exim] How do you use $run in an ACL?
Betreff: [exim] How do you use $run in an ACL - SOLVED

On 4/14/2013 9:16 AM, Marc Perkel wrote:
> I'm trying to run a command and return the result into a variable in
> an ACL. How do you do that? The docs needs an example.
>
> The command examples are:
>
> date +%s
> date --d $h_date: +%s
>
> Thanks in advance.
>
>



I figured it out

# Date and Age

warn    condition = ${if def:h_Date:}
     set acl_m_now = ${run{/bin/date +%s}}
     set acl_m_date = ${run{/bin/date -d "$h_Date:" +%s}}
     set acl_m_age = ${eval:($acl_m_now-$acl_m_date)/86400}