1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

How to add multiple email accounts

Discussion in 'Plesk for Linux - 8.x and Older' started by Pagemakers, Mar 22, 2006.

  1. Pagemakers

    Pagemakers Silver Pleskian

    31
    80%
    Joined:
    Dec 19, 2007
    Messages:
    664
    Likes Received:
    7
    We need to add about 1000 email accounts to a domain. They will be in the format firstname.surname@domain.com with a unique password.

    Is there a quick way of doing this - eg some sort of csv file import, or much we enter every single on of them manually?
     
  2. tmonsen

    tmonsen Guest

    0
     
    I have a small shell script to add user's through the unix api. You will need to upload a file email.txt to the same directory of the script. The email.txt file should have the email address followed by a space or tab, and then the password on each line.

    example:
    firstname.surname@domain.com password
    firstname2.surname@domain.com pass2

    You can then run the script sh <yourfilename>.sh

    **Note
    I am an advanced begginer when it comes to shell scripting I do not claim this script is the easiest/fastest/etc., but it should work. Please use at your own risk. I'm not responsible for your data, server, etc.

    ***** copy below this line for the script*******
    #!/bin/sh

    awk '{ print "/usr/local/psa/bin/mail.sh -c " $1 " -cp_access false -mailbox true -passwd " $2}' ./email.txt >> ./setup.sh;

    sh setup.sh;
     
  3. Cye84

    Cye84 Guest

    0
     
    what does setup.sh do?
     
  4. Pagemakers

    Pagemakers Silver Pleskian

    31
    80%
    Joined:
    Dec 19, 2007
    Messages:
    664
    Likes Received:
    7
    Tmonsen - thanks for your help. When we are ready I'll give it a go.
     
Loading...