Mail service settings are defined in the MailPreferences complex type (plesk_mailname.xsd). This type is structured as follows:

image 76755

  • The nonexistent-user node is optional. It specifies the way the server handles messages sent to unknown mail users (not registered on the site). By default, such messages are sent back to the sender with a message: “this address no longer accepts mail”.
    • The bounce node is used to modify the default rejection message. Data type: string.
    • The forward node specifies the mail address to which undelivered mail should be forwarded. Data type: string.
    • The reject node is used to reject such mail messages (they will not be accepted by the mail server). Data type: none.
  • The webmail node is optional. It specifies whether mail users will have access to their mail via a webmail application. Data type: Boolean.
  • The spam-protect-sign node is optional. If the DomainKeys spam protection is available on the server, the node specifies whether the spam protection is turned on on the site. Data type: Boolean.
  • The greylisting node is optional. If the greylisting spam protection is available on the server, the node specifies whether the spam protection is turned on on the site. Data type: Boolean.
  • The mailservice node is optional. It switches on or off the mail service on a specified domain.
  • The ip_address and mail_provider nodes are intended for internal needs of Plesk Automation; therefore, you do not need to use them.
  • The webmail-certificate node specifies the SSL/TLS certificate used to secure webmail.

The following packet sets mail service preferences for three sites:

<packet>
<mail>
<set_prefs>
   <filter>
      <site-id>12</site-id>
      <site-id>14</site-id>
      <site-id>15</site-id>
   </filter>
   <prefs>
      <nonexistent-user>
          <reject/>
      </nonexistent-user>
      <mailservice>false</mailservice>
   </prefs>
</set_prefs>
</mail>
</packet>