Re: Finer control of header_checks

From: Paul Gardiner (no email)
Date: Thu Dec 02 2004 - 13:28:14 EST


From: "Victor Duchovni" <>
> On Thu, Dec 02, 2004 at 03:08:50PM -0000, Paul Gardiner wrote:
>
>> From: "Matt" <>
>> >Paul Gardiner wrote:
>> >
>> >>> If you search the archives for INGORE, (sorry Noel) :), there are
>> >>> some examples of multiple condition statements.
>> >>
>> >>I can't find it. Do you remember the principle of how it worked?
>> >>
>> >
>> >
>> >The relevant section is pasted below. I have no idea whether this
>> >is relevant to your original question, (bad memory), but here it is.
>> >I do hope Noel doesn't mind me reposting his work?
>> >Obviously, it would need adapting to suit the intention.
>> >
>> >
>> ># header check to remove malformed From: headers.
>> >IF /^From:/
>> >IF !/<>/
>> >IF !/^From:[[:space:]]*$/
>> >/^[^@]+$/ IGNORE no "@" in From: header
>> >/@[^.]+$/ IGNORE unqualified address in From: header
>> >/<[^>]*$/ IGNORE unbalanced "<>" in From: header
>> >ENDIF
>> >ENDIF
>> >ENDIF
>>
>> Brilliant thanks. I can't see if it helps yet, but I didn't know there
>> was an IF/ENDIF construct, so the possibilities have openned
>> up enormously.
>>
>> Still, before I can try that out, I need to get spamassassin working
>> under spampd: still suffering with the other problem I posted a
>> little while ago. If you have any ideas there...
>>
>
> The IF ... ENDIF construct applies one header at a time. With
> header_checks, there is no way to use the content of one header to change
> the filtering of another. This is why header_checks and body_checks are
> efficient, one pass streaming checks, no memory overhead beyond content
> of current header/body element.

Yeah, I see what you mean. Shame, but it makes sense.

There's apparently another way I can turn off header checks just for
stuff from localhost by having two smtpd's running one listening
on 127.0.0.1 and the other listening on the servers main ip. Trouble
is I'm wanting to use before-queue filtering to, so it looks like I'd
need 4 copies of smtpd and 2 copies of spampd running. Do you think
that would work? I'm a bit confused by this approach because
the use of header_checks is controlled by a -o option agains
the 127.0.0.1 copy of smtpd, whereas I thought I read somewhere
else that its cleanup that actually implements the header checks.

Cheers,
    Paul.








Hosted Email Solutions

Invaluement Anti-Spam DNSBLs



Powered By FreeBSD   Powered By FreeBSD