[Mailman-Users] Moving lists

Mark Sapiro mark at msapiro.net
Thu Apr 15 22:54:15 CEST 2010

On 4/15/2010 1:35 PM, Geoff Shang wrote:
> So does this mean any changes to the instructions you send the other
> day?

The steps I sent the other day are OK as is, but some uncertainty is
removed. Here are some notes.

> 1) Create a list the cPanel way on cPanel. it should have the same name
> as the existing list which I'll call listname, and create it in the
> appropriate domain which I'll call example.com.
> This will result in cPanel creating a directory named (I think)
> /usr/local/cpanel/3rdparty/mailman/lists/listname_example.com/ This
> directory will contain at least a file named config.pck


> 2) Move the config.pck in step 1) aside and replace it with the
> lists/listname/config.pck from your server.


> 3) Step 1 should also have created a directory named (I think)
> /usr/local/cpanel/3rdparty/mailman/archives/private/listname_example.com.mbox/
> which I think will be empty. Put the
> /archives/private/listname.mbox/listname.mbox file from your server in
> this directory. I'm not sure whether it's name should be
> listname_example.com.mbox or listname.mbox. In fact I'm not sure of
> any of the names, but you should be able to adjust them as required by
> looking at other lists. Also, make sure ownership and permissions are
> consistent with other lists.

The file name will be listname_example.com.mbox, the same as the directory.

> 4) Here's where it gets tricky. I'm assuming that the command line
> tools will be in /usr/local/cpanel/3rdparty/mailman/bin/ and that they
> will work. This assumption may be overly optimistic. Perhaps these
> next steps should be tested before you begin.

They are there and they should work.

> cd to /usr/local/cpanel/3rdparty/mailman and do bin/dumpdb on the
> config.pck you moved aside in step 2. Look at the values for the
> following attributes:
>   host_name
>   real_name
>   web_page_url
> I expect these will be 'example.com', 'Listname', and
> 'http://example.com/mailman/' respectively. The real question will be
> if there is some other list attribute whose value is
> 'listname_example.com'. I suspect not, but if there is, for discussion
> let's say its name is xxx.
> Now we hope withlist works. Do
>  bin/withlist -l listname_example.com
> Hopefully this will respond
> Loading list listname_example.com (locked)
> The variable `m' is the test MailList instance
> Then at the >>> prompts type
>>>> m.hostname = 'example.com'
>>>> m.web_page_url = 'http://example.com/mailman/'
> or what ever the actual values were from dumpdb. If the value of
> real_name differed from 'listname' only in case, you don't need to
> change it. You can change it later if desired in the web UI. If you
> want to be sure, type
>>>> m.real_name
> which will respond with what this was on your host which is probably
> what is wanted, i.e. something which differs only in case from
> 'listname'.
> If there was some xxx attribute with a value 'listname_example.com',
> type
>>>> m.xxx = 'listname_example.com'
> or whatever is appropriate to match the cPanel config.pck. Finally type
>>>> m.Save()
> and then control-D at the succeeding prompt and withlist should respond
> Unlocking (but not saving) list: listname_example.com
> Finalizing
> Note that if the only changes required are host_name and web_page_url,
> you should be able to replace the entire withlist interaction with
> bin/withlist -l -r fix_url listname -u example.com
> but that adds another unknown, potentially buggy piece to the process.

This entire step should be OK to just do

bin/withlist -l -r fix_url listname_example.com -u example.com

without worrying about the dumpdb or the interactive withlist.

> 5) For the archives, you should be able to do
>  bin/arch --wipe listname_example.com

Which should work without having to specify the path to the .mbox.

> but here again we have the problem that cPanel's patches are incomplete
> and only address those things they expect to be used so the above
> command may not work. If it fails, you could try
>  bin/arch --wipe listname_example.com path/to/listname.mbox
> where path/to/listname.mbox is an absolute or relative path to the file
> you created at step 3.

Basically, the whole process is the same as the non cPanel case.

Mark Sapiro <mark at msapiro.net>        The highway is for gamblers,
San Francisco Bay Area, California    better use your sense - B. Dylan

More information about the Mailman-Users mailing list