procmail
[Top] [All Lists]

Re: handing strange characters in Subject

1998-01-16 12:57:46
        Author:        Philip Guenther <guenther(_at_)gac(_dot_)edu>
        Original-Date: Fri, 16 Jan 1998 13:40:22 -0600
        Message-ID:    
<199801161940(_dot_)NAA01042(_at_)solen(_dot_)gac(_dot_)edu>


0c
* ^TOlist(_at_)isp\(_dot_)com
* ^Subject:[    ]PATCH:
* ^X-Mailing-List: <list(_at_)isp\(_dot_)com> archive/latest/()\/.*
{

SUB=`echo $SUBJECT|sed 's/PATCH:\ //g'  |  tr -s ' ' '_'`

umask 022

You mean, UMASK = 022.

Ah... that answers my next question as to why procmail was skipping that :-)


       :0fbw
| cat - > /info/patches/$MATCH-$SUB.txt

       :0
/dev/null

Bad bad bad!  The action of a filtering recipe should always some output.
If it doesn't, then it shouldn't be a filtering recipe!

:0 bw
| cat - > /info/patches/"$MATCH-$SUB".txt

With this you don't need that extra /dev/null recipe.

Reproach accepted, recipe changed.


And it works just fine, until someone uses a weird character in the
Subject line, like

Subject: PATCH: $(VAR) installation

I assume this is because of the '$'.... Is there a workaround?


What doesn't work about it?  Unless you shell is totally broken, the
above recipes should work fine.

Well, the file was created OK it did not have any content.

I assumed that meant that the 'cat' command was being confused.

shell is /bin/sh

TjL


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