Reply
Old November 29th, 2009 Top | #1
 
LordOfLA's Avatar
Godlike!
Joined: February 2004
Location: Salisbury, Wiltshire, UK
Posts: 7,015
Blog Entries: 5
Reputation: 4137
Power: 209

Default Export cPanel mailboxes and aliases to SQL

I just finished hacking up a CLI PHP script to take domains, mailboxes and aliases/forwarders from a cPanel machine and dump the details in to a SQL file for import in to a MySQL database.

I do some "post processing" on the data to fit what I personally may need if I ever come to convert the cPanel machine this was tested on over to a custom postfix setup.

If you use this yourself you should be aware of the following points:

1. This was tested against cPanel 11.24.5-C39633 - WHM 11.24.2 - X 3.9 on FreeBSD 7.2
2. I provide this AS IS with no guarantees of any kind nor any support.
3. I'm not the worlds best PHP coder, the code could probably be better, you can do that yourself if you want.
4. If you improve on this in any way, post your updates as an attachment here so that myself and others can take advantage of your improvements on my work.

Enjoy!

Edit: Since the attachement has 0 views I'm assuming the forum wants you to be registered to download it. Here's a download link to save you the bother: http://redmeteor.net/osnn/cpanel_mail_to_sql.zip
Attached Files
File Type: zip cpanel_mail_to_sql.zip (1.8 KB, 18 views)



If HK-47 and GLaDOS had a child, the character they create would cause the video game world to overdose on awesome. -sheridanmovieguy: Dragon age forum user.
LordOfLA is offline   Reply With Quote

Reply

Bookmarks

Thread Tools

Posting Rules

Similar Threads
Thread Thread Starter Forum Replies Last Post
Centos 3.5 + cPanel\WHM 10 Hangs :/ chrisbyrd Linux & BSD 2 July 9th, 2005 4:29pm
[Fedora] Setting IP Aliases via SSH Geffy Linux & BSD 13 March 16th, 2005 12:32pm
Need help with domain cpanel! sacred2nite Windows Desktop Systems 17 November 18th, 2003 9:14pm
Moving Mailboxes to New Server Dlovely Windows Desktop Systems 1 September 6th, 2003 7:08am
Exporting Eudora mailboxes & settings vern Windows Desktop Systems 1 November 10th, 2002 4:35pm