Re: [exim] ACL conditions +mysql

Página superior
Eliminar este mensaje
Responder a este mensaje
Autor: Wakko Warner
Fecha:  
A: Ugly_Duck
Cc: Exim-users
Temas nuevos: [exim] Exim Stats
Asunto: Re: [exim] ACL conditions +mysql
Ugly_Duck wrote:
> MYSQL_Q_ALLOWFILES=select domain from MYSQL_ALLOWFILES \
>                                         where domain='${quote_mysql:$domain}'  \
>                                         AND local_part='${quote_mysql:$local_part} \
>                                         AND opt_allowfiles = 1 ( 1 - allow files )

>
>  condition    =    {!${lookup mysql{MYSQL_Q_ALLOWFILES}{1}{0}}  \
>                         ${if match {${lc:$mime_filename}}{\N(\.bat|\.com|\.exe|\.pif|\.prf|\.scr|\.vbs|\.gif|\.jpg|\.png|\.tif)$\N}{1}{0}}}


Your Syntax is wrong. You can also remove all of the \. in the match and
place a single \. before the (

this won't work directly, it's only to give you an idea of what you can do.

type something like:
condition = ${if match{yourfilename}{\Nthat regexp\n}\
        {${lookup mysql{sql statement}{yes}{no}}} \
        {no}\
    }


Change the select to start out as: select 1 from ...
and add limit 1 at the end.

--
Lab tests show that use of micro$oft causes cancer in lab animals