Child pages
  • UAPI Functions - SSL::rebuild_mail_sni_config

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Description


Excerpt

This function rebuilds the SNI configuration files.


Note
titleNote:

You must run this function after you change the SNI status through the UAPI's enable_mail_sni or disable_mail_sni functions.


Note
titleNote:

In cPanel & WHM version 60 and later, Mail SNI is always enabled.

  • Functions that enable Mail SNI succeed with a warning that Mail SNI is always enabled.
  • Functions that disable Mail SNI fail and make no changes.


Panel
bgColor#F2F2F2
borderStylenone

Examples 


Panel
bgColor#FFFFFF
borderStylenone


Expand
titlecPanel or Webmail Session URL


Code Block
languagetext
https://hostname.example.com:2083/cpsess##########/execute/SSL/rebuild_mail_sni_config?reload_dovecot=1

Include Page
LIB:_CallUAPIFromBrowserLink
LIB:_CallUAPIFromBrowserLink


Expand
titleLiveAPI PHP Class


Code Block
languagephp
linenumberstrue
$cpanel = new CPANEL(); // Connect to cPanel - only do this once.
 
// Rebuild mail SNI configuration files 
$rebuild_mail_sni_config = $cpanel->uapi(
    'SSL', 'rebuild_mail_sni_config',
    array(
        'reload_dovecot'     => '1',
        )
);

Include Page
LIB:_LiveAPIPHPLink
LIB:_LiveAPIPHPLink


Expand
titleLiveAPI Perl Module


Code Block
languageperl
linenumberstrue
my $cpliveapi = Cpanel::LiveAPI->new(); # Connect to cPanel - only do this once.
 
# Rebuild mail SNI configuration files 
my $rebuild_mail_sni_config = $cpliveapi->uapi(
    'SSL', 'rebuild_mail_sni_config',
    {
        'reload_dovecot'     => '1',
    }
);

Include Page
LIB:_LiveAPIPerlLink
LIB:_LiveAPIPerlLink


Expand
titlecPanel Template Toolkit


Code Block
languagexml
linenumberstrue
<!-- Rebuild mail SNI configuration files. -->
[% execute('SSL', 'rebuild_mail_sni_config', { 'reload_dovecot' => '1' }) %]

Include Page
LIB:_TTLink
LIB:_TTLink


Expand
titleCommand Line


Code Block
languagetext
uapi --user=username SSL rebuild_mail_sni_config reload_dovecot=1

Include Page
LIB:_UAPICLINote
LIB:_UAPICLINote


Expand
titleOutput (JSON)


Code Block
languagetext
linenumberstrue
{
  "messages": null,
  "errors": null,
  "status": 1,
  "metadata": {
    
  },
  "data": {
    "success": 1
  }
}


Include Page
LIB:_cPanelAPIShellNote
LIB:_cPanelAPIShellNote


Parameters

ParameterTypeDescriptionPossible valuesExample
reload_dovecotBoolean

Whether to reload the Dovecot® service after the system rebuilds the configuration files.

This parameter defaults to 1.

  • 1 — Reload Dovecot.
  • 0 — Do not reload Dovecot.
1

Returns

Return

TypeDescriptionPossible valuesExample
successBooleanWhether the system rebuilt the configuration files.
  • 1 — Configuration files rebuilt.
  • 0 — Configuration files not rebuilt.
1