How can I get Exim to remove attachments from messages?
A0832: (A) The cleanest way is to check for the existence of a “Content-type” header line, and route messages containing it down a pipe to some other program that strips the attachments and re-submits the message to Exim. Alternatively, a transport filter can be used to do the job, as described in C028. (B) A somewhat more hairy way is to use embedded Perl from a system filter to truncate the message’s data file directly, and then use the “headers remote” filter command to get rid of the associated headers.