pem.cqmail.addMailForwarding

This method is supported by POA starting from version 2.5.

This method associates forwarding e-mail address with Mailname. There are the following use cases:

Additionally, if a new Mailname is created, POA creates a Service User with the following properties:

The E-mail Service is assigned to the Service User.

The method has the following input parameters:

Name

Type

Short Description

subscription_id

int

ID of Subscription.

name

string

Local part (e-mail address before the @ sign).

[domain_name]

string

Name of the Domain to create a Mailname for. There are the following use cases:

  • This parameter is omitted. In this case POA creates an "All-Domains" Mailname. For example: name@<all-domains>.
  • This parameter is specified. In this case POA creates a Mailname for Domain specified. For example: name@domain.com.

If the domain_name parameter is specified, method checks that the following requirements are satisfied:

  • CQMail hosting is added to Domain.
  • CQMail hosting corresponds to Subscription specified.

Method returns error, if one of requirements is not satisfied.

forward_to

string

E-mail address to forward mail to.

[password]

string

Mailname password.

[password_crypted]

boolean

Whether the password is passed in the encrypted form (DES or BSD MD5). There are the following possible values:

  • 0 - password is passed in the plain text form.
  • 1 - password is passed in the encrypted form.

The method has no output parameters.

Note: Starting from POA 2.6.4 this method can also be called under Reseller permissions.