procmail
[Top] [All Lists]

Re: How do I save to a file that has the name of the subject?

2000-09-23 12:24:34
poohba(_at_)io(_dot_)com asked,

STORIES="/home/p/poohba/public-web/Stories"
SUBJECT=`formail -zxSubject:`

:0bc:
* ^From.*LaLa
$STORIES/$SUBJECT

Let's try this:


 :0
 * ^From.*LaLa
 * ^Subject:(.*:)? *\/[^ :]+\<.*
 {
  SUBJECT=$MATCH
  # use $HOME variable in case admins reorganize the system and move it
  STORIES=$HOME/public-web/Stories

  :0
  * SUBJECT ?? /
  SUBJECT=| echo "$SUBJECT" | tr / %

  :0bc:
  $STORIES/"$SUBJECT"
 }

That should throw out any initial words that end in a colon, such as Fwd: or
Re:, and gets rid of slashes to prevent needing to create subdirectories.


_______________________________________________
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>