procmail
[Top] [All Lists]

Re: Intermittent behaviour by procmail

2003-09-02 13:35:55
Gonzalo,

You're defining LASTFILE up here:

LASTFILE=`echo "$LASTFOLDER"|cut -d "/" -f 3`

Before LASTFOLDER has been defined.  So it comes out null.
Move that line in here:

:0
* ^TO_(_dot_)*procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
{
        :0c
        .Mailing\ Lists.Procmail/

Here's where it goes:

           LASTFILE=`echo "$LASTFOLDER"|cut -d "/" -f 3`

Or better yet, figure it within procmail without forks:

          :0
          * LASTFOLDER ?? /\/[^/]+^^
          { LASTFILE=$MATCH }

        :0i
        | cp "$LASTFOLDER" "cur/${LASTFILE}:2,ST"
}



_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

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