[Mimedefang] 'remove_redundant_html_parts called outside of filter_end' problem

alan premselaar alien at 12inch.com
Wed Dec 10 22:17:52 EST 2003


On 12/11/03 4:41 AM, "Justin" <listuser at numbnuts.net> wrote:

> I suspect that I must have fat fingered something somewhere but I haven't
> been able to track it down.  I get an error in my messages log like this
> one each time I receive a message:
> 
> Dec 10 13:30:24 spock perl: remove_redundant_html_parts called outside of
> filter_end
> 
> I must have fat fingered something.  I've gone through it a number of
> times though and haven't found a typo.  I had to comment out the final
> brace; otherwise MD would complain about having an unmatched brace.  I
> can't find a brace that doesn't having a match though.  I'm enclosing my
> mimedefang-filter in case someone has time to browse through it for
> something I did wrong.
> 

I'm guessing it's somewhere around here:

<snip>
                action_change_header("X-Spam-Report", "$fixed_report");
                #action_add_header("X-Spam-Report", "$fixed_report");
                md_graphdefang_log('spam', $hits, $RelayAddr);

            } else {
                action_add_header("X-Spam-Score", "No, $hits ($stars)");
            } # end of $hits >= 10

            } else {
                # Delete any existing X-Spam-Score header?
                action_delete_header("X-Spam-Score");
                action_delete_header("X-Spam-Report");
                action_delete_header("X-Scanned-By");
            } #end of $hits >= $req
<snip>

note that you have:

   } else {
                action_add_header("X-Spam-Score", "No, $hits ($stars)");
            } # end of $hits >= 10

            } else {

and the double } in this area might be throwing off your balance, which is
why you had to comment out the last }  ...


..snip...
> 
> Now I'm not so sure my mimedefang-filter is causing all the temp failures.
> Is ClamAV at fault here?  I figured I'd ask both questions at the same
> time rather than sending my mimedefang-filter twice.  If anyone has any
> ideas about either of my problems I'd love to hear them.  mimedefang.pl
> -test liked my mimedefang-filter at least.
> 

I had issues like this awhile back where CLAMD wasn't connecting to the
socket and failing to start, causing my MD filter to tempfail when calling
it.. it happened after an auto-update (using freshclam) ... i had to delete
the virus databases and run freshclam by hand to generate new databases to
fix it.  so, it could be related to a CLAMD/CLAMAV failure or just taking
too much time to process the mail.  I'd check there first...

However, with the problems you have in your filter syntax, I'd first fix
those and then monitor your tempfails.  if they go away, it was just
something with the filter.

hope this helps,

alan




More information about the MIMEDefang mailing list