[exim] System Filter change attachments name

Top Page
Delete this message
Reply to this message
Author: Andrew Riesel
Date:  
To: exim-users
Subject: [exim] System Filter change attachments name
I have searched all over the web, but cant seem to find the answer to this.

In the System filter is it possible to chang the name of an attachment
rather than fail it?

The way I have it set up at the moment is,

if $header_content-type: matches 
"(?:file)?name=(\"[^\"]+\\\\.(?:vb[se]|ws[fh]|jse?|exe|com|cmd|shs|hta|bat|scr|pif)\")"
then
  fail text "This message has been rejected because it has\n\
             \tpotentially executable content $1\n\
             \tThis form of attachment has been used by\n\
             \trecent viruses or other malware.\n\
             \tIf you meant to send this file then please\n\
             \tpackage it up as a zip file and resend it."
  seen finish
endif


Which works great at failing the message and sending a return. However,
I would like to change the attacements name from example.exe to a
example_exe within this filter.

Thanks for any help you can provide.

Andrew