В /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»