On Tue, 16 Jan 2007, [EMAIL PROTECTED] wrote:

> I have tried the following in a MIME ACL but the $1 numerical variable
> does contain anything:
>  
> # Discard e-mail with graphic file attachment.
>         discard condition       =       ${if match
> {${lc:$mime_filename}} {[.] *(gif|jpg|jpeg|png|bmp)\$}}
>                 !sender_domains =       +ok_domains
>                 logwrite        =       External e-mail from
> '$sender_address' with invalid attached file type ($1) '$mime_filename'
> - discard!
>  
>  
> Searched the current on-line documentation and the Wiki but can't find
> an example for what I am after.
>  
> Not sure if I want to do is possible.

The value of $1 is not preserved outside an individual string expansion.
However, there is no reason why you can't repeat the regex in an ${sg 
expansion to pick out the file type - though as it is in $mime_filename 
already I'm not sure why you want to log it twice.

-- 
Philip Hazel            University of Cambridge Computing Service
Get the Exim 4 book:    http://www.uit.co.uk/exim-book

-- 
## List details at http://www.exim.org/mailman/listinfo/exim-users 
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://www.exim.org/eximwiki/

Reply via email to