On 7/14/07, Rolan Yang <[EMAIL PROTECTED]> 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/ _______________________________________________ New York PHP Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk NYPHPCon 2006 Presentations Online http://www.nyphpcon.com Show Your Participation in New York PHP http://www.nyphp.org/show_participation.php