procmail
[Top] [All Lists]

Regex - Education by fire

2000-12-24 14:11:37
Well,

After a week of education by the fine members of the procmail mailing list,
the comp.mail.misc Usenet newsgroup, and some great FAQ's I finally have my
procmail script up and running. (see the final product below). I would like
to thank everyone who offered help and suggestions this past week. It's been
a learning experience, and you all have been great!

filename=$HOME/procmail/today-k12news.txt
thedate=`date +%Y%m%d`

:0
*^From:(_dot_)*k12news(_at_)k12(_dot_)com*
*^Subject:.*K12 News*
{
  :0 fbw
  | perl -0 -e '$_=<>; s/\.{10,}.*?\.{10,}//sg; print;'
  :0 fhw
  | formail -I "Subject: Daily K12 News - $thedate" \
      -I "To: distrolist$thedate(_at_)chandler(_dot_)k12(_dot_)az(_dot_)us" \
      -I "From: basilr(_at_)chandler(_dot_)k12(_dot_)az(_dot_)us"
  :0 fb
  | cat -; echo "CUSD K12 News" \
  | cat -; echo "http://ww2.handler.k12.az.us/k12news"; \
  :0 c:
  $filename
  :0
  ! distrolist-$thedate(_at_)chandler(_dot_)k12(_dot_)az(_dot_)us
}

---
Robert Basil
Chandler Unified School District
Chandler, Arizona

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