# SOLVED Amavisd-New blocks .exe in .zip

## kutte128

hello,

my amavisd-new suddenly blocks exe-files in zips.

it worked fine some time ago.

this is my banned_filename_re:

```

$banned_filename_re = new_RE(

### BLOCKED ANYWHERE

# qr'^UNDECIPHERABLE$',  # is or contains any undecipherable components

  qr'^\.(exe-ms|dll)$',                   # banned file(1) types, rudimentary

# qr'^\.(exe|lha|tnef|cab|dll)$',         # banned file(1) types

### BLOCK THE FOLLOWING, EXCEPT WITHIN UNIX ARCHIVES:

# [ qr'^\.(gz|bz2)$'             => 0 ],  # allow any in gzip or bzip2

  [ qr'^\.(rpm|cpio|tar)$'       => 0 ],  # allow any in Unix-type archives

  qr'.\.(pif|scr)$'i,                     # banned extensions - rudimentary

### BLOCK THE FOLLOWING, EXCEPT WITHIN ARCHIVES:

 [ qr'^\.(zip|rar|arc|arj|zoo)$'=> 0 ],  # allow any within these archives

  qr'^application/x-msdownload$'i,        # block these MIME types

  qr'^application/x-msdos-program$'i,

  qr'^application/hta$'i,

                           # Windows Metafile file(1) type

  # block certain double extensions in filenames

  qr'\.[^./]*[A-Za-z][^./]*\.\s*(exe|vbs|pif|scr|bat|cmd|com|cpl|dll)[.\s]*$'i,

 qr'.\.(ade|adp|app|bas|bat|chm|cmd|com|cpl|crt|emf|exe|fxp|grp|hlp|hta|

        inf|ins|isp|js|jse|lnk|mda|mdb|mde|mdw|mdt|mdz|msc|msi|msp|mst|

        ops|pcd|pif|prg|reg|scr|sct|shb|shs|vb|vbe|vbs|

        wmf|wsc|wsf|wsh)$'ix,  # banned ext - long

);

```

where is the error?

my amavisd-new version is 2.6.1-r1.

i don't know exactly when this error first occured, but i testet it some time ago without problems

sincerely,

kutte128Last edited by kutte128 on Fri Jan 16, 2009 2:14 pm; edited 1 time in total

----------

## cach0rr0

from what i can see...and i may be wrong

```

  qr'^\.(exe-ms|dll)$',                   # banned file(1) types, rudimentary 

```

amavisd-new *does* unpack archives, so I'd imagine there's a fair chance it's unpacking the archive, passing the exe to `file`, and blocking. 

should move that down to 'block except within archive'

that's my only guess. hope it's right!

----------

## kutte128

i commented out that entry and now it seems working again.

amavis blocks all .exe and allows them in zips again

----------

