Php script - create mail user - Linux/Postfix

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jean-Louis Vill

    Php script - create mail user - Linux/Postfix

    Hi everybody,

    I have a personel server (I learning) with Linux
    I use apache, Php, Postfix.

    I want create with Php script a mail user by web form (yahoo like) I
    don't really know Php. May be someone can give me a example. I want
    permit at my friends to create their own email account.

    Thanks folks!

    Jean-Louis

    P.S. If possible sent me your answer at jlvill@sympatic o.ca

  • Jean-Louis Vill

    #2
    Re: Php script - create mail user - Linux/Postfix

    Hi Matthew,

    Thanks,
    I'll try and I'll give you some news.

    Jean-Louis

    Matthew Vickers wrote:[color=blue]
    > On Mon, 25 Aug 2003 21:21:31 -0400
    > Jean-Louis Vill <jlvill@sympati co.ca> wrote:
    >
    >[color=green]
    >>Hi everybody,
    >>
    >>I have a personel server (I learning) with Linux
    >>I use apache, Php, Postfix.
    >>
    >>I want create with Php script a mail user by web form (yahoo like) I
    >>don't really know Php. May be someone can give me a example. I want
    >>permit at my friends to create their own email account.
    >>[/color]
    >
    >
    > The commands to read up on would be sudo, sudoers, useradd, the
    > backtick operator (or shell_exec) and escapeshellarg.
    >
    > Add the user apache runs as on your unit and command adduser to the
    > sudoers file (as per the man page) and shell_exec sudo useradd.
    >
    > Something like the following:
    >
    > $password = escapeshellarg( $_POST["pass"]);
    > $user_name = escapeshellarg( $_POST["user"]);
    > $ret = `sudo useradd -g users -s /bin/false -p $password $user_name`;
    >
    > *Disclaimer* code not tested, do not know if it will work and it's
    > most likely insecure.
    >
    >
    > Matt
    >
    > <snip>
    >[/color]

    Comment

    Working...