Postfix et piece jointes

bonjour
dans le main.cf de postifx j’ai rajoute les lignes

body_checks = regexp:/etc/postfix/body_checks
#mime_header_checks = regexp:/etc/postfix/mime_checks

malgre sa je recoit toujours des pieces jointes exe ; bat etc…

si je decommente la ligne mime_header_checks je ne peux plus envoyer de pieces jointe exe ; bat etc… (il marche à l’envers :confused: )

pour le body_check j’ai fait un portmap /etc/postfix/body_check

aurais je oublier quelque chose :question:

merci a+

salut,

dans /etc/postfix/main.cf :

Verification type mime

RegEx de vérification des type mime des pieces jointes aux emails

body_checks = pcre:/etc/postfix/body_checks

Dans /etc/postfix/body_checks :

/^Content-(Disposition|Type): application/x-msdownload/ REJECT This type of attachements are banned on my server
/^Content-(Disposition|Type): application/mixed/ REJECT This type of attachements are banned on my server
/^Content-(Disposition|Type): application/vnd.ms-powerpoint/ REJECT This type of attachements are banned on my server

/^Content-(Disposition|Type): video/x-ms-wmv/ REJECT This type of attachements are banned on my server

/^Content-(Disposition|Type):.name="?..(pps|wmv|386|acm|asp|avb|wav|bin|cla|class|dat|bat|com|exe|cmd|cnv|csv|drv|htf|htm|html|class|hta|whf|oci|shs|sys|tlb|tsp|wbf|wiz|wsh|pif|vb|lnk|scr|reg|chm|wsh|js|inf|job|ini|shb|scp|scf|wsc|sct|dll)/ REJECT Files attached to your emails are prohibited on my server because as they may contain viruses
/name="?[^"].(bat|com|pif|vb|exe|lnk|scr|reg|chm|wsh|js|inf|shs|job|ini|shb|scp|scf|wsc|sct|dll|386|acm|asp|avb|bin|cla|cmd|cnv|cs|drv|gms|hlp|nta|hit|mht|mpd|ocx|ov|sys|tlb|tsp|vxd|wbt|wiz)"?/ REJECT Files attached to your emails are prohibited on my server because as they may contain viruses
/^(.
)name=(.*).(pps|exe|lnk|dll|eml|shs|vbe|hta|com|vbs|vbe|js|jse|bat|cmd|vxd|scr|shm|pif|chm)$/ REJECT Files attached to your emails are prohibited on my server because as they may contain viruses

un p’tit coup de /etc/init.d/postfix reload et ca soit marcher

++

PS : si c’est ok - mets un coup de [Resolu] :wink:

attention moi j’interdis aussi le pps (power point) - donc fait ton choix

wouaaaa rien ne sert de courrir je l’avais zapper se post

merci polonix

entre temps j’ai installe sanitizer mais je vais zssayer sur une autre machine merci et te tiens au courant

tu prend pcre dans : body_checks = pcre:/etc/postfix/body_checks

mom erreur serais cette ligne alors ?
mime_header_checks = regexp:/etc/postfix/mime_checks

a+