Export cPanel mailboxes and aliases to SQL

LordOfLA

Godlike!
Joined
2 Feb 2004
Messages
7,026
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
 

Attachments

  • cpanel_mail_to_sql.zip
    1.8 KB · Views: 120
Last edited:

Members online

No members online now.

Latest profile posts

Also Hi EP and people. I found this place again while looking through a oooollllllldddd backup. I have filled over 10TB and was looking at my collection of antiques. Any bids on the 500Mhz Win 95 fix?
Any of the SP crew still out there?
Xie wrote on Electronic Punk's profile.
Impressed you have kept this alive this long EP! So many sites have come and gone. :(

Just did some crude math and I apparently joined almost 18yrs ago, how is that possible???
hello peeps... is been some time since i last came here.
Electronic Punk wrote on Sazar's profile.
Rest in peace my friend, been trying to find you and finally did in the worst way imaginable.

Forum statistics

Threads
62,015
Messages
673,494
Members
5,621
Latest member
naeemsafi
Back