procmail
[Top] [All Lists]

Re: rewriting the subject line

2004-10-14 04:08:38
On Wed, Oct 13, 2004 at 06:23:53PM -0500, David W. Tamkin wrote:

Dallman Ross wrote:

On Wed, Oct 13, 2004 at 09:58:58AM -0500, David W. Tamkin wrote:

You realize, Dallman, that so long as there is a match in the head
to

^Subject:.

(where the period means "anything except a newline" and not
necessarily a literal period), the

(.*\<)?

will be matched to null, don't you?

I do know it.  I not only know it, I am counting on it.

So why didn't you use just,

 * ^Subject:\/.+

instead?

Because if we're collecting the Subject once and for all at the top
of the rc, I didn't want to have leading blanks.

However, you are right that I shouldn't have used that syntax.  It
doesn't do what I just said (if there are leading spaces, which there
almost always are -- most typically, one space); and it's not better
than ".*" in this case.  Call it a brain-fart.  I will say, though, David,
that I sure wish you had just suggested syntax instead of asking me
rhetorical questions.  I couldn't understand what you were getting at
and spent a good deal of time trying to figure out what it might be.
Then I spent more time testing.  But since I had tentatively concluded
that you were nudging me in a certain direction, I used my testing to
confirm that rather than to see what you really had in mind.  All
I can say is, you should have seen what I almost sent to the list and
didn't -- because right when I was going to press "Send," it dawned
on my what you might have had in mind.  So I edited my mail some more.
(More time!)  And then it turns out that's not what you wanted to tell
me, either!  So that's why I wish you'd just state what works rather
than asking questions.  :-)

Here is what I would have wanted to post:

   * Subject:.*\/[^     ].*

I made the mistake of thinking that I could easily remember what is
(close to what's) in my own .procmailrc without looking.  But the
above is much closer to what's in my .procmailrc, not that stuff I
had earlier.  I should know by now my memory has become Swiss cheese!
But, uh, I forgot!

Oh: that's a space and a tab after the caret in the brackets.


If you want to match nothing, you should write nothing.

Right.  And if you want to tell me I should write nothing, you should
tell me I should write nothing; not ask me strange questions that send
me on wild-goose chases.  :-)

Returning to the topic of collecting the Subject in a var, (as David 
knows) the above won't work for multi-line subjects; it will just
match the first line.

I know no such thing.  Continuation lines in the head are unfolded for
procmail's egrepping, remember?

Now I do!

Dallman (Swiss Cheese be I)

____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>