To make sure I understand how encoded attachments are scanned... If a base64
encoded attachment is 12000 lines long, does each body_checks pattern get
run on each of the 12000 lines?  Or does each body_checks pattern get run
just once on the first x bytes of the encoded attachment?

Thanks,
Bill


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Gerry Massat
Sent: Thursday, March 04, 2004 3:22 PM
To: [EMAIL PROTECTED]
Subject: [IMGate] Re: Body filter in basic IMGate config


From: "Cybertime Hostmaster" <[EMAIL PROTECTED]>


> > This is the first line in the body_checks.regexp sent by Len.
> >
> > ~^[[:alnum:]+/]{60,}\s*$~       OK
> >
> > I've looked for info on regexp but can't determine what this matches
> (and
> > OKs).
>
> Encoded files.
>
> The idea is simple.  Regular Expressions are the largest resource hog of
> Postfix.  A large body check file can delay mail to the point where
> connections are timing out.
>
> There are many methods for restructuring these checks to limit this
> effect.  Optimizing, using PCRE on systems with a poor REGEXP library, and
> limiting the number of checks are all good.
>
> But Postfix used to still have a very high overhead when pictures were
> passed through.  This has recently been cut back by adding
> body_checks_size_limit.
>
> Before body_checks_size_limit, the solution was to OK (ignore) lines that
> were encoded.
>
> Even with body_checks_size_limit, the encoding skip can help because so
> many people attach things to email these days.
>
> --Eric

In summary (extremely simplified) that statement says- skip the following
tests for lines longer than 60 characters.
And an important note, any body check that applies to an encoded attachment
will need to appear above this line.  All other tests can be below this
statement.  It helps to look at some files to understand why.  Use
postcat -q <queueid> | more
to see why.



Reply via email to