Forum Moderators: coopster

Message Too Old, No Replies

Creating POP3 Email Accounts from the my site

Creating POP3 Email Accounts from the my site

         

ThaSaltyDawg

9:03 am on Feb 17, 2005 (gmt 0)

10+ Year Member



I have been looking for some scripts tutorials or whatever to create a small web based email service for any member that signs up on my website. I know how to create web interfaces and connect to accounts that I have already setup on my server. But what I am looking for is some scripts that would allow me to create an interface that anyone could sign up and create a new account from the web. One other option I could look at is to be able to create a system that would pick up and all my catch-all emails and then maybe place then into a database under a user account. Then users could access there emails without actually having a POP3 account on my server. I have a good idea of how to create this, but would prefer to be ale to create a new POP3 account on my server directly from the web.

Any help would be useful. Not necessarily looking for the code, but atleast to pointed in the right direction, I could finish it myself.

I hope you guys know what I mean! If not I'll try to explain again.

Thanks.

hakre

9:54 pm on Feb 17, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



to create pop3 accounts you first need to know what kind of mailserver you're using and who it is working. i think with a simple shellscript should be no problem to create an account. but first you need to know the software.

coopster

3:03 am on Feb 18, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Welcome to WebmasterWorld, ThaSaltyDawg.

Have you had a chance to read through the IMAP, POP3 and NNTP Functions [php.net] in the PHP manual? Don't forget to browse the user contributed notes as well.

ThaSaltyDawg

1:47 am on Feb 19, 2005 (gmt 0)

10+ Year Member



Thanks for the info Coopster. I've been a member here over a year, and usually just browse and never ned much help. I was looking for some tutorials on this site about this but could not find them. Guess I did not look to hard. Thanks for the link.

NickCoons

2:27 am on Feb 19, 2005 (gmt 0)

10+ Year Member



Personally, I'd stick with IMAP for a web-based service.. it would save you a lot of programming since the IMAP server (like Courier-IMAP) would handle all of the email and folder organization. But either way, you'd still have to create accounts.

You can create system accounts, but you'll have to create a script that runs as root to do so. You wouldn't want your web-server running as root. In the past, I've done this by creating a PHP script that writes the newuser data to a textfile, and a cron job that runs every 60 seconds reads this data and creates the user account. This puts a delay of up to 60 seconds into creating the account, but that's not usually that big of a deal.

Another possibility is to use OpenLDAP to create the accounts, and have your IMAP/POP3 scripts authenticate against that for their data. You can add data into an LDAP directory without being the system root user, and you have much more scalability in creating accounts, because they don't have to be system users. AFAIK, PHP has decent LDAP functionality.. check out phpLDAPadmin.

However, if you've never installed OpenLDAP before, it might be a challenge to configure.