I've set up a recipe that basically resends all mail sent to a
particular address to all the addresses that are kept in a separate
file. Also, another file contains a list of administrators that are
allowed to send to the bigger list. Think of it as a one-way mailing
list server.
Anyway, the recipe works fine but has one little quirk: If a recipient
does a "Group Reply", the reply correctly goes to the sender, but also
goes to the sender's domain without a username. Ie., if the message was
sent by "joe(_at_)mydomain(_dot_)com", the group reply sends the reply to
"joe(_at_)mydomain(_dot_)com" and a CC: to "mydomain.com" which generates an
error
on the local host.
Here's the recipe. Any clues on how to eliminate this?
=========================
LINEBUF=10000
SENDER=`formail -rtzx To:`
:0
* ^TO.mmembers*
{
:0 h
* ? test -f $MAILDIR/admin
* ? fgrep -i -s "$SENDER" $MAILDIR/admin
{
:0
| formail -I To:"(List Members)" -k -X Reply-To: -X From: -X
Subject:
-X To: -I Apparently-To: | $SENDMAIL -oi `cat $MAILDIR/Mlist`
}
:0 E
/dev/null
}
==========================
--
Gary Fischman
fischman(_at_)nynexst(_dot_)com