procmail
[Top] [All Lists]

RE: Date in address of outgoing email?

2000-12-23 21:40:40
I've been asked to explain my script by a few people so that can better
understand what I am trying to do. Here is goes....



filename = $HOME/procmail/today-k12news.txt
# Let the script know where I want the file saved after the script is
completed.

thedate = "date +%Y%m%d"
# Trying to set a variable called thedate to match the output of date
+%Y%m%d


:0 bw : $filename.LOCKEXT
# Remove the header, and wait till the piped stuff is completed.

*^From:(_dot_)*k12news(_at_)k12(_dot_)com*
# Check who the message is from

*^Subject:.K12 News
# Check the subject, and yes I should start using *K12 News instead.

| perl -p -e 's/\.{10,}.*?\.{10,}//sg' | \
# This searches for a paragraph in the incoming message and removes it

tee $filename | \
# Save the output to the text file for later use on our webserver

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)



I hope this explains what I am trying to do. I'm sorry for my lack of
knowledge (or what might seem to many of you weird questions), I'm an NT
admin and am trying to learn perl/procmail so we can start using FREEBSD
machines at work.


I have been told I can use formail to place the date in the outgoing "To:"
lines instead of using the "mail" command. So I guess I'll start looking
into formail. Any pointers to get me started on the (hopefully) last step in
my project would be great!

Thanks again!


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