Gandi Wiki


Questions

Mail methods

domain_gandimail_activate

Signature

boolean domain_gandimail_activate(string session, string domain)

Description

Enables the Gandimail service for one domain

Parameters

  • string session: the session id (returned by login)
  • string domain: the domain to activate Gandimail for

Returns

The XML-RPC response will return True (boolean) if the status was changed, or False if it wasn't, or a fault describing the problem. Possible faults are described in section Error Codes Format.

Sample code

Forthcoming



domain_gandimail_deactivate

Signature

boolean domain_gandimail_deactivate(string session, string domain)

Description

Disables the Gandimail service for one domain: our mail servers won't accept mail sent to this domain anymore

Parameters

  • string session: the session id (returned by login)
  • string domain: the domain to de-activate Gandimail for

Returns

The XML-RPC response will return True (boolean) if the status was changed, or False if it wasn't, or a fault describing the problem. Possible faults are described in section Error Codes Format.

Sample code

Forthcoming



domain_forward_list

Signature

array domain_forward_list(string session, string domain)

Description

Returns a structure associating each forward with its destinations

Parameters

  • string session: the session id (returned by login)
  • string domain: the domain to retrieve the forwards from

Returns

The XML-RPC response will return a struct associating each forward (without its domain) with its destination, or a fault describing the problem. Possible faults are described in section Error Codes Format.

Sample code

Forthcoming



domain_forward_set

Signature

boolean domain_forward_set(string session, string domain, string source, array destinations)

Description

Setup a forward to redirect to one or more destinations. Warning: it overwrites the forward (the source), so if you try to add one destination to a forward, you shall include the existing destinations

Parameters

  • string session: the session id (returned by login)
  • string domain: the domain to set the forwards to
  • string source: the forward name (eg: john.doe)
  • array destinations: the list of emails to forward to

Returns

The XML-RPC response will return True (boolean), or a fault describing the problem. Possible faults are described in section Error Codes Format.

Sample code

Forthcoming



domain_forward_delete

Signature

boolean domain_forward_delete(string session, string domain, string source)

Description

Deletes a forward. This does the same thing as domain_forward_set(tok, domain, [])

Parameters

  • string session: the session id (returned by login)
  • string domain: the domain to delete the forward from
  • string source: the forward to delete (eg: john.doe)

Returns

The XML-RPC response will return True (boolean), or a fault describing the problem. Possible faults are described in section Error Codes Format.

Sample code

Forthcoming



domain_mailbox_list

Signature

array domain_mailbox_list(string session, string domain)

Description

Return the list of mailboxes associated with a domain

Parameters

  • string session: the session id (returned by login)
  • string domain: the domain to retrieve the mailboxes from

Returns

The XML-RPC response will return an array of strings, one for each mailbox, or a fault describing the problem. Possible faults are described in section Error Codes Format.

Sample code

Forthcoming



domain_mailbox_info

Signature

struct domain_mailbox_info (string session, string domain, string mailbox)

Description

Provides information about a mailbox

Parameters

  • string session: the session id (returned by login)
  • string domain: the domain to retrieve the mailbox's information from
  • string mailbox: the mailbox's login you want information from

Returns

The XML-RPC response will return an struct representing the mailbox's attibutes, or a fault describing the problem. Possible faults are described in section Error Codes Format.

The returned struct contains the following keys:

  • integer id: the internal id for this mailbox
  • boolean antispam: represents the antispam activation
  • boolean antivirus: represents the antivirus activation
  • string fallback_email: TODO
  • string login: the mailbox's login
  • integer quota: mailbox's quota in kb (overrided by the zone's quota)
  • string quota_usage: mailbox's quota usage, in octet
  • boolean responder: represents the current mailbox's responder status
  • string responder_text: represents the current mailbox's responder text

Sample code

Forthcoming



domain_mailbox_add

Signature

boolean domain_mailbox_add (string session, string domain, string mailbox, string password [,struct options])

Description

Creates a new mailbox

Parameters

  • string session: the session id (returned by login)
  • string domain: the domain to add the mailbox to
  • string mailbox: the new mailbox's login
  • string password: the mailbox's password, an ASCII string (3 characters at least)

Optional parameter

  • struct options: additional specifications for the mailbox, possible keys are:
    • integer quota: in Mb, the quota you want to limit the mailbox to
    • boolean antivirus: status of the antivirus for this mailbox
    • boolean antispam: status of the antispam for this mailbox
    • string fallback_email: TODO

Returns

The XML-RPC response will return True (boolean), or a fault describing the problem. Possible faults are described in section Error Codes Format.

Sample code

Forthcoming



domain_mailbox_update

Signature

boolean domain_mailbox_update (string session, string domain, string mailbox, struct options)

Description

Updates an existing mailbox

Parameters

  • string session: the session id (returned by login)
  • string domain: the domain of the mailbox to update
  • string mailbox: the mailbox to update
  • struct options: new specifications for the mailbox (all optional), possible keys are:
    • string password: a new password for this mailbox
    • integer quota: in Mb, the quota you want to limit the mailbox to
    • boolean antivirus: status of the antivirus for this mailbox
    • boolean antispam: status of the antispam for this mailbox
    • string fallback_email: TODO

Returns

The XML-RPC response will return True (boolean) if the mailbox was changed, False if it wasn't, or a fault describing the problem. Possible faults are described in section Error Codes Format.

Sample code

Forthcoming



domain_mailbox_delete

Signature

boolean domain_mailbox_delete (string session, string domain, string mailbox)

Description

Deletes a mailbox

Parameters

  • string session: the session id (returned by login)
  • string domain: the domain to delete the mailbox from
  • string mailbox: the mailbox to delete

Returns

The XML-RPC response will return True (boolean) if the mailbox deleted, or a fault describing the problem. Possible faults are described in section Error Codes Format.

Sample code

Forthcoming



domain_mailbox_alias_list

Signature

array domain_mailbox_alias_list (string session, string domain, string mailbox)

Description

List the aliases of a mailbox

Parameters

  • string session: the session id (returned by login)
  • string domain: the concerned domain to
  • string mailbox: the mailbox to retrieve the alias list from

Returns

The XML-RPC response will return an array of strings, one for each alias, or a fault describing the problem. Possible faults are described in section Error Codes Format.

Sample code

Forthcoming



domain_mailbox_alias_set

Signature

boolean domain_mailbox_alias_set (string session, string domain, string mailbox, array aliases)

Description

Affect aliases to a mailbox

Parameters

  • string session: the session id (returned by login)
  • string domain: the concerned domain to
  • string mailbox: the mailbox to update
  • array aliases: list aliases to set to the mailbox (ex: "doe.john")

Returns

The XML-RPC response will return True (boolean), or a fault describing the problem. Possible faults are described in section Error Codes Format.

Sample code

Forthcoming



domain_mailbox_purge

Signature

integer domain_mailbox_alias_set (string session, string domain, string mailbox)

Description

Delete all messages from a mailbox

Parameters

  • string session: the session id (returned by login)
  • string domain: the concerned domain to
  • string mailbox: the mailbox to purge

Returns

The XML-RPC response will return True (boolean), or a fault describing the problem. Possible faults are described in section Error Codes Format.

Sample code

Forthcoming

The XML-RPC response will contain this operation attributed ID (int) or a fault describing the problem. Possible faults are described in section Error Codes Format.

Questions

Flux RSS des questions correspondant à ce filtre (Aide)

Dernière modification: le 05/04/2011 à 13:37 par Nicolas L. (Gandi)