procmail
[Top] [All Lists]

Re: Change extensions of Files

2000-11-21 11:08:48
At 14:19 2000-11-21 +0000, Ricardo Durão elucidated thus:

 I instaled the procmail-sanitizer.tar.gz.. It's work very well and I am
blocking email with attach archives *.exe. So it's change the extensions of
another files like *.doc and put *$xxx-doc. How can Do to the procmail not
change the extensions of this files.

[*REALLY HUGE* SNIP]

Is this script supposed to be the stock sanitizer, or a modified version of it? Posting a large script without any description isn't warranted - as is posting the _stock_ (unmodified) script, since anyone intimatley familiar with it should already have it.

You may be unaware that .DOC (Document), .DOT (Document Template), .XLS (Excel Spreadsheet), .XLT (Excel Template), and XLW (dunno specifically what this is) files can have trojan/virus macros embedded in them, which is obviously why the sanitizer handles them just like any other potential hazard.

If you want to remove .doc from the handling, put a REALLY BIG caution comment at the top that this script is hacked, then go down to the MANGLE_EXTENSIONS section of the script. You should familiarize yourself with regular expressions sometime (they're an important part of Procmail).

At the end of the first line, you'll see:

        do[ct]|xl[swt]|

Read that as:
        do [c or t]             (doc, dot)
        xl [s or w or t]        (xls, xlw, xlt)

If you ONLY want to eliminate sanitizing of .DOC, then change
        do[ct]
to:
        dot

That should do the trick for you.

Keep in mind that the sanitizer is a lot less effective if you go rooting around and castrating it.


---
 Please DO NOT carbon me on list replies.  I'll get my copy from the list.

 Sean B. Straw / Professional Software Engineering
 Post Box 2395 / San Rafael, CA  94912-2395

_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>