Hallo everybody, I really need help with this really bad.
I made a mailing-list with one of my account in the school.
1. I need every mail that come to this address (permias(_at_)*) will proccess
with this recipe and also add the x-loop and reply-to
2. I need prefix [permias] in the subject, but if someone reply the mail,
i don't need the prefix again, because it has already has it *this is the
real problem*
3. If any mail from daemon or error mail will go to alex(_at_)bumi(_dot_)net
The real problem is number 2. It always add [permias] whenever ppl reply
the mail. So it will very long subject line with [permias] in it.
The idea is, when the recipe see [permias] it won't add it again.
Thanks for your help and time
sincerely,
alex
PS: Pls cc: to alex(_at_)bumi(_dot_)net, because i do not subscribe with this
list
:(
----start recipe-------------
:0
* ^(To|Cc|cc):.*permias
* ! ^FROM_DAEMON
* ! ^X-Loop: permias(_at_)colorado(_dot_)edu
* ^Subject:[ ]*\/[^ ].*
{
SUBJECT="$MATCH"
# If any of the conditions before "{" fails, Procmail
# skips right down to the closing "}" without processing any
# of these recipes
:0fhw # 1. Add X-Loop and Reply-To
| formail -A "X-Loop: permias(_at_)colorado(_dot_)edu" \
-A "Reply-To: permias(_at_)colorado(_dot_)edu" \
-I "Subject: [permias] $SUBJECT"
:0fbw # 2. Add a .signature
| ~/.procmail/sig |sed -e '$r'" $HOME/.signature"
:0c: # 3. Save the message to a mailbox, but continue still
permias
# hypermail stuff here instead, maybe?
:0c:permias.lock
| /usr/local/bin/unsupported/hypermail -m "/home2/permias/mail/permias" -d
"/home2/permias/public_html/archive"
:0 # 4. Send out the message to our subscribers
! `cat permias.txt| awk '{print $1}'| grep -v "^#" `
# That was a delivering recipe without a :c flag, so Procmail
# will stop processing here
}
:0
* ^FROM_MAILER
! alex(_at_)bumi(_dot_)net