The 03.09.04 at 01:51, Carlos E. R. wrote:
I'm getting an increasing number of spams with attachments that have the .pif extensions. I know they can not harm me (not in Linux), but I would like somehow to not download them (they are a 100 Kbytes each).
According to the sdb (Support knowledgebase (rsimai_slox_anti_spam)), the body of a message can be filtered using "/etc/postfix/body_checks", and enabling "body_checks" in "/etc/postfix/main.cf". It is in fact easier than that, according to the "RELEASE_NOTES": [Feature 20020527] Postfix now has three classes of header patterns: header_checks (for primary message headers except MIME headers), mime_header_checks (for MIME headers), and nested_header_checks (for headers of attached email messages except MIME headers). By default, all headers are matched with header_checks. Therefore, including this line in "/etc/postfix/header_checks" /(filename|name)=".*\.(pif)"/ REJECT is sufficient. The sample has this other one, more extensive: /(filename|name)=".*\.(asd|chm|exe|doc|dll|hlp|hta|js|ocx|pif)"/ REJECT The only snag is that the rejection is only logged, I receive no email warning of the fact. I would prefer postfix to send me (not the originator) an email including the headers of the rejected email. I have tested the above locally. Now I will go online and see what happens :-) -- Cheers, Carlos Robinson