Re: How to broadcast to all lists?

"David I. Bell" <[email protected]>
Newsgroups gmane.mail.ezmlm
Message-ID <AA-28E2A267BE53B9D7A9F731EFB9CF5DEA-ZZ@fipprd24>
Thanks for the suggestions Charles.

Charles Cazabon <[email protected]> wrote:
> One easy way is to bypass most of the list functionality
> and feed your message directly to ezmlm-send, once for
> each list directory.  See the ezmlm-send documentation
> for details.
>
> A possible downside is that people subscribed to multiple
> lists will receive multiple copies of the message.

Understood.  Unfortunately, as you point out, that violates one
of my assumptions/constraints:

* I don't want subscribers to get duplicate e-mails of any
  broadcast messages

so I'd rather not do it that way.

> ... create a separate list for these announcements.
> People not subscribed to the other lists can subscribe
> to it at will.  Then before you send a message to this
> list, you just feed the subscriber lists of all the
> other lists to ezmlm-sub for this list -- if they're
> already subscribed, nothing happens, otherwise they get added.
>
> Everybody on the list only gets one of the announce messages.

Nice suggestion, thanks!  Now... suppose I add another constraint:

* I'd like to be able to keep track of those who directly
subscribed to the list vs. those I programmatically add to send
out the broadcast.

To solve for this additional constraint... Could I set up a
sub-list for the programmatic subscriptions and keep the direct
subscribers on the "top-level" subscriber list?  This raises two
questions:

1) Can I have subscribers on the top-level list and on the sub-list

2) Does ezmlm handle duplicate removal (at send time) when the
duplicates are spread between the top-level list and a sub-list?
 
I'm guessing the answer to the first question is "yes" and the
answer to the second question is "no".

To solve for the second quesiton, I could use ezmlm-list and the
comm command line tool to figure out which subscribers shouldn't
be added to the sub-list.

Something like:

ezmlm-list <LISTDIR>/broadcast-list | tr '[A-Z]' '[a-z]' | sort >
/tmp/direct_subs

{
for list in <LISTDIR>/*
do
  ezmlm-list $list
done
} | tr '[A-Z]' '[a-z]' | sort -u > /tmp/all_subs

comm -3 /tmp/direct_subs /tmp/all_subs | ezmlm-sub
<LISTDIR>/broadcast-list/sub-list

Anything wrong with this approach or is there a more elegant way?

-- David
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.