How to create a lot of mail accounts at once instead of creating them individually?
Such an operation can be accomplished with the help of CLI (command line interface) utilities.
The Plesk Command Line Interface (CLI) was designed to integrate Plesk Server Administrator with third-party applications. It can also be used to manage Plesk installations by administrators experienced in using Plesk. This feature provides the command line interface to the majority of management tasks that can be performed by Plesk Administrator. The CLI provides an alternative means of control for various business objects in Plesk. Plesk command line utilities use the Plesk core functionality to create, manage, and delete clients, domains, services, and other Plesk objects.
Command line utilities for Plesk for Linux/Unix are located in the /PRODUCT_ROOT_D/bin directory on the Plesk server.
There is a specific utility for managing Plesk mail accounts: /PRODUCT_ROOT_D/bin/mail.sh
The mail utility is used to manage domain mail service and mail names (email accounts) through CLI. By using this utility, you can perform the following tasks:
- Enabling or disabling mail service on a domain
- Creating and deleting mail accounts
- Editing mail account settings
- Managing mail groups associated with mail accounts
- Managing mail user control panel access
Managing mail user control panel interface parameters With help of this utility, it is possible to automate the process of managing mail accounts. For more information, please refer to the appropriate documentation version. For example: