Re: IMAP/POP3 Administration API?

[email protected] (Dave Mertens)
Newsgroups php.db,php.dev,php.doc,php.general,php.gtk,php.i18n,php.install,php.lang,php.mirrors,php.pear.cvs,php.pear.dev,php.pear.general,php.qa,php.test,php.windows
Message-ID <[email protected]>
> > > Is there any IMAP/POP3 API/Modules of Linux email system (Sendmail)
> written
> > > in PHP?
> > > I am looking for API to write a signup page for users.

> > Have to tried http://www.php.net/imap ?? Great source for API's ;-)

> Have looked through it already. None of them allows me to add/delete users

Most mailserver use the users that exist on the mail server. An mail user is also an regular user (Althru most of them get an fake shell)
. To add, modify or delete such user you need root privilegde. Webserver such as Apache run with a user nobody (or similair) which have as less access to the system as possible.

Because php is than also running as user 'nobody'. And then you can't add, modify or delete users. 

If you still want to build a mailuser webinterface, here's how to do-it:
- first make sure only 'localhost' can access the site. Use an port different from '80'.

To edit the /etc/passwd there's a file in the php4 source directory /pear/files. This file is called 'Passwd.php' which you can use to edit the /etc/passwd and similair files..

Because every mail server have it own config files, it's not possible to create an 'generic' API. I advise you to download some other web-interfaces for sendmail
so you can see how they're handling the files.

Good luck.

Dave Mertens
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.