[Mimedefang] Tracing/Debugging MIMEDefang

Peter A. Cole peteracole at bigpond.com
Thu Feb 26 02:13:23 EST 2004


----- Original Message ----- 
From: "Michael Sims" <michaels at crye-leike.com>
To: <mimedefang at lists.roaringpenguin.com>
Sent: Thursday, February 26, 2004 1:15 AM
Subject: RE: [Mimedefang] Tracing/Debugging MIMEDefang


> Peter A. Cole wrote:
> > Hi all,
> >
> > What's the best way to see what actions are happening when
> > mimedefang-filter processes spam and/or virii?
>
> If I'm trying to troubleshoot a problem with my filter, I'll do the
> following:
>
> (1) After altering the filter, I will tail /var/log/maillog just to make
> sure that my filter isn't printing anything to STDERR (happens most
> frequently with me with typos).
> (2) I'll then add calls to md_syslog to print debug information in my
> Mimedefang log file.
> (3) Sometimes I'll temporarily use action_add_header() to add debug
> information directly into the headers of a message I'm using as a test.
>

I'll have a go at doing this tonight. I assume by simply putting in
action_add_header("Deleting recipient ", $recip) or similar within the loop
will tell me soon enough if this is being processed or not.

> > I have a problem whereby when I receive spam, not only does it get
> > sent to my spamdrop mailbox, but it still gets delivered to the
> > original recipient.
>
> I looked at your filter.  You need to change this:
>
> foreach $recip (@recipients) {
>
> to this:
>
> foreach $recip (@Recipients) {
>
> Perl variables are case sensitive.  In your filter, @recipients is not
> defined so the foreach loop will never be entered.

I did this before downloading my email this afternoon, but didn't make a
difference unfortunately. I copied and pasted these entries straight from
the FAQ, then later simply moved the adding of the recipients inside the
loop.

>
> > And, to add to the confusion, if I send a test spam message from one
> > of my local accounts to another local account, it gets delivered
> > twice to my spamdrop (once on the way out to my ISP's smarthost and
> > once when fetchmail retrieves it) and once to the original recipient.
>
> You may want to consider skipping the spam assassin check (and adding to
the
> spamdrop) on messages relayed from trusted hosts.  There are lots of
> examples in the list archives on how to do this.
>

I wasn't doing this to cover the small chance of one of my Windows boxes
getting infected or something to ensure nothing goes out of my network as
well as coming in. I think if I fix the original problem, then spam or virii
going out will simply get canned before they get to the ISP, which is what I
want to do.

> HTH...
>
> ___________________________________________
> Michael Sims
> Project Analyst - Information Technology
> Crye-Leike Realtors
> Office: (901)758-5648  Pager: (901)769-3722
> ___________________________________________

Thanks for you tips Michael, I'll try the 3 tips at the beginning of your
post and let you know how I go.

Pete



More information about the MIMEDefang mailing list