Subject: Re: matching bounce messages

From: Kjetil Torgrim Homme <[email-masked]>
Date: Sun, 05 Dec 2004 08:11:48 +0100

On man, 2004-11-29 at 18:19 +0000, Tony Finch wrote:
> We're using the CMU Cyrus Sieve implementation. A few of our more advanced
> users have asked how to identify bounce messages in a Sieve script. The
> obvious doesn't work:
> 
> 	if envelope :is "from" ""

seems like a bug to me.

> The best phrasing we have seen is
> 
> 	if not envelope :contains "from" "@"
> 
> which is a rather ugly circumlocution. RFC 3028 doesn't say anything about
> null return paths, which is clearly an omission. As a result the Cyrus
> behaviour is hard to classify as a bug.

I don't see why RFC 3028 needs to mention that case explicitly.

   If one of the envelope-part strings is (case insensitive) "from",
   then matching occurs against the FROM address used in the SMTP MAIL
   command.

ok, perhaps it should be a bit more careful in use of terminology and
say "reverse-path address" instead of "FROM address" (to remove all
doubt about what happens to extra parameters on MAIL FROM).  it also
would be nice if it was explicit about what to do with the surrounding
brackets, even though formally, the brackets are not part of
reverse-path.

--

---

From: Tim Showalter <[email-masked]>
Date: Sun, 05 Dec 2004 19:56:41 -0800

> brackets, even though formally, the brackets are not part of

I suspect that the brackets are being treated as part of the path.  The 
spec should probably clarify that this is not the desired behavior, and 
the brackets are just decorative parts of the syntax.

(I don't know what Cyrus does in this case.)

Tim

---

From: Tony Finch <[email-masked]>
Date: Mon, 6 Dec 2004 10:35:52 +0000

On Sun, 5 Dec 2004, Tim Showalter wrote:
>
> I suspect that the brackets are being treated as part of the path.

No, it doesn't treat the brackets as part of the path, otherwise you
would have to include them if the return path is not null, which is not
the case. As expected, testing shows the following does not work:

        if envelope :is "from" "<>"

Tony.
--
f.a.n.finch  <[email-masked]>  http://dotat.at/
SOLE: WEST OR SOUTHWEST 3 OR 4 INCREASING 5 OR 6. FAIR. MODERATE OR GOOD.