procmail
[Top] [All Lists]

Re: Truncating STILL not working

1996-05-29 21:54:40
The ?? tells procmail to search the environment variable NAME, the ^^
matches the beginning of the variable, and the .{1,25} should match 1 to
25 characters.
I looked at the procmailrc and regexp man pages. It looks like procmail
doesn't understand the {} syntax.
Basic regular expressions require \{ and \}, but that doesn't work
either. (I have procmail 3.10)

I tried using \{ and \} and I had no luck either.....

Let's see if I can work around it:
NAME=`echo "$NAME" | sed -e 's/^.\{1,25\}(.*)$//'`

Tried this as well Guy, it's a no go, here's the recipe and a verbose log
after execution....

   :0
   NAME=`echo "$NAME" | sed -e 's/^.\{1,25\}(.*)$//'`

   :0E
   { NAME = "$FROM_ADDRESS" }

procmail: Assigning "FROM_ADDRESS= ginof(_at_)io(_dot_)org"
procmail: Assigning "MATCH="
procmail: Matched "1234567890123456789012345thisisteskja"
procmail: Match on "^Subject: coc subscribe \/.*$"
procmail: Assigning "NAME=1234567890123456789012345thisisteskja"
procmail: Executing "echo "$NAME" | sed -e 's/^.\{1,25\}(.*)$//'"
procmail: Assigning "LASTFOLDER=NAME=1234567890123456789012345thisisteskja"
procmail: Opening "NAME=1234567890123456789012345thisisteskja"
procmail: Acquiring kernel-lock

As you can see, the damn program thinks that we are specifing a folder,
but I guess if I take it out of the recipe and just leave that NAME
assigning line by itself, deleting the :0, it might work, but then how do
I give it a value of $FROM_ADDRESS if $NAME is blank?

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