Description


This function rebuilds the SNI configuration files.


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


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.


Examples 




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



$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',
        )
);



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',
    }
);



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



uapi --user=username SSL rebuild_mail_sni_config reload_dovecot=1



{
  "messages": null,
  "errors": null,
  "status": 1,
  "metadata": {
    
  },
  "data": {
    "success": 1
  }
}



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