Automatically add a new email account/subdomain

Automatically add a new email account/subdomain

Posted by: mmingo
Posted on: 2007-11-13 08:34:00

Hi everyone, this is my first post.
I am in trouble with my PHP website where every new user automatically gains an e-mail account and a personal subdomain (a simple page in a folder).
Since I don't have the time to manually register every single mailbox/subdomain, how can I automate this procedure?
I need a CGI script combined with the PHP registration page???
Please help me!

Mingo

Re: Automatically add a new email account/subdomai

Posted by: rlparker
Posted on: 2007-11-13 08:52:00

It's interesting that you should ask this exact question, and you are also "lucky" as the two publicly shared existing "poof of concept" code samples for automating interaction with the DH Control Panel demostrate how part, or all of this (if you can settle for setting up email forwarding instead of real "mailboxes"), can be done with PHP.

For a code sample that demostrates a way to add a subdomain. check this previous Forum post.

That post also links back to a preceding post that provides code for setting up an email forwarding address.

Of course, neither of these pieces of code are "production ready", but they do work and show what is involved. This might help start you on the right track for programming a solution.

Make sure you note the caveats about no formal API having been published (and the possibility that a subsequent panel change could break any code you produce).

My only other suggestion is that you should carefully consider if you want to do this. While you likely have enough disks pace and bandwidth in your quotas to make this sound attractive, under the DreamHost "Terms of Service" *you* will be held responsible for the actions of any users operating under your account.

For a quick overview of how this can get you into trouble, you might want to visit and review The DreamHost Abuse Center.

Good luck, and Welcome to DreamHost! smile

--rlparker



Re: Automatically add a new email account/subdomai

Posted by: mmingo
Posted on: 2007-11-14 02:17:00

Thank you for your quick reply!

Mingo

Re: Automatically add a new email account/subdomai

Posted by: rlparker
Posted on: 2007-11-14 07:21:00

You are welcome, and good luck in your endeavor!

--rlparker

Tags: new email accounte mail accountphp websitecgi scriptmanually