Postfix Blocking
Blocking
Postfix can block attachments. There are two ways to do this, Header and Body checks. We have to edit the main.cf file for postfix.
Step 1
add these two lines to the main.cf
header-checks = regexp:/etc/postfix/headers
body_checks = regexp:/etc/postfix/bodycheck
Step 2 Header Checks
vi /etc/postfix/headers
# dxdx Subject
/dxdx/ DISCARD
This will discard and messge with dxdx in the Subject
example,
Nov 28 13:14:17 it-manage postfix/smtpd[23931]: connect from ispmxmta06-srv.windstream.net[166.102.165.167]
Nov 28 13:14:18 it-manage postfix/smtpd[23931]: 3CC178783B0: client=ispmxmta06-srv.windstream.net[166.102.165.167]
Nov 28 13:14:18 it-manage postfix/cleanup[23935]: 3CC178783B0: discard: header Subject: dxdx from ispmxmta06-srv.windstream.net[166.102.165.167]; from= to= proto=SMTP helo=
Nov 28 13:14:18 it-manage postfix/smtpd[23931]: disconnect from ispmxmta06-srv.windstream.net[166.102.165.167]