Re: [Mailman-Users] Moving lists
Geoff Shang wrote:
See attached.
I've not yet tried the procedure, so hopefully you'll have looked at it if I run into trouble. Either way I'll give you a blow-by-blow account of how it goes.
I have looked at the cPanel 2.1.12cp3 code and made a diff to the 2.1.12 base, and it is surprisingly small.
Basically cPanel Mailman is Mailman. In particular, config.pck files are the same (there are no additional list attributes) and the file structure within the /usr/local/cpanel/3rdparty/mailman PREFIX directory seems completely unchanged.
As far as I can see, the only significant cPanel changes have to do with listname munging so that lists of the same name can exist in different domains, and most of this appears to be accomplished with their own list creation process and their own Exim router and transport for Mailman lists. I don't have the code for either of these, but it is easy to see how they work.
Basically, when cPanel creates a list named listname in the example.com domain, it actually creates a Mailman list named listname_example.com in the example.com domain. The web interface reflects this in that every web URL is of the form http://example.com/mailman/XXX/listname_example.com. Other than that, the web interface is completely standard.
Also, with the exception of a minor mod to newlist, and the addition of a --noarchives option to check_perms, the bin/ commands are unchanged and should all work provided the listname_example.com form of the listname is used.
The only really significant changes to Mailman itself are mods to the getListAddress() and HasExplicitDest() list methods to account for the fact that the email addresses exposed and used for the listname_example.com list are listname@example.com, etc. rather than listname_example.com@example.com. A similar mod is missing from the CalcRecips handler which is why sibling lists have do be defined using the listname_example.com@example.com address form and work only in a limited way because addresses in To: or Cc: are not of that form.
The above, together with some Exim stuff so that mail to the listname@example.com, etc. addresses is delivered to the listname_example.com list is apparently all there is.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
On Thu, 15 Apr 2010, Mark Sapiro wrote:
Basically cPanel Mailman is Mailman. In particular, config.pck files are the same (there are no additional list attributes) and the file structure within the /usr/local/cpanel/3rdparty/mailman PREFIX directory seems completely unchanged.
So does this mean any changes to the instructions you send the other day?
Geoff.
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.
- 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
OK
- Move the config.pck in step 1) aside and replace it with the lists/listname/config.pck from your server.
OK
- 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.
- 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.
- 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@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
On Thu, 15 Apr 2010, Mark Sapiro wrote:
The steps I sent the other day are OK as is, but some uncertainty is removed.
Just to report that, so far as I can tell, everything went as expected. There was no reference to the domain in the config.pck file, so I could just run the withlist command as given. No commands generated any errors or warnings that I could see, and all seems to work just fine (at least on the web interface).
Thanks so much for your help with this. Geoff.
participants (2)
-
Geoff Shang
-
Mark Sapiro