Subject: "OR" condition

From: Adrenalized Megadeth <[email-masked]>
Date: Tue, 14 Mar 1995 22:07:10 +0100 (MET)

I need to do the following:

1. If mail is from name1@site or from name2@site then do blablabla.
2. If mail is to mailing-list but not from name1@site, or if mail is 
   from name2@site then do blablabla.

How can it be done without repetition?

ranan

---

From: [email-masked] (David W. Tamkin)
Date: Wed, 15 Mar 1995 23:17:16 -0600 (CST)

Ranan Samanya asked,

| I need to do the following:
|
| 1. If mail is from name1@site or from name2@site then do blablabla.
| 2. If mail is to mailing-list but not from name1@site, or if mail is
|    from name2@site then do blablabla.
|
| How can it be done without repetition?

Now that's a bit confusing.  Are those the same blablabla to be tested for
at the same time, or are those two entirely separate situations -- where
blablabla has nothing to do with the other blablabla?  The first doesn't
make sense, because if you're going to do blablabla to all mail from
name1@site why should you test for its NOT being from name1@site if it's
to a certain mailing list?  So I'll assume the second.

1.
   :0 and flags
   * ^From.*(name1|name2)@site
   blablabla

If the two sites are different (Ranan didn't specify),

   * ^From.*(name1@site1|name2@site2)

Of course, "^From.*" may not necessarily be the appropriate way to test for
what Ranan had in mind by saying "from" in the question.

2. This requires weights or a nasty mess of variables of braces: I'd pick
the weights:

   :0 flags
   * 2147483647^0 ^From.*name2@site
   * 1^0 ^TOmailinglist
   * -1^0 ^From.*name1@site
   blablabla