UAPI Functions - SSL::disable_mail_sni

Description

This function disables SNI mail services on the specified domains.

Note:

After you change the SNI status, you must run UAPI's rebuild_mail_sni_config function.

Examples


 cPanel or Webmail Session URL

https://hostname.example.com:2083/cpsess##########/execute/SSL/disable_mail_sni?domains=example.com%7Cexample1.com%7Cexample2.com

 LiveAPI PHP Class

$cpanel new CPANEL(); // Connect to cPanel - only do this once.
  
// Disable SNI on example.com, example1.com, example2.com domains.
$disable_sni $cpanel->uapi(
    'SSL''disable_mail_sni',
    array(
        'domains'     => 'example.com|example1.com|example2.com',
        )
);

 LiveAPI Perl Module

my $cpliveapi = Cpanel::LiveAPI->new(); # Connect to cPanel - only do this once.
  
# Disable SNI on example.com, example1.com, example2.com domains.
my $disable_sni $cpliveapi->uapi(
    'SSL''disable_mail_sni',
    {
        'domains'     => 'example.com|example1.com|example2.com',
    }
);

 cPanel Template Toolkit

<!-- Disable SNI on example.com, example1.com, example2.com domains. -->
[% execute('SSL', 'disable_mail_sni', { 'domains' => 'example.com|example1.com|example2.com' }) %]

 Command Line

uapi --user=username SSL disable_mail_sni domains=example.com%7Cexample1.com%7Cexample2.com

 

Notes:

  • You must URI-encode values.
  • username represents your account-level username.

 Output (JSON)

{
  "messages": null,
  "errors": null,
  "status": 1,
  "metadata": {
     
  },
  "data": {
    "updated_domains": {
      "example.com": 1,
      "example1.com": 1
    },
    {
    "failed_domains": {
      "example2.com": 1
    }
  }
}

 

Note:

Use cPanel's API Shell interface (Home >> Advanced >> API Shell) to directly test cPanel API calls.

 

Parameters

 Parameter 

 Type 

Description

Possible values

Example

domains

string

Required

 The account's domain or domains. 

 A pipe-delimited list of the account's domains. 

 example.com|example1.com|example2.com 

 

Returns

Return

Type

Description

Possible values

Example

failed_domains

hash

A hash of the domains that failed to disable mail SNI.

This hash includes thedomain name return.

 

domain name

string

The reason the domain failed to disable SNI.

Note:

The domain name is the return name.

The function returns this value in the failed_domains hash.

A valid string.

 Sorry, example.com is not one of the domains on your account. 

 updated_domains 

hash

A hash of the domains with disabled mail SNI.

 This hash includes thedomain name return. 

 

domain name

 Boolean 

Whether the domain's SNI is disabled.

Note:

The domain name is the return name.

 The function returns this value in the updated_domains hash. 

  • 1 — Disabled.
  • 0 — Not disabled.

 

1

 

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

The cPanel Interface

For  cPanel  &  WHM  version  58 Overview The cPanel interface is...

User Preferences

For cPanel & WHM version 58 Overview This document outlines how to access your cPanel...

Manage External Authentications

For cPanel & WHM version 58 Overview Manage credentials Additional documentation...

What is cPanelID?

In This Article:  Overview ServicesHow to get a cPanelID cPanelID External...

Guide to cPanel Interface Customization - cPanel Style Development

Introduction You can develop custom styles that modify the appearance of the cPanel interface....