On 23 Dec, Gun Wear wrote:
|[...]
|
| mail -s "K12 News"
distro-list$thedate(_at_)chandler(_dot_)k12(_dot_)az(_dot_)us -f
| basilr(_at_)chandler(_dot_)k12(_dot_)az(_dot_)us
| # Mail the file to our pop server in the
| distro-listYYYYMMDD(_at_)chandler(_dot_)k12(_dot_)az(_dot_)us format (I have
a program on the pop
| server that archives incoming mailing list messages, and one option is to
| have the date in the "To:" line. The -f option is to have the outgoing email
| have the "From:" address of basilr(_at_)chandler(_dot_)k12(_dot_)az(_dot_)us
(Mine)
|
|[...]
Modifying my previous response (still untested):
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 -p -e 's/\.{10,}.*?\.{10,}//sg'
:0 fhw
| formail -I "Subject: K12 News" \
-I "To: distro-list$thedate(_at_)chandler(_dot_)k12(_dot_)az(_dot_)us" \
-I "From: basilr(_at_)chandler(_dot_)k12(_dot_)az(_dot_)us"
:0 c:
$filename
:0
! distro-list$thedate(_at_)chandler(_dot_)k12(_dot_)az(_dot_)us
}
Note: the regexp in the second condition is Subject:.*K12, not
Subject.K12, nor Subject:*K12. It may have been a typo, but you
indicated a change to the last one, but the first is most likely what
you want.
I *think* that does what you're asking, though I also think there was a
prior discussion about the lock file. There might be a reason for
locking the whole recipe rather than just the delivery to $filename as
above, but unfortunately I didn't follow that part of the discussion
closely enough to say.
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail