Subject: ^TO matches Subject: ???

From: [email-masked] (John Yeates)
Date: Thu, 16 Mar 1995 10:14:37 +0000 (GMT)

I have the following rule in my .procmailrc:

:0
* ^TOjunk|social|ugjunk|ugsocial
ugjunk

No other rules write to ugjunk. But a message with a SUBJECT of ugjunk, and
sent just to me, gets dropped in there too!

I'm running 3.10.

-- John Yeates ([email-masked]) ------------------------------------
   For a good time, call gettimeofday().

---

From: [email-masked] (David W. Tamkin)
Date: Thu, 16 Mar 1995 10:36:06 -0600 (CST)

John Yeates wrote,

| I have the following rule in my .procmailrc:
| 
| :0
| * ^TOjunk|social|ugjunk|ugsocial
| ugjunk
| 
| No other rules write to ugjunk. But a message with a SUBJECT of ugjunk, and
| sent just to me, gets dropped in there too!

Try this:

  :0: # a local lockfile is a good idea unless ugjunk is a directory
  * ^TO(junk|social|ugjunk|ugsocial)
  ugjunk

In fact, you could do this too:

  * ^TO(ug)?(social|junk)

Your original search was for ^TOjunk, for social, for ugjunk, or for ugsocial
anywhere in the head; note the grouping difference.