How to add mail users

Discussion in 'Server Operation' started by K_meleonu, Apr 27, 2011.

  1. K_meleonu

    K_meleonu Member

    Hi there to all,
    I have a Linux server with Fedora 12 and ISPConfig 2 installed.
    I have installed AfterLogic Webmail on to another server and now i want to make a php script (like a registration form) to add eMail users on the Fedora server.
    Can anyone tell me how to do this? I mean, where i have to insert the informations.
    I have tryied to add an user with adduser from ssh and i even added [email protected] into /etc/postfix/virtusertable but i cannot use it.

    The AfterLogic documents are here: http://mailserver.crazydesign.biz/adminpanel/docs/ if anyone want to see how it works.
    I hope you understand what i want to do and if anyone has questions of answers wich could help please post them.

    Thank you all in adwance
     
  2. K_meleonu

    K_meleonu Member

    Found a solution

    Hi there to all,
    I have found a solution.
    After adding the user with adduser on the Fedora server i had to create a Maildir in /home/USER/
    Now it all work's great.
    Now i will have to create a php script to add the user on ther server and i will modify the /etc/skell to create /home/USER/Maildir in the moment i add the user.

    If you have any questions or sugestions please post them.

    Best regards
     
  3. till

    till Super Moderator Staff Member ISPConfig Developer

    And why havent you just used ispconfig? There is no need to add any users manually or edit any files when ispconfig is installed on your server, just login to ispconfig and add the user trough ispconfig.

    Make sure that you enabled the maildir checkbox in ispconfig server settings.

    If you want to add users from your own script as well, then use the ispconfig remoting framework for that.

    http://www.ispconfig.org/ispconfig-2/remoting-framework/
     
  4. K_meleonu

    K_meleonu Member

    Hi there till,
    Thank you for your answer.
    I don't want to use ISPConfig because i want to make a registration form and make it available to anyone.
    So anyone could register for an account. Like yahoo, msn, etc.

    Now i have another problem with MySQL.

    I have:
    $mailu = ($Userdorit,"@", $Domeniu);
    this should take the user, add the @ and the selected domain from the list and results [email protected]

    Then i want to insert this in my mysql DB.

    For mysql insertion i have this:
    $query="insert into awm_accounts (friendly_nm,signature,id_acct,id_user,def_acct,mail_inc_login,mail_inc_host,mail_inc_pass,mail_out_pass,deleted,mail_protocol,mail_inc_port,email) values ('".$Nume."','".$Prenume."','".$hits[0]."','".$idul."','".$unu."','".$Userdorit."','".$Domeniu."','".$Parola."','".$RepetaParola."','".$zero."','".$zero."','".$ununuzero."','".$mailu."')";

    Notice: for email field i have $mailu

    But when i try to process the form, instead of inserting the values into mysql table and show the thank you page i get a blank page and no values inserted into mysql.

    I have triyed some trick's but nothing worket untill now.
    Can you please give me a solution or a hint?

    Thank you in advance

    EDIT:
    I have solved the problem. I had to modify $mailu = ($Userdorit,"@", $Domeniu); into $mailu = ("$Userdorit@$Domeniu");
     
    Last edited: Apr 27, 2011

Share This Page