开发者

Create, Delete and Use e-mail accounts within a website! Is it possible?

I'm developing an administration panel (in php), for a website (in a shared host), to let the administrator to manage the personal infos of the employees! With this panel should be possible to create or delete an e-mail account for 开发者_如何学Can employee and if the employee logs in the admin panel, he/she should be able to access to his/her e-mail account!

I had thought to install Horde WebMail on the website to let the employees use their e-mail accounts ... but how can I pass the login credentials to Horde?

And what you suggest to create and delete the e-mails account that can be read by Horde? Any other suggestion is greatly appreciated!

Thanks in advance!!!


EDIT: Or are there better alternatives to Horde to accomplish, at least, the e-mail account access from within the web site?


First, Horde seems to be a client. See feature page on their website:

IMAP and POP3 webmail client

This means that it's not enough to pass over the logins of your users to Horde. My guess is that you also have to create a new account directly at your mail server. Some mail servers can store login information in databases like MySQL or PostgreSQL. If this is right for your mail server you just have to add a new user in the correct table. This is called virtual users.

And like you did with your mail server you just add a new record in the database of Horde with the correct information.

This should only take to SQL statements. And if you want to add a little bit of security you wrap these both statements in a transaction.

So you would do something like this:

  1. Begin transaction
  2. Add a new record to Hordes database with the users login name and password for the mail server
  3. Add a new record to your mail servers database (login name, password etc.)
  4. Commit your data (end transaction)

Hope this helps a bit!


While this might be more of a lazy man's solution - not to mention against the whole notion of this website - but have you given any thought to just using Google Apps (free version):

http://www.google.com/apps/intl/en/group/index.html


E-Mail accounts are created on the mail-server level. Horde can not do this part (It's a client only). You will need to access the mail server's settings directly. For a default Linux server setup (sendmail), I think this is pretty standardized. You may be able to gain insight on how to do this by looking into Webmin which can do this on *nix systems. However it's mainly in Perl I think.

Then there is other control panel software like Confixx and Plesk but I think they do not come in an Open Source flavour. I do not know of a PHP based Open Source hosting control panel, maybe somebody else does.

You will need exhaustive permissions, and probably the rights to configure the Webserver, to do these things from PHP. This is nothing you will be able to run on a shared hosting platform.


SquirrelMail has some plugins that integrate with your mail server that allow you to create, maintain, and delete your email users. It can handle exactly what you want, including allowing the employer to manage only their employees, while you can assign yourself as an administrator of a higher level that can manage ALL users, etc. See: Vadmin

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜