milters with postfix

Glenn Steen glenn.steen at gmail.com
Tue Jun 26 17:40:59 IST 2007


On 26/06/07, Nerijus Baliunas <nerijusb at dtiltas.lt> wrote:
> On Tue, 26 Jun 2007 18:02:52 +0200 Glenn Steen <glenn.steen at gmail.com> wrote:
>
> > 2. Speedup for the normal, non-milter, case. If we haven't found any p
> > records, skip the sometimes lengthy (depending on body size) spin
> > through that we need when doing milters. Thus the normal case will
> > become very close, in processing time, to how it was before the p
> > record handling was introduced. This is actually a whooping 4 line
> > thing:-).
>
> It's the following change, yes?
>
>  # Inelegant, but working. Instead of an efficient seek, we spinn through to
> -# after X record. Unless we don't have a body to spin through.
> -    if (!$message->{nobody}) {
> +# after X record. Unless we don't have a body to spin through. Also skip
> +# the spin if we don't have any p records already (to not punish the normal
> +# case).
> +    if (!$message->{nobody} || $pRecordsFound) {
>
> If I understand comment correctly, the last line should be
> +    if (!$message->{nobody} && !$pRecordsFound) {
> or am I mistaken?
>
> Regards,
> Nerijus
>
Argh!
Yes, well... You are right that it should be and, not or... But you
don't need invert the $pRecordFound... We need a body to spin through,
and we need have found p records, so it should be
+    if (!$message->{nobody} && $pRecordsFound) {
I really need that vacation:-). If my logic still is flawed, please
somebody hit me over the head with it!

Jules, will you need an amended patch for that?

-- 
-- Glenn
email: glenn < dot > steen < at > gmail < dot > com
work: glenn < dot > steen < at > ap1 < dot > se


More information about the MailScanner mailing list