On Mon, 26 Jan 1998, Stanley C. R. Roche Busk wrote:
The fact is that I want to use ProcMail to forward mail of many
customers (about 500) and I want to create a kind of Mailing List.
I don't have the answers to your questions regarding limitations. I
currently use something similar for four mailinglists, the largest of
which is about a hundred members.
You can do this either on the List's account or on your usual account. If
not on the List's account, then you'll need to restrict what get's
forwarded by using Conditions 1 & 2 in recipe below. If your running this
on an accccount other than the List's account, then just forward all mail
from the List's account to the account where this procmail script resides.
# A file, containing the addresses of the listmembers, with no personal
# names, comments, angle-brackets, or whitespace, each address on a line
# by itself.
FILE_O_ADDRESS=pathname
# Set LINEBUF big enough to handle the above file when it get's read in.
LINEBUF=32768
# Get the 'From:' field contents: (Not needed if List is to be "open".)
FROM=`formail -zx"From:"`
# Forward mail to list if from a member.
# Make sure the mail is explicitly to the List's address, to avoid junk.
# Use Cond.1 to make the list "closed".
# Use Cond.2 to avoid mail not addressed to list.
# You must use Cond.3. to avoid mailloops.
:0
* FROM ?? ? fgrep -isf "$FILE_O_ADDRESSES"
* ^(To|Cc):(.*\<)?(list's address)\>
* ! ^X-Loop:(.*\<)?(list's address)\>
| formail -I"Reply-To: whatever" \
-A"X-Loop: list's address" \
-I"Precedence: bulk" \
| $SENDMAIL -oielm `cat $FILE_O_ADDRESSES`
# ( I think I just got another "abuse of cat" award.)
# If forward all mail somewhere, then this will forward everything not
# forward so far. This is your 'default-forward', and the last recipe.
:0
! default address here
There you have the basic scheme. Probably needs to be tweeked to suit the
account where it runs. And 500 addresses is a big file to maintain,
although you can build the initial file from other files using shell tools
without too much hassle.
David Hunt