Amaveisd-new - permitir anexo
Pessoal,
Tenho instalado o amavisd-new junto com o postfix funcionando blz.
Está barrando anexos e enviando mensagem para o remetente.
Tenho duas dúvidas:
1° Gostaria de personalizar a mensagem enviada para o remetente do anexo quando este for barrado
2° Preciso liberar anexos do tipo .exe (sei que é perigoso, mas preciso) e não estou conseguindo.
Segue o script do amavis (acho que é o responsável pelos banned_files)
$banned_filename_re = new_RE(
# qr'^UNDECIPHERABLE$', # is or contains any undecipherable components
# block certain double extensions anywhere in the base name
qr'\.[^./]*\.(exe|vbs|pif|scr|bat|cmd|com|cpl|dll)\.?$'i,
# qr'[{}]', # curly braces in names (serve as Class ID extensions - CLSID)
qr'^application/x-msdownload$'i, # block these MIME types
qr'^application/x-msdos-program$'i,
qr'^application/hta$'i,
# qr'^message/partial$'i, qr'^message/external-body$'i, # rfc2046 MIME types
# [ qr'^\.(Z|gz|bz2)$' => 0 ], # allow any type in Unix-compressed
[ qr'^\.(rpm|cpio|tar)$' => 0 ], # allow any type in Unix archives
[ qr'^\.(|zip|rar|arc|arj|zoo)$'=> 0 ], # allow any type within such archives
# qr'.\.(exe|vbs|pif|scr|bat|cmd|com|cpl)$'i, # banned extension - basic
# qr'.\.(ade|adp|app|bas|bat|chm|cmd|com|cpl|crt|exe|fxp|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|wsc|wsf|wsh)$'ix, # banned ext - long
Alguém pode me ajudar?
Amaveisd-new - permitir anexo
Pessoal,
consegui uma solução paleativa. Não sei se é a melhor forma, mas...
$banned_filename_re = new_RE(
# qr'^UNDECIPHERABLE$', # is or contains any undecipherable components
# block certain double extensions anywhere in the base name
qr'\.[^./]*\.(exe|vbs|pif|scr|bat|cmd|com|cpl|dll)\.?$'i,
# qr'[{}]', # curly braces in names (serve as Class ID extensions - CLSID)
### qr'^application/x-msdownload$'i, # block these MIME types
### qr'^application/x-msdos-program$'i,
### qr'^application/hta$'i,
# qr'^message/partial$'i, qr'^message/external-body$'i, # rfc2046 MIME types
# [ qr'^\.(Z|gz|bz2)$' => 0 ], # allow any type in Unix-compressed
[ qr'^\.(rpm|cpio|tar)$' => 0 ], # allow any type in Unix archives
# [ qr'^\.(|zip|rar|arc|arj|zoo)$'=> 0 ], # allow any type within such archives
# qr'.\.(exe|vbs|pif|scr|bat|cmd|com|cpl)$'i, # banned extension - basic
qr'.\.(exe|ade|adp|app|bas|bat|chm|cmd|com|cpl|crt|fxp|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|wsc|wsf|wsh)$'ix, # banned ext - long
# qr'.\.(mim|b64|bhx|hqx|xxe|uu|uue)$'i, # banned extension - WinZip vulnerab.
### qr'^\.(exe-ms)$', # banned file(1) types
# qr'^\.(exe|lha|tnef|cab|dll)$', # banned file(1) types
);
# See http://support.microsoft.com/default...;EN-US;q262631
# and http://www.cknow.com/vtutor/vtextensions.htm
Amaveisd-new - permitir anexo
Fiz diferente: ao enviar um .exe, p.e. para um cliente, o usuario pode criar um zip protegido por senha contendo o arquivo. Vai chegar como *******UNCHECKED*******
Sds,
:idea: