[Mimedefang]Localhost Messages Cause 'reject=451 4.7.1 Please try again later'

Michael Sims michaels at crye-leike.com
Wed Mar 17 14:23:16 EST 2004


Jason Granat wrote:
> Here it is Michael.

I think I see your problem.  Here:

>     # Spam checks if SpamAssassin is installed
>     if ($Features{"SpamAssassin"}) {
>     if (-s "./INPUTMSG" < 100*1024) {
[snip]
>     }
>     }
>
>     # Do Spam Header and Redirect
>     if (spam_assassin_is_spam()) {
>         # Change Subject: header
>         action_change_header("Subject", "*****SPAM***** $Subject");
>     }
>
>     if (spam_assassin_is_spam()) {
[snip]

You have the standard size check on INPUTMSG, but then you are later calling
spam_assassin_is_spam() outside of that check.  That sub calls
spam_assassin_check() internally, and you are calling it on ALL messages
that make it to filter_end() without being rejected for some other reason.
This means that you are running SpamAssassin on your 17MB messages, which
could easily cause the slave to timeout.  Additionally, I don't believe that
spam_assassin_check() does any kind of caching of its results, so when you
call spam_assassin_is_spam() twice, you are scanning the message twice,
which needless to say isn't very efficient. (Someone correct me if I'm wrong
about that.)

It would be better to move all of the code you have to change headers and
add recipients inside the original block that runs the spam assassin check,
so that you only run the check once, and you avoid running it at all on
messages that are over 100k.

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



More information about the MIMEDefang mailing list