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