Re: why does Anomy remove the body of a plain text message ?

From: Bjarni R. Einarsson (
Date: Wed 17 Apr 2002 - 11:33:45 UTC

  • Next message: Sampo Nurmentaus: "Converting word docs to pdf"

    On 2002-04-16, 19:11:44 (-0500), mark david mcCreary wrote:
    > I'm interested in using Anomy to clean up any problems it finds
    > (defang active HTML, rewrite long MIME headers, etc), and remove and
    > save any attachments (into the quaranine directory) in incoming email.
    > Instead it removes the body of the message, as it seems to think the
    > body of the message is an attached file ?

    There is no technical difference between an "attached file" and the "message
    body" - it's just a question of disposition whether an attachment is marked
    as inline or not. The sanitizer, being a security tool, doesn't give
    attachments marked as "inline" any special treatment. :)

    > Using Anomy 1.49. My configuration file is
    > file_list_rules = 1
    > file_list_1 = ^[^\.]+$

    What are you trying to do here? You specify a regular expression
    matching all files which don't have a dot in their name, but you don't
    tell the program what to do with those files. You need a line saying
    "file_list_1_policy = <something>"

    If you want text attachments to be left in the message, you need to add
    another ruleset saying so:

        file_list_rules = 2
        file_list_2 = \.txt$
            file_list_2_policy = accept

    Since you are cleaning the HTML, I assume you want to allow HTML
    content to pass through as well, in which case you should do as
    follows, to accept .txt, .htm and .html files:

        file_list_2 = \.(txt|html?)$
            file_list_2_policy = accept

    Otherwise the text/HML parts will simply get saved by your default

    > file_default_policy = save

    Bjarni R. Einarsson                           PGP: 02764305, B7A3AB89                -><-    

    Check out my open-source email sanitizer: Spammers, please send plenty of email to:

    hosted by