Запрещаем прием писем с определенными вложениями в Postfix

В /etc/postfix/main.cf добавляем

header_checks = pcre:/etc/postfix/header_checks

А в /etc/postfix/header_checks

/^(.*)name=\»(.*)\.(exe|bat|cmd|mp3)\»$/ REJECT Attachment type not allowed. File «$2» has unacceptable extension: «$3»

Тогда в логах будет приблизительно такое:

Attachment type not allowed. File «document.rar» has unacceptable extension: «rar»

 

Leave a Reply

Ваш адрес email не будет опубликован. Обязательные поля помечены *

You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>