Hi-
I have an instructor for whom I set up a Smartlist mailing list.
(This *is* a procmail question :^). He uses it for discussion
in a Geology class he teaches. Some students however have expressed
unwillingness to participate for fear of asking a dumb question.
So he wants them to be able to send mail anonymously just to get
their questions answered on this list. I would not allow the anonymous
mail to go anywhere except to this list.
First, I began by creating a user account called 'gs2' for this purpose.
I used the standard .forward file:
"|IFS=' ' && exec /usr/local/bin/procmail -f- || exit 75 #gs2"
Not too long ago, David Tamkin gave me a recipe to rewrite the header's
"From " address so I continued by using that. Unfortunately, I didn't
get much further and it doesn't come close to doing what I need.
I don't pretend to know how to accomplish this. I was trying to
learn by bungling. :^)
This is the .procmailrc for user gs2:
DEFAULT=/var/mail/gs2
MAILDIR=/home/gs2/.procmail
LOCKFILE=$MAILDIR/.lockfile
LOGFILE=$MAILDIR/.log
VERBOSE=on
savemetas=$SHELLMETAS
SHELLMETAS
:0h
AUTHOR_ADDRESS=| formail -IReply-To: -IResent- -rtzxTo:
:0fwh
| sed "1s/^From [^ ]*/From gs2(_at_)magic(_dot_)geol(_dot_)ucsb(_dot_)edu/"
SHELLMETAS=$savemetas
:0h
| $SENDMAIL -oi -t dave(_at_)magic(_dot_)geol(_dot_)ucsb(_dot_)edu
I then tested it by sending mail to the gs2 account. It was supposed
to arrive in my account (as a test) with the "From " header
showing the gs2 address. I don't understand why but, instead,
I received mail without the headers changed and multiple messages
coming to me. I think I had to kill & restart sendmail.
Anyway, any help in getting this right would be much appreciated.
Dave Robbins