procmail
[Top] [All Lists]

Re: A simple mailing list...

1998-07-09 02:46:42
On Wed, Jul 08, 1998 at 06:10:44PM -0400, Jonathan Kelly wrote:
I want to set up a situation wherein a person sends a message to
DA-List(_at_)domain(_dot_)com and the message is forwarded to a group of 
people,
retaining the original sender.
I figure it's a variation on using a .forward w/ a formail -i line to
re-write the recipient and retain the sender, perhaps pulling the
addresses from a text file, or perhaps simply hard-coded into the
recipie.  But darned if I can figure it out.

If you have control of the sendmail daemon, the best way would probably be to
add a line to your /etc/aliases file:

DA-List(_at_)domain(_dot_)com: address1(_at_)domain(_dot_)org, 
address2(_at_)domain(_dot_)net, \
addres3(_at_)otherdomain(_dot_)edu, ...

Failing that, this SHOULD work for your .procmailrc

FORWARDLIST=`cat $HOME/.list`

:0
*
{
        :0 c
        ! ${FORWARDLIST}

        :0
        | formail -I "To: ${FORWARDLIST}"
}

(You might need to escape ${FORWARDLIST} in the last part.)
Of course, this will put all of your recipients on one long To: line.

-- 
Andrew Edelstein

Sarah - Doctor, you're being a child.
The Doctor - Why shouldn't I? There's no point in being an adult if you can't
act childish now and then.              Dr. Who

Attachment: pgpoApRAIUhOl.pgp
Description: PGP signature

<Prev in Thread] Current Thread [Next in Thread>