Just an idea for handling tnef

From: ja_szucs (
Date: Thu 18 Sep 2003 - 04:57:10 GMT

  • Next message: szucs: "Re: Just an idea for handling tnef"

    I have an idea for simple handling of tnef for those who use procmail.

    What if winmail.dat would be converted to zip?

    I have not tried yet, but I think it could be done easily this way:

    1. Using procmail, filter the mail body through sed, and replace any mime
    type from application/tnef to application/zip and any filename from
    winmail.dat to
      The procmail filter rules could be like this:
    :0fw B
    * name=.*winmail\.dat
    :0fw B
    | sed 's!winmail\.dat!!g'
    :0fw B
    | sed 's!application\/ms.tnef\.dat!application\/zip!g'

    2. Setup a file_list rule for files in sanitizer.cfg, that
    passes these file through a very simple tnef2zip script, which actually
    does the conversion to zip. The script has not more than 5 lines (most of
    which are variable assignments :-) ), and it only calls the unix tool
    'tnef', and zip. I have not tested it yet as a whole, so I does not present
    it here. The script could also call e.g. clam av to do some virus checking,
    before zipping up the files.

    What is your opionion about this?

    Miert fizetsz az internetert? Korlatlan, ingyenes internet hozzaferes a FreeStarttol.
    Probald ki most!

    hosted by