• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Is there an IMPORT script for mass email additions?

J

jschoaf

Guest
I have some domains I want to move plesk that have 200+ email accounts. I can get these email adddress/passwords in a excel file but is there a php script or whatever to put them in plesk? other wise its going to take several days :)

any help ior links appreciated, thanks
 
[root@george conf]# /usr/local/psa/admin/bin/mailmng --help
Usage: mailmng [OPTIONS]...

(--add-mailname | --remove-mailname) --domain-name=<domain_name> --mailname=<mail_name> [--disk-quota=<quota>]
adds/removes mailname to the mail domain. Optionally sets the mailbox quota
--rename-mailname --domain-name=<domain_name> --old-mailname=<old_mail_name> --new-mailname=<new_mail_name>
renames a mailname in the mail domain. Optionally sets the mailbox password.
The noncrypted password is transferred in the environment variable PSA_PASSWORD,
or crypted password is transferred in the environment variable PSA_CRYPTED_PASSWORD
(--add-mailbox | --remove-mailbox) --domain-name=<domain_name> --mailname=<mail_name>
adds/removes a mailname.
The noncrypted password is transferred in the environment variable PSA_PASSWORD,
or crypted password is transferred in the environment variable PSA_CRYPTED_PASSWORD
--get-mailbox-size [--in-blocks] --domain-name=<domain_name> --mailname=<mail_name>
returns the size of mailbox for a mailname.
--set-password --domain-name=<domain_name> --mailname=<mail_name>
sets the password for a mailname
--set-mailbox-disk-quota --domain-name=<domain_name> --mailname=<mail_name> --disk-quota=<quota>
sets the disk quota for a mailbox. Negative quota == Unlimited
(--add-redirect | --remove-redirect) --domain-name=<domain_name> --mailname=<mail_name> --redirect-email=<email>
adds/removes mail redirect from the mailname
(--set-autoresponder | --reset-autoresponder) --domain-name=<domain_name> --mailname=<mail_name>
enables/disables autoresponder for mailname
(--add-alias | --remove-alias) --domain-name=<domain_name> --mailname=<mail_name> --alias=<email_alias>
adds/removes an alias for mailname
(--add-domain | --remove-domain) --domain-name=<domain_name> [--disk-quota=<quota>]
adds/removes mail domain
(--turn-on-domain | --turn-off-domain) --domain-name=<domain_name>
enables/disables mail domain
--set-domain-disk-quota --domain-name=<domain_name> --disk-quota=<quota>
sets a disk space quota to a mail domain. Negative quota == Unlimited
(--add-badmailfrom | --remove-badmailfrom) --domain-name=<domain_name>
adds/removes mail domain to/from the blacklist
--set-bounce --domain-name=<domain_name> [--phrase=<phrase>]
letters sent to a nonexistent mailname, are bounced with this phrase
--set-catchall --domain-name=<domain_name> --email=<email_address>
letters sent to a nonexistent mailname, are forwarded to this email
--set-reject --domain-name=<domain-name>
letters sent to a nonexistent mailname, are rejected
--unset-reject --domain-name=<domain-name>
do not reject letters sent to a nonexistent mailname
--set-relay --type=("open" | "closed" | "auth") [--auth-type=("POP3,SMTP" | "POP3" | "SMTP") [--lock-time=<time_in_seconds>]]
sets the relaying mode
(--add-whitelist | --remove-whitelist) --ip-address=<ip_address> --netmask=<netmask>
adds/removes the subnet to/from the white-list
(--add-blacklist | --remove-blacklist) --domain-name=<domain_name>
adds/removes mail domain to/from the blacklist
--set-maps-protection [--maps-zones=<zone1,zone2,...,zoneN>]
installs MAPS protection. Absent list of zones == disabled
--set-accounts-format --format=("simple" | "compound" | "both")
sets the POP3/IMAP accounts format
--features
returns PHP code which reflects state of several features support in mailmng.
Currently they are auth-type and format
--set-max-letter-size --size=<size_in_bytes>
set maximum letter size
--get-max-letter-size
get maximum letter size
--list-attachments [--in-blocks] --domain-name=<domain_name> --mailname=<mail_name>
list attachments for <mail_name>
--add-attachment --domain-name=<domain_name> --mailname=<mail_name> --file-name=<full_file_name> --attachment-file-name=<attachment_file_name>
add attachment for <mail_name>
--remove-attachment --domain-name=<domain_name> --mailname=<mail_name> --attachment-file-name=<attachment_file_name>
remove attachment from <mail_name>
-w, --without-restart
without restart qmail. Can used with another options
-p, --start-smtpd
start qmail
-o, --stop-smtpd
stop qmail
-s, --status-smtpd
qmail status
-r, --restart-smtpd
restart qmail
-i, --start-maild
start courier-imap
-t, --stop-maild
stop courier-imap
-e, --status-maild
courier-imap status
-z, --restart-maild
restart courier-imap
-h, --help
display this help and exit
[root@george conf]#

Stuart
 
Back
Top