NYCPHP Meetup

NYPHP.org

[nycphp-talk] Online POP3 and SMTP account creation using PHP

csnyder chsnyder at gmail.com
Sun Jul 15 14:30:44 EDT 2007


On 7/14/07, Rolan Yang <rolan at omnistep.com> wrote:

> <?php
> // get $user and $password from $_REQUEST
> // validate it
> // check to make sure account doesn't exist
> `sudo adduser -u $username -p $password -s /sbin/nologin`;
> // show confirmation message that says your account has been created.
> ?>
>
>
> This will probably get you a C- grade, but it works :)

Wow, we're giving the webserver sudo permissions now?

You don't need system accounts in order to have mailboxes. Use a mail
server that allows virtual user lookup in MySQL. This also allows you
to scale your mail operation across multiple servers.

Dovecot is apparently a good choice, one that I'm considering after
many years with good ol' uw-imap. You can make up virtual UIDs so that
the mailboxes are still owned by individual users or all the mail can
be owned by a single system user. There's a lot of flexibility there,
and good docs on how to get it all integrated with Postfix.

Not an easy project, Shadab, but one that has the potential to teach
you a lot about how internet email works at the nuts and bolts level.

-- 
Chris Snyder
http://chxo.com/



More information about the talk mailing list