Mailing Lists: maillist Utility

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

Syntax

maillist <command> [<maillist name>] [<domain name>] [

<option_1> [<param>]

[<option_2> [<param>]]

…[<option_N> [<param>]]

]

Example

The following command line creates mailing list MailList on domain example.com domain, sets password userpass for the mailing list administrator, orders not to send the 'mailing list created' notification to this administrator, and sets the listadmin@domain1.com email address for this administrator.

# ./maillist --create MailList -domain example.com -passwd MyPass -notify false -email listadmin@example.com

Commands

Command

Parameter

Description

Example

--create or -c

<mailing list name>

Creates a mailing list. Requires concomitant use of the -domain, -passwd, -passwd_type, and -email options.

To create mailing list MailList on domain example.com, set the mailing list administrator's password to userpass, set the password's type to encrypted, and set the mailing list administrator's e-mail address to admin@example.net:

# ./maillist --create MailList -domain example.com -email admin@example.net -passwd user pass -passwd_type plain

or

# ./maillist -c MailList -domain example.com -email admin@example.net -passwd user pass -passwd_type plain

--update or -u

<mailing list name>

Updates mailing list settings.

To add e-mail address admin@example to mailing list MailList :

# ./maillist --update MailList -members add:admin@example.com

or

# ./maillist -u MailList -members add:admin@example.com

--update-service

<domain name>

Updates mail service status on a domain.

Requires concomitant use of the -status option.

To enable mailing list service on domain example.com:

# ./maillist --update-service example.com -status enabled

--remove or -r

<mailing list name>

Deletes a mailing list from domain.

To remove mailing list MailList from domain example.com:

# ./maillist --remove MailList -domain example.com

or

# ./maillist –r MailList -domain example.com

--on

<domain name>

Enables mailing list service on a domain.

To enable mailing list service on domain example.com:

# ./maillist --on example.com

--off

<domain name>

Disables mailing list service on a domain.

To disable mailing list service on domain example.com:

# ./maillist --off example.com

--info or -i

<mailing list name>

Displays the mailing list members.

To display the list of members of mailing list MailList on domain example.com:

# ./maillist --info MailList -domain example.com

or

# ./maillist -i MailList -domain example.com

--help or -h

 

Displays help on the use of the utility.

To display help on the use of the maillist utility:

# ./maillist –-help

or

# ./maillist –h

Options

Option

Parameter

Description

Example

-domain

<domain name>

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

Used with all commands, except the --help command.

To remove mailing list MailList from domain example.com:

# ./maillist --remove MailList -domain example.com

-passwd

<password>

Sets the mailing list administrator's password.

Used only with the --create command.

For additional comments, see the Note below the table.

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

# ./maillist -c MailList -domain example.com -email admin@example.net -passwd user pass -passwd_type plain -notify false

 

-passwd_type

plain | encrypted

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

Ignored if no password is specified.

Used only with the --create command.

For additional comments, see the Note below the table.

-email

<e-mail address>

Sets an e-mail address for a mailing list administrator.

Used with the --create command only.

-notify

true|false

Allows or prevents e-mail notification of the mailing list administrator about the mailing list creation.

Set to true by default.

Used only with the --create command.

-status

true|false

Enables or disables a mailing list. Is set to true by default.

To disable mailing list MailList on domain example.com:

# ./maillist -u MailList -domain example.com -status false

-members

add|del:<e-mail address>[,<e-mail address 1>,...,<e-mail address N>

Adds to or deletes e-mail addresses from a mailing list.

To add e-mail addresses jane@example and mike@domain.name to mailing list MailList :

# ./maillist -u MailList -members -domain example.com add:jane@example.com,mike@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 - -passwd_type options.
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 and -passwd_type options.