On Tue, 27 Jan 1998, era eriksson wrote:
On Mon, 26 Jan 1998 15:06:22 -0800 (PST), david hunt <dh(_at_)west(_dot_)net>
| $SENDMAIL -oielm `cat $FILE_O_ADDRESSES`
# ( I think I just got another "abuse of cat" award.)
(No, this is a valid use of cat. I usually advocate using a slightly
more costly operation, though, which improves user-friendliness by
allowing comments in the address file:
...| $SENDMAIL $SENDMAILFLAGS `egrep -v '^#' $FILE_O_ADDRESSES`
Hhhhmmm. That's so simple. I never thought of that. But there is a reason
I settled on fgrep. It is because of the possibility of a + in a sender's
address. fgrep seemed like the reasonable choice, although it would be
simple enough, albeit more costly, to deal with that possibility in other
fashions.
* FROM ?? ? fgrep -isf "$FILE_O_ADDRESSES"
You should also probably force fgrep to accept only complete matches,
as in fgrep -ixsf [if your fgrep understands that].
In this case FROM is obtained with a one-stage formail extraction, and
could contain a personal-name in front of or behind the address, so if -x
were used one would have to make sure the address file matched exactly.
Actually, I prefer to get FROM from the postmark, and strip it down to the
bare address. I just didn't show that method here because I was trying to
outline the basic method of running a mailing list. And not all sites
automatically provide a proper postmark line, from what I have been led
to believe.
... what does -elm mean to Sendmail? The version I have here doesn't
have -el, only -em, or do I misunderstand?)
I got that wrong. Sendmail flags are so confusing. The above works on four
sites I have experience with, but I don't know if it works like I think it
does. After another reading of the sendmail man, I know the above is not
correct, although it may be harmless. How about -oimem or -oilmem? Or just
plain old -oilm ? Or should I just settle for $SENDMAILFLAGS ? Last time
I tried to sort this out by empirical observation I received threatening
mail from my sysadmin. ( Not my current ISP, thankyou.)
David Hunt