[Mailman-Users] Subscribing to List 1 automatically subscribes user to List 2

Jon Carnes jonc at nc.rr.com
Tue Apr 15 22:45:43 CEST 2003


On Tue, 2003-04-15 at 13:27, Raymond Wood wrote:
> Hello mailman-users,
> 
> I'm writing to ask your collective advice about how best to
> arrange it so that when a user subscribes to one list (say,
> MAIN), then they automatically get subscribed to a second list
> (say, ANNOUNCE).
> 
> One issue here is that there may be people who want to subscribe
> to ANNOUNCE who do not want to subscribe to MAIN  :)  Otherwise
> a solution would likely be much easier to find...
> 
> Here are some ideas that have surfaced:
> 
> 2.  Hack together some shell script, run as a cron job, that would
>     automatically subscribe MAIN newcomers to the ANNOUNCE list.

This is my choice.  You can use the mailman commands (in
~mailman/bin/..) to help you write the script:
  list_members - this will show the email address subscribed to a list
  add_members - this will add users to a list

You could periodically (every hour) dump out the email addresses from
Main, then use that list to do an add_member to Announce.  
Mailman won't add the same user twice, so it will ignore duplicates and
only add any new users.

I have a feeling that you want Announce to be a list of all your users
(no matter what list they are on).  In that case, I would use
list_members to dump out the email addresses from each of the lists into
one big file, then use: sync_members to add/delete users from the list
Announce.

The Umbrella FAQ entry has a script that does this very nicely!


> I am currently assuming that #1 above is the simplest, unless
> there are hidden gotchas.  Has anyone on this list tried #1
> before, or know whether it is possible?

#1 works okay.  You will have to put the Announce list name into an
entry for each of the other lists that indicates that sending to
Announce is the same as sending to this address (Mailman holds email
that is not sent explicitly to the list - using either the TO: field or
the CC: field).

You will also have to apply one of the Mailman patches that stops
duplicate emails from being sent when a user is on more than one list.
> 
> If anyone has a better idea I am all ears  :)  Basically I'm
> trying to find the most elegant solution possible to get MAIN
> list subscribers automagically subscribed to the ANNOUNCE list.
> 
> Thanks in advance for your input,
> Cheers,
> Raymond





More information about the Mailman-Users mailing list