[Mimedefang] Did I ask my question wrong?

Jim McCullars jim at info.uah.edu
Mon Oct 13 10:25:36 EDT 2003



On Sun, 12 Oct 2003, Wayne E. Smith wrote:

> go (maybe I am putting it in the wrong place. All I want to do is have
> the email that scores over the threshold not to delivered to the
> recipient but instead to a spambox. Can someone please help me out on
> this?

Wayne:

   Welcome to MIMEDefang.  The "thing" that tells MD what to do is the
filter rules file, which is usually named mimedefang-filter.  I am
assuming that you are taking the
suggested-minimum-filter-for-windows-clients (or whatever it's called)
from the examples directory and copying it to your MIMEDefang directory as
mimedefang-filter.  That filter is only a starting point - you have to
modify it to suit your particular needs.  On the version of MD that I run,
the sample filter does indeed tag spam and lets it through.

   I don't use this in my filter so this is untested, but to do what you
want, try this.  In your mimedefang-filter, look for the subroutine
filter_end and you will see where SpamAssassin is called, and where the
headers get changed.  Note that SA does not change headers, it is all done
in the filter.  Look for the statement that does the "action_add_part" (it
is three lines), and add this below it (right above the "} else {" line):

   foreach $recip (@Recipients) { delete_recipient($recip) }
   add_recipient('spambox at mydomain.com');

   The first statement is a mini-loop that will cycle through the
recipients of the email and remove them.  The second one adds your spambox
as a recipient (so that effectively, the email gets redirected to the
spambox).

   Hope this helps...

Jim
*-------------------------------------------------------------------------*
* James H. McCullars                 I Phone: (256) 824-2610              *
* Director of Systems & Operations   I Fax:   (256) 824-6643              *
* Computer & Network Services        I Internet: mccullj at email.uah.edu    *
* The University of Alabama          I -----------------------------------*
*    in Huntsville                   I                                    *
* Huntsville, AL 35899               I This space for rent - CHEAP!       *
*-------------------------------------------------------------------------*



More information about the MIMEDefang mailing list