[milters] Archive

Lists Index Date Thread Search

Article: 1116
From:
Date: 2006-08-25 10:27:20 -0400
Subject: Re: milter-spamc greylist if not in AWL

Removal...........: milters-request@milter.info?subject=remove
More information..: http://www.milter.info/#Support
--------------------------------------------------------

Quoting Anthony Howe <achowe@snert.com>:

> > There's a lot of ways one could imagine combining greylisting and
> > spamassassin; this is just one.
>
> This will more of less NOT work as desired. RFC 2821 states that after
> the final dot concerning a message content the ONLY responses possible
> are accept or reject. Temporary failure is not an option. Therefore your

You're right, of course. Sent upstream to the scamgrey dude. I spent all my
time looking at rfc 3463 for the "correct" enhanced smtp sub-code (your
milter-gris uses 4.7.1 at rcpt time, several others have decided that it's
safest to stick with 4.3.0, "undefined, my problem not yours") and never
looked at 2821.

I don't expect to go down that road again, but in case anyone else ever does,
another problem with this approach in practice is that you will never see the
"AWL" token in the report header if the AWL delta is 0.0, which is nearly
always the case when you're resending an unmodified message. My code would
never work even if the RFCs allowed it. The scamgrey guy doesn't have this
problem because he's reading the matched rules from SA internals, not the
report output.

What do you think about this? It gives the correct envelope return path to
spamassassin, which allows some SpamAssassin SPF rules to work that would
otherwise never fire.

--- milter-spamc.c.return-path  2006-08-24 21:14:21.000000000 -0400
+++ milter-spamc.c      2006-08-24 22:13:25.000000000 -0400
@@ -667,8 +667,8 @@
                if_name = "unknown";

        length = snprintf(
-               data->line, SMTP_TEXT_LINE_LENGTH, "Received: from %s (%s
[%s]) by %s id %s; ",
-               data->helo, data->client_name, data->client_addr, if_name,
data->work.qid
+               data->line, SMTP_TEXT_LINE_LENGTH, "Return-Path:
<%s>\r\nReceived: from %s (%s [%s]) b
y %s id %s; ",
+               data->work.mail->address.string, data->helo,
data->client_name, data->client_addr, if_
name, data->work.qid
        );

        if (0 < (n = TimeStampAdd(data->line + length, SMTP_TEXT_LINE_LENGTH -
length - 2))) {

Lists Index Date Thread Search