I copied and pasted your code. Apparently, it's now no longer working
altogether. Kept saying like this:
procmail: [13941] Mon Nov 30 15:57:40 1998
procmail: Assigning "PATH=/home/wn/bin:/usr/local/bin:/usr/bin:/bin"
procmail: No match on
"(^((Original-)?(Resent-)?(To|Cc|Bcc)|(X-Envelope|Apparently(-Resent)?)-To):(.*[^a-zA-Z])?)_news"
procmail: No match on "^To: *phonebook*"
procmail: Locking "/var/spool/mail/wn.lock"
procmail: Assigning "LASTFOLDER=/var/spool/mail/wn"
procmail: Opening "/var/spool/mail/wn"
procmail: Acquiring kernel-lock
procmail: Unlocking "/var/spool/mail/wn.lock"
From mstaley(_at_)vma(_dot_)verio(_dot_)net Mon Nov 30 15:57:40 1998
Subject: news
Folder:
/var/spool/mail/wn 795
procmail: Notified comsat: "wn(_at_)0:/var/spool/mail/wn"
Philip Guenther wrote:
Matt Staley <mstaley(_at_)vma(_dot_)verio(_dot_)net> writes:
According to .maillog with verbose on, it said:
procmail: Notified comsat: "wn(_at_)1174:/var/spool/mail/wn"
procmail: [9909] Mon Nov 30 13:35:48 1998
procmail: Assigning "PATH=/home/wn/bin:/usr/local/bin:/usr/bin:/bin"
procmail: No match on "^To: *news*"
...
so if I used netscape, the .maillog shows:
...
procmail: Match on "^To: *news*"
The mail message that Outlook sends has a To: field that doesn't start
with "news". Perhaps the To: field instead looks like:
To: "news" <news(_at_)verio(_dot_)net>
That would not be matched by the condition. Looking again at the
condition I see that you're slightly confused about regular
expressions. I would suggest checking out era's mini-FAQ. It has a
section on regexps. To put it simply, '*' does not do what you appear
to think it does.
Anyway, the solution is to use the ^TO_ regexp token. Try changing the
recipes to read:
:0
* ^TO_news
{
:0
* ^Subject:.*\<news\>
| (formail -rtA "X-Loop:
news(_at_)stahlie(_dot_)datakids(_dot_)org" ; \
/home/wn/newshdr.pl ) | $SENDMAIL -t
:0
* ^Subject: *\/[^ ]+
| (formail -rtA "X-Loop:
news(_at_)stahlie(_dot_)datakids(_dot_)org" ; \
/home/wn/artret.pl $MATCH) | $SENDMAIL -t
}
I've factored out the matching of "^TO_news" and tweaked the other
regexps to be more accurate or functional. For example, regexps with
the \/ token should almost never have a '*' on what immeadiately
follows the \/.
I've also added the 't' flag to the formail invocations. formail -r
was aimed more towards the UUCP mail environment which, thankfully, has
been mostly stomped out.
Philip Guenther