mailserver.exe: Mail Server Options
The mailserver.exe
serves to change server-wide mail settings
defining the way mail server works on all domains where the mail service
is enabled. Using this utility, you can perform the following tasks:
- Setting the relaying mode for the mail server.
- Setting the maximum message size that can be sent through the mail server.
Location
%plesk_cli%
Usage
mailserver.exe <command> [
<option_1> [<param>]
[<option_2> [<param>]]
... [<option_N> [<param>]]
]
Example
The following command sets the relaying mode that requires authorization, specifies the POP3 authorization type for mail users, and set the lock time to 10 minutes:
plesk bin mailserver.exe --set-relay auth -auth-type pop3 -lock-time 10
Commands
Command | Parameter | Description | Example |
---|---|---|---|
--set-relay |
closed|auth |
Specifies the mail relay mode for the mail server. If parameter |
To make mail server work in the closed relay mode: plesk bin mailserver.exe --set-relay closed |
--set-max-letter-size |
<number>[K|M|G] |
Limits the maximum message size that can be sent through the mail server. |
To restrict the maximum message size that can be accepted by the mail server to 5 Mbytes: plesk bin mailserver.exe --set-max-letter-size 5M |
--set-maps-status |
true|false |
Enables/Disables DNSBL spam protection. Before you enable the protection, you should set the list of
RBL hosts with the |
To enable DNSBL spam protection on the mail server: plesk bin mailserver.exe --set-maps-status true |
--add-maps-zone |
<domain_name_1>[,<domain_name_2>,...<domain_name_N>] |
Adds one or more domain names to the existing DNSBL spam protection list. To enable the spam protection, use the |
To add domain names maps1.example.com and maps2.example.com to the DNSBL spam protection list: plesk bin mailserver.exe --add-maps-zone maps1.example.com,maps2.example.com |
--set-maps-zone |
<domain_name_1>[,<domain_name_2>,...<domain_name_N>] |
Sets a new DNSBL spam protection list and adds the specified domains to it. This command removes the previously existing list. To enable the spam protection, use the |
To set a new DNSBL spam protection list and add domain names maps1.example.com and maps2.example.com to the list: plesk bin mailserver.exe --set-maps-zone maps1.example.com,maps2.example.com |
--remove-maps-zone |
<domain_name_1>[,<domain_name_2>,...<domain_name_N>] |
Removes one or more domain names from the DNSBL spam protection list. |
To remove domain names maps1.example.com and maps2.example.com from the DNSBL spam protection list: plesk bin mailserver.exe --remove-maps-zone maps1.example.com,maps2.example.com |
--use-vocabulary |
true|false |
Enables/Disables checking mail user passwords against the dictionary of simple passwords to prevent users from setting simple passwords. |
To enable checking of mail user passwords against the password dictionary to prevent users from setting simple passwords: plesk bin mailserver.exe --use-vocabulary true |
--add-to-black-list |
<domain_name_1>|<email_address_1> [,<domain_name_2>|<email_address_2>,...<domain_name_N>|<email_address_N>] |
Adds a list of addresses to the server black list. Both e-mail addresses and domains can be specified. Wildcards (? and *) are allowed. Separate entries with comma, for example: mail@example.com, spam?@spamdomain?.*, *domain.com |
To add domain names example.org, sample.example.net and the addresses matching the mask *spam@google.com to the black list of the mail server: plesk bin mailserver.exe --add-to-black-list example.org,sample.example.net,*spam@google.com -action mark_spam |
--remove-from-black-list |
<domain_name_1>|<email_address_1> [,<domain_name_2>|<email_address_2>,...<domain_name_N>|<email_address_N>] |
Removes a list of addresses from the server black list. Both e-mail addresses and domains can be specified. Wildcards (? and *) are allowed. Separate entries with comma, for example: mail@example.com, spam?@spamdomain?.*, *domain.com |
To remove domain names sample.example.org, forum.example.net and the addresses matching the mask *spam@google.com from the mail server black list: plesk bin mailserver.exe --remove-from-black-list sample.example.org,forum.example.net,*spam@google.com |
--add-to-white-list |
<domain_name_1>|<email_address_1>|<IP address/subnet mask 1> [,<domain_name_2>|<email_address_2>|<IP address/subnet mask _2>,...<domain_name_N>|<email_address_N>|<IP address/subnet mask_N>] |
Adds a list of addresses to the server white list. IP addresses with masks, e-mail addresses, or domains can be specified. Wildcards (? and *) are allowed. Separate entries with comma, for example: mail@example.com, notspam?@notspamdomain?.*, *domain.com, 123.123.123.123/32 |
To add 192.0.2.0/24 and 192.0.2.3/16 and the addresses matching the mask *@odin.com to the mail server white list: plesk bin mailserver.exe --add-to-white-list 192.0.2.0/24,10.0.0.0/24,*@odin.com |
--remove-from-white-list |
<domain_name_1>|<email_address_1>|<IP address/subnet mask 1> [,<domain_name_2>|<email_address_2>|<IP address/subnet mask _2>,...<domain_name_N>|<email_address_N>|<IP address/subnet mask_N>] |
Removes a list of addresses from the server white list. IP addresses with masks, e-mail addresses, or domains can be specified. Wildcards (? and *) are allowed. Separate entries with comma, for example: mail@example.com, notspam?@notspamdomain?.*, *domain.com, 123.123.123.123/32. |
To remove 192.0.2.0/24 and 192.0.2.4/16 and the addresses matching the mask *@odin.com from the mail server white list: plesk bin mailserver.exe --remove-from-white-list 192.0.2.0/24,10.0.0.0/24,*@odin.com |
--update-virusfilter |
Specifies antivirus scanning settings. Requires the |
To switch on server-wide antivirus scanning for incoming mail: plesk bin mailserver.exe --update-virusfilter -server-wide in |
|
--set-message-submission |
true|false |
Defines whether the mail messages sent through the server are submitted or not. |
To enable message submission on all IP addresses: plesk bin mailserver.exe --set-message-submission true |
--sign-outgoing-mail |
true|false |
Allows/Prohibits using the DKIM spam protection method to sign outgoing mail. Is |
To enable signing for outgoing mail on the mail server: plesk bin mailserver.exe --sign-outgoing-mail true |
--enable-dmarc |
Enables DMARC validation for incoming mail. Note: DMARC is supported only by the SmarterMail mail server. |
To enable DMARC spam protection for incoming mail on the mail server: plesk bin mailserver.exe --enable-dmarc |
|
--disable-dmarc |
Disables DMARC validation for incoming mail. |
To disable DMARC spam protection for incoming mail on the mail server: plesk bin mailserver.exe --disable-dmarc |
|
--update-webmail |
horde|mewebmail |
Specifies the webmail client you want to enable or disable.. |
To enable Horde webmail on the mail server: plesk bin mailserver.exe --update-webmail horde -state true |
--info or -i
|
options|black-list|white-list |
Displays mail server settings. The following modes are available:
|
To view the mail server options: plesk bin mailserver.exe --info options or plesk bin mailserver.exe -i options |
--add-external-webmail |
-webmail-name <service name> -webmail-url <URL for access to the service> |
Registers an additional (external) webmail service with Plesk so that you can provide your users with access to it. To learn more about registering additional webmail services with Plesk, refer to Administrator’s Guide > Webmail Software. |
To register an external webmail service called ExampleMail at URL mail.example.com: plesk bin mailserver.exe --add-external-webmail -webmail-name ExampleMail -webmail-url mail.example.com |
--update-external-webmail |
<service name> |
Updates information about an additional webmail service. |
To change the URL for the webmail record ExampleMail to mail2.example.com: plesk bin mailserver.exe --update-external-webmail "ExampleMail" -webmail-url mail2.example.com To change the name for the external webmail service ExampleMail to SampleMail: plesk bin mailserver.exe --update-external-webmail "ExampleMail" -webmail-name "SampleMail" |
--remove-external-webmail |
<service name> |
Unregisters an additional webmail service. |
To remove the external webmail service record ExampleMail: plesk bin mailserver.exe --remove-external-webmail "ExampleMail" |
--update-smtp-settings |
Updates the settings of an external SMTP server for outgoing mail. |
To update the external SMTP server settings: plesk bin mailserver.exe --update-smtp-settings -mail-notifications true -smtp-host 123.123.123.123 -smtp-port 587 -smtp-login jdoe -smtp-password sample -smtp-tls true -smtp-allow-users true |
|
--enable-outgoing-antispam |
Switches on limits on outgoing email messages. |
To turn on the usage of limitations on outgoing mail from the Plesk server: plesk bin mailserver.exe --enable-outgoing-antispam |
|
--disable-outgoing-antispam |
Switches off limits on outgoing email messages. |
To turn off the usage of limitations on outgoing mail from the Plesk server: plesk bin mailserver.exe --disable-outgoing-antispam |
|
--set-outgoing-messages-domain-limit |
<number> |
Sets the maximum number of outgoing messages from a domain (per hour) that Plesk will use by default. |
To set the default value for the limit on outgoing email messages from a domain: plesk bin mailserver.exe --set-outgoing-messages-domain-limit 10 |
--set-outgoing-messages-subscription-limit |
<number> |
Sets the maximum number of outgoing messages from a subscription (per hour) that Plesk will use by default. |
To set the default value for the limit on outgoing email messages from a subscription: plesk bin mailserver.exe --set-outgoing-messages-subscription-limit 50 |
--set-outgoing-messages-report-period |
<P1D|P1W|P2W|P1M> |
Sets the default period of time for the alert on the Plesk Home page about attempts to exceed limits on outgoing mail (the last day, week, two weeks, or month). |
To make Plesk calculate reports on outgoing mail using the data for the last two weeks: plesk bin mailserver.exe --set-outgoing-messages-report-period P2W |
--set-outgoing-messages-notification-period |
<PT15M|PT1H|PT6H|PT12H|P1D> |
Sets the default period of time for email notifications about attempts to exceed limits on outgoing mail (15 minutes, 1 hour, 6 hours, 12 hours,1 day). |
To make Plesk send notifications to administrator on outgoing mail every 6 hours: plesk bin mailserver.exe --set-outgoing-messages-notification-period PT6H |
--help or -h
|
Displays help on the use of the utility. |
To view the help on the use of the plesk bin mailserver.exe --help or plesk bin mailserver.exe -h |
|
--set-certificate |
<certificate name> |
Specifies the name of the SSL/TLS certificate used to secure the mail server. |
To secure the mail server with the SSL/TLS certificate cert3 that is stored at the repository of the domain example.net: # plesk bin mailserver.exe --set-certificate "cert3" -certificate-repository example.net |
-certificate-repository |
<domain-name> |
Specifies the domain of the SSL/TLS certificate repository. By default, the server repository is used. This option is used with the command |
Note: When enabling checking passwords in a dictionary, be sure that Microsoft Windows Local Security Policy is set up as follows: Security settings > Account polices > Password policy: Password must meet complexity requirements is Enabled.
Options
Option | Parameter | Description | Example |
---|---|---|---|
-auth-type |
pop3|smtp|both |
Specifies mail user authorization type during mail relaying. Used with the |
To set the relaying mode with POP3 authorization with the lock time equal to 10 minutes: plesk bin mailserver.exe --set-relay auth -auth-type pop3 -lock-time 10 |
-lock-time |
<minutes> |
Specifies the lock time for POP3 authorization. Required with |
See the example for -auth-type . |
-state |
true|false |
Enables (true) or disables (false) the specified webmail client. Used with the |
To enable Horde webmail on the mail server: plesk bin mailserver.exe --update-webmail horde -state true |
-action |
delete|mark_spam |
Specifies the action for mail messages matching the specified address pattern – whether to delete the messages or to mark them as spam. Wildcards (? and *) are allowed for specifying addresses. Required for the –add-to-black-list command. |
To delete messages coming from spam@mail.com and *@spam.com: plesk bin mailserver.exe --add-to-black-list spam@mail.com,*@spam.com -action delete |
-submission-ip |
<ip> |
Specifies IP address for message submission. Used with the |
To enable message submission on IP address 192.0.2.10: plesk bin mailserver.exe --set-message-submission true -submission-ip 192.0.2.10 |
-server-wide |
none|in|out|both |
Sets server-wide antivirus scanning policy:
Used with the |
To switch on server-wide antivirus scanning for incoming and outgoing mail: plesk bin mailserver.exe --update-virusfilter -server-wide both |
-allow-personal |
none|in|out|both |
Allows to override server-wide antivirus scanning policy for separate mail accounts:
Used with the |
To switch off antivirus scanning for outgoing mail for separate mail accounts: plesk bin mailserver.exe --update-virusfilter -allow-personal out |
-excluded-nets |
<IP address/subnet mask 1>[,<IP address/subnet mask 2>,...<IP address/subnet mask N>] |
Sets networks that should be excluded from relay restrictions. Used with the |
To make mail server work in the closed relay mode with the exception of 212.45.62.0/24: plesk bin mailserver.exe --set-relay closed -excluded-nets 212.45.62.0/24 |
-webmail-name |
<service name> |
Specifies the name for an external webmail service. |
To register an external webmail service called ExampleMail at URL mail.example.com: plesk bin mailserver.exe --add-external-webmail -webmail-name ExampleMail -webmail-url mail.example.com |
-webmail-url |
<URL for access to the service> |
Specifies the URL for an external webmail service. | |
-webmail-status |
enabled|disabled |
Specifies whether the additional (external) webmail is available for selection in hosting plans. |
To temporarily remove the ExampleMail webmail option from hosting plans: plesk bin mailserver.exe --update-external-webmail "ExampleMail" -webmail-status disabled |
-smtp-use-default-settings |
true|false |
Uses the mail server installed with Plesk as an external SMTP server, and uses the default mail account to access this SMTP server. Use this option with the If you set this option to false, then you should specify the settings of an external SMTP server (see the options below.) |
To use the mail server installed with Plesk and a default mail account created by Plesk for accessing mail server for outgoing mail: plesk bin mailserver.exe --update-smtp-settings -smtp-use-default-settings true |
-smtp-host |
<domain|ip> |
Sets the host name or IP address of the external SMTP server for outgoing mail. |
To update the external SMTP server settings in order to use the SMTP server other than installed in Plesk: plesk bin mailserver.exe --update-smtp-settings -mail-notifications true -smtp-host 123.123.123.123 -smtp-port 587 -smtp-login jdoe -smtp-password sample -smtp-tls true -smtp-allow-users true |
-smtp-port |
<port> |
Sets the port for the external SMTP server for outgoing mail. | |
-smtp-login |
<login_name> |
Sets the username for accessing the external SMTP server for outgoing mail. | |
-smtp-password |
<pasword> |
Sets the password for accessing the external SMTP server for outgoing mail. | |
-mail-notifications |
true|false |
Allows Plesk to send email notifications through the specified SMTP server. | |
-smtp-tls |
true|false |
Specifies whether the external SMTP server requires encrypted connections. | |
-smtp-allow-users |
true|false |
Allows users’ scripts to send mail through the external SMTP server. |