[Mimedefang] Virus rules problems

Ashley M. Kirchner ashley at pcraft.com
Fri Dec 14 16:34:41 EST 2001


    Ok, so I'm using the standard Virus rule that comes with MDefang:

    if ($VirusFound && entity_contains_virus($entity)) {
        # Notify the sender if you desire
        action_notify_sender("The attachment \"$fname\" was deleted.  It
contains\n".
                             "a known virus.\nHere is the output from
the virus scanner:\n$VirusScannerMessages");

        return action_drop_with_warning($entity,
                "The attachment \"$fname\" contains a known virus.  It
has been quarantined.\n" .
                "Here is the output from the virus
scanner:\n$VirusScannerMessages");
    }


    And the notify_sender() part works great, however the
action_drop_with_warning() is acting goofy.  This is what I receive:


Date: Fri, 14 Dec 2001 14:20:09 -0700 (MST)
From: Ashley M. Kirchner <ashley at pcraft.com>
To: tester at gemini.pcraft.com
Parts/Attachments:
   1   Shown    9 lines  Text, "WARNING.TXT"
   2.1 Shown    1 lines  Text
----------------------------------------

WARNING: This e-mail has been altered by MIMEDefang.  Following this
paragraph are indications of the actual changes made.  For more
information about your site's MIMEDefang policy, contact
admin at pcraft.com.  For more information about MIMEDefang, see:

                  http://www.roaringpenguin.com/mimedefang/

MIME::Entity=HASH(0x849b8ec)
MIME::Entity=HASH(0x849b76c)

    [ Part 2.1: "Attached Text" ]

Testing, one two three....

------------------------------------

    Um, isn't it supposed to have the actual message?  Why does it show
MIME::Entity in it?

--
W | I haven't lost my mind; it's backed up on tape somewhere.
  +--------------------------------------------------------------------
  Ashley M. Kirchner <mailto:ashley at pcraft.com>   .   303.442.6410 x130
  IT Director / SysAdmin / WebSmith             .     800.441.3873 x130
  Photo Craft Laboratories, Inc.            .     3550 Arapahoe Ave. #6
  http://www.pcraft.com ..... .  .    .       Boulder, CO 80303, U.S.A.





More information about the MIMEDefang mailing list