duplicate suppression, sieve, loops, redirect and lost email

Ken Murchison ken at oceana.com
Fri Aug 30 11:37:53 EDT 2002



Lawrence Greenfield wrote:
> 
>    Date: Fri, 30 Aug 2002 10:11:26 -0400
>    From: Ken Murchison <ken at oceana.com>
> [...]
>    It can't, but it _should_ be capable of detecting that the user is
>    trying to redirect directly to themselves and make it a 'keep' instead.
>    The bottom line is that the user is using the wrong action to keep the
>    message.
> 
> Just to annoy Ken, I think I'll disagree with him here.

You haven't annoyed me (yet!)  ;)


> 
> I believe that (in an ideal world) Cyrus should tolerate a redirect
> "myself at example.com" and treat it as a keep.

Should we treat it as a keep, or fail with an appropriate warning?  If
we do a keep without complaining, aren't we just promoting bad sieve
behavior?

BTW, has this issue ever been discussed on mta-filters?


> It turns out that this is much trickier than it first seems,
> though. At CMU, our users have a primary address
> ("leg at andrew.cmu.edu") but can also have other address
> ("leg+cyrus at andrew.cmu.edu") or other addresses at different domains
> ("leg at cmu.edu") that point to the same Cyrus INBOX. (But it gets even
> more complicated! "leg at cmu.edu" might point to my Cyrus INBOX---but it
> might go somewhere else, too.)
> 
> Our Cyrus server runs at "cyrus.andrew.cmu.edu", though. It's fairly
> easy for it to understand that "leg at cyrus.andrew.cmu.edu" is the same
> address as "leg" receiving mail with lmtpd.
> 
> So the problem is: how can we concisely tell whether a given redirect
> address is the same address as the user who is executing the Sieve
> script?

Exactly, we get ourselves into the vacation :addresses problem.  If we
can easily (intelligently?) determine what a user's primary email
addresses are, then we kill 2 birds with one stone.

A (overly?) simple approach is to take the unqualified envelope rcpt
along with recursively broader-scoped pieces of the server hostname and
compare them to the redirect address, ie:

leg at cyrus.andrew.cmu.edu
leg at andrew.cmu.edu
leg at cmu.edu

The problem is that these might be different users in some
installations.  Another problem is aliases.  What if I redirect to
arm at andrew.cmu.edu and this is an aliases to leg at ...?

I also haven't thought about how these solutions might work with
virtdomains.

I agree that it would be nice to to some behind the scenese magic, but I
still think that preventing the problem (ie, don't do that) is far
easier than trying to fix it.

-- 
Kenneth Murchison     Oceana Matrix Ltd.
Software Engineer     21 Princeton Place
716-662-8973 x26      Orchard Park, NY 14127
--PGP Public Key--    http://www.oceana.com/~ken/ksm.pgp




More information about the Info-cyrus mailing list