• The APS Catalog has been deprecated and removed from all Plesk Obsidian versions.
    Applications already installed from the APS Catalog will continue working. However, Plesk will no longer provide support for APS applications.
  • Please be aware: with the Plesk Obsidian 18.0.78 release, the support for the ngx_pagespeed.so module will be deprecated and removed from the sw-nginx package.

How to add multiple email accounts

Pagemakers

Silver Pleskian
We need to add about 1000 email accounts to a domain. They will be in the format [email protected] 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?
 
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:
[email protected] password
[email protected] 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;
 
Back
Top