Make links non-clickable and rename attachments?

Jules Field MailScanner at
Tue Nov 9 22:10:13 GMT 2010

On 09/11/2010 16:06, John Wilcock wrote:
> Le 09/11/2010 16:51, Julian Field a écrit :
>> Not very easily, without having to introduce you guys to the fun of
>> search and replace regexps, which would scare most people s***less.
> I don't entirely agree - what might indeed be daunting for the 
> majority of end users should be perfectly within the grasp of the 
> average sysadmin.
You are quite right, and I found a reasonable way of extending the syntax.
In filename.rules.conf, as well as saying
rename    \.reg$    Renaming Registry files    Renaming Registry files
you can now also say things like this:
rename to .txt    \.reg$    Disarming Registry files    Renaming 
Registry files

That rule will rename any file ending in ".reg" (in any combination of 
lower or upper case) so that the ".reg" is replaced with ".txt".

So when the user receives it and double-clicks on it, instead of 
immediately being merged into their registry, it will be opened in a 
text editor.

And as someone else suggested, you can do
rename to .ppt    \.pps$    Nasty Powerpoint shows    Nasty shows
to automatically rename .pps files to .ppt files instead.

Note that the text matched by the rule's pattern is *replaced* with the 
"rename to" text, it isn't just added on the end.

The "Rename Pattern" setting in MailScanner.conf is now called "Default 
Rename Pattern", as it is only used in filetype.rules.conf, and in 
filename.rules.conf where no "rename to" text is supplied, just the 
"rename" keyword on its own.

That will hopefully do all you need to be able to do, without creating 
any new configuration files or anything nasty like that.

I have just released 4.82.2 which contains all this (and a little fix 
Derek Buttineau needed).

G'night! :-)


Julian Field MEng CITP CEng
Buy the MailScanner book at

Need help customising MailScanner?
Contact me!
Need help fixing or optimising your systems?
Contact me!
Need help getting you started solving new requirements from your boss?
Contact me!

PGP footprint: EE81 D763 3DB0 0BFD E1DC 7222 11F6 5947 1415 B654
Follow me at

This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

More information about the MailScanner mailing list