Im working on imap based mail client. Im aware of "incoming mail"-character of IMAP protocol but, can I have possibility to create completely new mailbox on my mail server?
imap_createmailbox(int imap_stream) is not what Im looking for.
In brief I want to create new mailbox for new user and new password.
Please help!
Paul
Php & Imap
Hi there, it depends entirely on what mail server you're running, and how it creates mailboxes. Either way you'll probably have to use the system() function to run an external program, (ie, the adduser script in linux).
Hi,
we recently had a php project with imap support. I hope I'm right with the following information.
You should be able to create a new mailbox with imap_createmailbox. But you need to connect to the server with a user that has admin privileges on that imap server in order to create new mailboxes for new users. If you e.g. want to create a new mailbox for user test you should be able to do that with
imap($stream,"user.test");
In some cases this must be
imap($stream,"user/test");
if the imap server supports usernames with dots like
imap($stream,"user/t.est");
which is configurable e.g. in cyrus imap.
That would create a new mailbox. The problem with the password is AFAIK that at least cyrus (the one we use) and maybe a lot of other imap servers authenticate users against existing system users or LDAP or anything else. So you can create new mailboxes but the user that want's to get access to his newly created mailbox has to exist in the system/LDAP or where ever.
I need more information about your imap server and the OS it is running on (we use SuSE Linux, cyrus imap and openldap)
This might sound a little bit complicated but once you get things set up correctly it should work perfectly
Regards,
Thomas
Thanks for Your replies,
Im working on Merkury/32 imap server and its all running on Widows. Dont know if You know this server- its from those shareware ones. Maybe it was my mistake to install this server but I was thinking that it is not so important and all lies in client side PHP IMAP programming. It looks that it is essential.
Tsinka wrote:
imap($stream,"user.test");
We are talking about imap_createmailbox($stream,"user.test") function, aren't we?
Tsinka also wrote:
<
The problem with the password is AFAIK that at least cyrus (the one we use) and maybe a lot of other imap servers authenticate users against existing system users or LDAP or anything else. So you can create new mailboxes but the user that want's to get access to his newly created mailbox has to exist in the system/LDAP or where ever.
This password stuff seems to be complicated for me.
Anyway, thanks for replies and please for more if You can.
Paul