Subject: Re: IS this a bug?

From: Robert Nicholson <[email-masked]>
Date: Sun, 1 Jan 1995 17:44:15 GMT

<[email-masked]> writes:

>| Is this is a bug or can comments only appear outside rules? I doubt
>| that this is the case since it's a no brainer to ignore lines
>| starting with "#"

>No, procmail has always been that way, and I think there's a warning in the
>procmailrc(5) man page not to put comments into the middle of a recipe.

Right.

>| NOTE:..
>| 
>| :0
>| #* !^FROM_DAEMON

>That tells procmail to file all mail unconditionally in $MAILDIR/#*.  If for
>some reason it can't do that, it keeps reading the rcfile for what to do
>instead.  "!^FROM_DAEMON", the next two lines, and the final right brace
>are seen as errors.  Don't you keep a logfile, Robert, at least while you're
>experimenting?

Yes, I do but I find that it doesn't provide me with much
information. 

>From sybase  Sun Jan  1 13:17:35 1995
 Subject: bla
  Folder:  formail -R "Path:" "X-Path:" | formail -I Newsgroups | mail2     339
procmail: Skipped "-rzx To:"
>From sybase  Sun Jan  1 13:18:29 1995
 Subject: bla
  Folder:  formail -R "Path:" "X-Path:" | formail -I Newsgroups | mail2     343
procmail: Skipped "-rzx To:"

VERBOSE = ON

>| * !^From +robert
>| {
>|     FROM=`formail -rzx To:`
>| 
>|    :0 c:
>|     * !? fgrep -e "$FROM" $ALREADYSENT >/dev/null
>|     | echo $FROM >>$ALREADYSENT; \
>|       (formail -rA"Precedence: junk"; \
>|       cat $AWAY;\
>|       echo "-- "; cat $HOME/.signature \
>|       ) | $SENDMAIL -t
>| }

>| When I mail this from account robert. It does in fact match.

>Right; procmail ignores "* !^From +robert" and "{" as errors and looks for
>more code.  The next thing it finds that makes sense is the FROM assignment.

>| However, if I read like this.
>| 
>| #* !^FROM_DAEMON
>| 
>| :0
>| * !^From +robert
>| {
>|     FROM=`formail -rzx To:`
>| 
>|    :0 c:
>|     * !? fgrep -e "$FROM" $ALREADYSENT >/dev/null
>|     | echo $FROM >>$ALREADYSENT; \
>|       (formail -rA"Precedence: junk"; \
>|       cat $AWAY;\
>|       echo "-- "; cat $HOME/.signature \
>|       ) | $SENDMAIL -t
>| }
>| 
>| I wouldn't _correctly_ match.

>Why not?  What you trying to match?  If you want it to match on neither
>^FROM_DAEMON nor ^From +robert, just AND the two negated conditions:

What I mean. Is that it wouldn't, _correctly_, match. ie. It shouldn't
match. which is what happened.

> :0
> * !^FROM_DAEMON
> * !^From +robert
> {
>  all that stuff
> }

>and a match on ^FROM_DAEMON or on ^From +robert will be enough to make the
>conditions fail and skip the braced block.

Absolutely, and that's what it looks like now. 

>David W. Tamkin  Box 3284  Skokie, Illinois  60076-6284
>[email-masked]    MCI Mail: 426-1818   +1 312 714 5610

Suggestion. 

I find that so many of the replies to people would benefit this
list. ie. I don't choose to just reply to the author.

Is there a possibility or a least some interest in the list ammending
Reply-To: back to the list headers?

---

From: [email-masked] (David W. Tamkin)
Date: Sun, 1 Jan 1995 12:57:22 -0600 (CST)

| Suggestion. 
| 
| I find that so many of the replies to people would benefit this
| list. ie. I don't choose to just reply to the author.

Robert, I *have* been replying to both you and the list (maybe I slipped up
that last time).  It's just that the copy from the list takes a little more
time to reach you.  This time I'll reply only to the list.

| Is there a possibility or a least some interest in the list ammending
| Reply-To: back to the list headers?

Bad idea; extremely, extremely bad idea.  We can discuss it on the SmartList
list if you like; it's already been argued through on the list-managers list.

| Yes, I do [keep a logfile] but I find that it doesn't provide me with much
| information. 

Set LOGABSTRACT=all for more information and put VERBOSE=on and VERBOSE=off
around the parts of your rcfile where the problems might be.  I see you
already had VERBOSE set on, but it seems something else is going on with
your program flow, because there's no record in your logfile that procmail
is turning verbosity on.

| >From sybase  Sun Jan  1 13:17:35 1995
|  Subject: bla
|   Folder:  formail -R "Path:" "X-Path:" | formail -I Newsgroups | mail2     339
| procmail: Skipped "-rzx To:"

| >From sybase  Sun Jan  1 13:18:29 1995
|  Subject: bla
|   Folder:  formail -R "Path:" "X-Path:" | formail -I Newsgroups | mail2     343
| procmail: Skipped "-rzx To:"

Strange; are you SURE you're running 3.10?  Or there's something else amiss
and "-rzx To:" isn't getting passed to formail.  I get the feeling that proc-
mail is exiting before getting as far in your rcfile as the section you're
asking about.  That's why the logfile isn't telling you much; there's an
additional problem higher up in your rcfile.

You could also combine the two formail commands in that pipe, by the way:
formail -R Path: X-Path: -I Newsgroups   would do the same job.

| > :0
| > * !^FROM_DAEMON
| > * !^From +robert
| > {
| >  all that stuff
| > }
| 
| >and a match on ^FROM_DAEMON or on ^From +robert will be enough to make the
| >conditions fail and skip the braced block.
| 
| Absolutely, and that's what it looks like now. 

So that was, all along, what you wanted, and you have it working now?