Web Hosting Talk







View Full Version : Script for creating POP/IMAP accounts anyone?


skymedia
09-14-2001, 12:11 PM
Hi,
I've installer the NeoMail 1.25-3 pkg released by Cobalt and it works great on my RaQ4. Now I want to convert it in a full web based mail. So, I'm looking for a script that let's any user to create a POP3/IMAP4 account just filling a simple HTML form.

Did someone do that? Any ideas?

Thanks in advance,

Adrian Boismoreau

jks
09-15-2001, 08:18 AM
Originally posted by skymedia
Hi,
I've installer the NeoMail 1.25-3 pkg released by Cobalt and it works great on my RaQ4. Now I want to convert it in a full web based mail. So, I'm looking for a script that let's any user to create a POP3/IMAP4 account just filling a simple HTML form.
Did someone do that? Any ideas?


You could design a system like this:

* Frontend:
---------------

A small PHP script that runs on the normal (unprivileged) webserver. When users wants to create a new account, the php script save their details (username and password, etc.) in a MySQL database.

* Backend:
--------------

A small Perl script running in the background, checking for new accounts every 5 minutes (or any other interval). It will add the user and set his password.

Adding a user can be done in different ways. For example:

* Using the standard adduser/passwd commands.

* Using the Cobalt cadduser commands.

* By editing the /etc/passwd and /etc/shadow files directly.

In this scenario, I'm thinking that the last option would be the best (i.e. editing the files directly). You probably do not want these webmail customers to be able to access the Cobalt panel for the site, so the cadduser command is a "no-can-do". Also you probably do not want the overhead of giving each user a home directory, etc. when they really not need it (so the adduser/passwd commands are maybe not the best).

Also remember to add a line in the /etc/virtusers table so that the mailserver knows what email addresses belong to the new user.

skymedia
09-15-2001, 08:33 AM
Thank you very much jks, now I can figure out how it can be done, but unfortunately I don't have the know how to do it.
I'll look for some already developed script.
Maybe someone heared about one. Any help will be very much appreciated.

Regards,

Adrián Boismoreau