The maillist utility is used to manage mailing lists through CLI. By using this utility, you can perform the following tasks:

  • creating/removing mailing lists
  • adding/deleting email addresses to/from mailing lists
  • editing email and notification settings for the mailing list administrator
  • enabling/disabling mailing lists
  • setting mailing list status

Usage

maillist <command> [<maillist name>] [<domain name>] [
<option_1> [<param>]
[<option_2> [<param>]]
... [<option_N> [<param>]]
]

Example

The following command creates mailing list MailList on the domain example.com, sets password type to plain and password to sample for the mailing list administrator, orders not to send the ‘ mailing list created ’ notification to this administrator, and sets the listadmin@example.com email address for this administrator.

plesk bin maillist --create MailList -domain example.com -passwd_type plain -passwd sample -notify false -email listadmin@example.com

Commands

Command Parameter Description Example
--create or -c <mailing_list_name>

Creates a mailing list.

Requires the -domain, -passwd, -passwd_type, and -email options.

To create mailing list MailList on example.com, set the mailing list administrator’s password to userpass, set the password type to plain, and set the mailing list administrator’s email address to admin@example.com:

plesk bin maillist --create MailList -domain example.com -email admin@example.net -passwd userpass -passwd_type plain

or

plesk bin maillist -c MailList -domain example.com -email admin@example.net -passwd userpass -passwd_type plain

--update or -u <mailing_list_name> Updates mailing list settings.

To add email address JDoe@example.com to mailing list MailList on the domain example.com:

plesk bin maillist --update MailList -members add:JDoe@example.com -domain example.com

or

plesk bin maillist -u MailList -members add:JDoe@example.com -domain example.com

--update-service <domain>

Updates mail service status on a domain.

Requires the -status option.

To enable mailing list service on the domain example.com:

plesk bin maillist --update-service example.com -status enabled

--remove or -r <mailing_list_name> Deletes a mailing list from a domain.

To remove mailing list MailList from the domain example.com:

plesk bin maillist --remove MailList -domain example.com

or

plesk bin maillist -r MailList -domain example.com

--on <domain_name> Enables mailing list service on a domain.

To enable mailing list service on the domain example.com:

plesk bin maillist --on example.com

--off <domain_name> Disables mailing list service on a domain.

To disable mailing list service on the domain example.com:

plesk bin maillist --off example.com

--set-secure-links true|false Enables or disables secure HTTPS links in mailing lists.

To enable generation of secure HTTPS links in mailing lists:

plesk bin maillist --set-secure-links true

--info or -i <mailing_list_name> Displays the mailing list members.

To view the MailList members on the domain example.com:

plesk bin maillist --info MailList -domain example.com

or

plesk bin maillist -i MailList -domain example.com

--help or -h   Displays help on the use of the utility.

To view help on the use of the maillist utility:

plesk bin maillist --help

or

plesk bin maillist -h

Options

Option Parameter Description Example
-domain <domain_name>

Specifies the name of a domain to which a mailing list belongs.

Required with all commands, except for the --help.

To remove mailing list MailList from the domain example.com:

plesk bin maillist --remove MailList -domain example.com

-passwd <password>

Sets the mailing list administrator’s password.

Used with the --create only.

For additional comments, see the Note below the table.

To create mailing list MailList on the domain example.com, set the mailing list administrator’s password to userpass, set the password type to encrypted, set the mailing list administrator’s e-mail address to admin@example.net, and disable email notification of the mailing list administrator about the mailing list creation:

plesk bin maillist -c MailList -domain example.com -email admin@example.com -passwd '$1$3KWwrPxB$b6GLpDPpQVsljMRgAlQZG/' -passwd_type encrypted -notify false

-passwd_type plain|encrypted

Specifies the type of the mailing list administrator’s password.

Ignored if no password is specified.

Used with the --create only.

 
-email <email>

Sets an email address for a mailing list administrator.

Used with the --create only.

 
-notify true|false

Allows/Prohibits notifying the mailing list administrator about a mailing list creation.

Is true by default.

Used with the --create only.

 
-status <enabled|disabled|admin ,domadm,parent,client,expired>

Enables/Disables mailing lists service on a domain (the enabled or disabled parameters, respectively).

admin disables the service and sets its status to This service is disabled by administrator

client disables the service and sets its status to

Domain mail service is disabled by client.

parent sets the service status to the status of the domain.

The use of the domadm parameter is restricted; the parameter should not be used for changing the domain mail service status.

Is enabled by default.

To disable MailList on the domain example.com:

plesk bin maillist -u MailList -domain example.com -status disabled

-members add|del:<email_1>[,<email_2>,...,<email_3> Adds/Deletes email addresses to/from a mailing list.

To add email addresses Jane@example.com and Mike@sample.net to the mailing list MailList:

plesk bin maillist -u MailList -members add:jane@example.com,mike@example.com -domain example.com

Note: Use of this option is not recommended. For security reasons, you can transfer non-encrypted passwords by using environment variable PSA_PASSWORD. Passing passwords through CLI as parameters of the -passwd option may potentially compromise the system’s security as command line can be observed by other users of the system. It is more secure to pass passwords through the environment variables. You can transfer non-encrypted passwords by using environment variable PSA_PASSWORD while using single quotes to specify the empty values in the command line for the argument of the -passwd option.

Similarly, you can transfer encrypted passwords through the environment variable PSA_CRYPTED_PASSWORD while using single quotes to specify the empty values in the command line for the argument of the -passwd option.