hello,
I have a server using sendmail and php4. I need to manage the mail server (pop3). As a webmail client I installed IlohaMail and everything is working fine, but I need an admin area with simple functions: add mail account, delete mail account, change mail account info.

I don't know how can I communicate this with the mail server.

Any help or hint is appreciated.

    Do you have cPanel? That has that built in.

    ~Brett

      I don't have CPanel I have Webmin but the problem is I need to create each user an email address when they sign-up and then modify or delete this information when the admin deletes an account or modifies information.

      So for each user account I need an email account with the same username.

        A user account gives you an email account automatically.

          so, how can I create a user account?

          I tried to use the "useradd" command but

          1. it asks for the crypted password and seems to reject everything I tried here (crypt() PHP function)

          2. the script runs as user apache and I need super-user privileges

            the second problem is solved. I used "sudo" to run the useradd command as a superuser and it worked.

            The first problem is still there: I can't find a way to set the password. useradd manual says that I should use the crypt() function from C.

            I need a PHP equivalent if someone knows about it.

            I also tried to run:
            passthru("sudo -u root passwd "$login"\n".$pwd."\n".$pwd);

            I don't know if \n can be accepted into a command but this doesn't seem to work.

              Write a Reply...