diff options
author | Warren Baker <warren@decoy.co.za> | 2013-09-16 15:13:29 +0200 |
---|---|---|
committer | Warren Baker <warren@decoy.co.za> | 2013-10-17 10:43:40 +0200 |
commit | dd33fd4e8b3fb66f49ae8337823264ab0d13504c (patch) | |
tree | e5a7f0b8a85ae22717f5e8ac8165f27737e984f7 /usr | |
parent | 78b0e51e9a135804bfea307ea30c25fe16473da1 (diff) | |
download | pfsense-dd33fd4e8b3fb66f49ae8337823264ab0d13504c.zip pfsense-dd33fd4e8b3fb66f49ae8337823264ab0d13504c.tar.gz |
Split SSL/TLS into separate checkboxes so that plaintext connections can be made secured by using STARTTLS. Support for SMTPS connections should probably be done away with in future. Fixes #3180
Diffstat (limited to 'usr')
-rw-r--r-- | usr/local/www/system_advanced_notifications.php | 30 |
1 files changed, 27 insertions, 3 deletions
diff --git a/usr/local/www/system_advanced_notifications.php b/usr/local/www/system_advanced_notifications.php index 48de7fd..3b6d311 100644 --- a/usr/local/www/system_advanced_notifications.php +++ b/usr/local/www/system_advanced_notifications.php @@ -66,6 +66,8 @@ if($config['notifications']['smtp']['port']) $pconfig['smtpport'] = $config['notifications']['smtp']['port']; if($config['notifications']['smtp']['ssl']) $pconfig['smtpssl'] = $config['notifications']['smtp']['ssl']; +if($config['notifications']['smtp']['tls']) + $pconfig['smtptls'] = $config['notifications']['smtp']['tls']; if($config['notifications']['smtp']['notifyemailaddress']) $pconfig['smtpnotifyemailaddress'] = $config['notifications']['smtp']['notifyemailaddress']; if($config['notifications']['smtp']['username']) @@ -113,6 +115,7 @@ if ($_POST) { $config['notifications']['smtp']['ipaddress'] = $_POST['smtpipaddress']; $config['notifications']['smtp']['port'] = $_POST['smtpport']; $config['notifications']['smtp']['ssl'] = isset($_POST['smtpssl']) ? 'checked' : 'unchecked'; + $config['notifications']['smtp']['tls'] = isset($_POST['smtptls']) ? (isset($_POST['smtpssl']) ? 'unchecked' : 'checked') : 'unchecked'; $config['notifications']['smtp']['notifyemailaddress'] = $_POST['smtpnotifyemailaddress']; $config['notifications']['smtp']['username'] = $_POST['smtpusername']; $config['notifications']['smtp']['password'] = $_POST['smtppassword']; @@ -258,9 +261,15 @@ include("head.inc"); <tr> <td width="22%" valign="top" class="vncell"><?=gettext("SMTP Port of E-Mail server"); ?></td> <td width="78%" class="vtable"> - <input name='smtpport' value='<?php echo $pconfig['smtpport']; ?>' /> - <input type='checkbox' name='smtpssl' <?php echo $pconfig['smtpssl']; ?> />Enable SSL/TLS Authentication<br/> - <?=gettext("This is the port of the SMTP E-Mail server, typically 25, 587 (submission) or 465 (smtps, tick ssl/tls checkbox)"); ?> + <input name='smtpport' value='<?php echo $pconfig['smtpport']; ?>' /><br/> + <?=gettext("This is the port of the SMTP E-Mail server, typically 25, 587 (submission) or 465 (smtps)"); ?> + </td> + </tr> + <tr> + <td width="22%" valign="top" class="vncell"><?=gettext("Secure SMTP Connection"); ?></td> + <td width="78%" class="vtable"> + <input type='checkbox' id='smtpssl' name='smtpssl' <?php echo $pconfig['smtpssl']; ?> />Enable SMTP over SSL/TLS<br/> + <input type='checkbox' id='smtptls' name='smtptls' <?php echo $pconfig['smtptls']; ?> />Enable STARTTLS<br/> </td> </tr> <tr> @@ -333,6 +342,21 @@ include("head.inc"); </td> </tr> </table> +<script type="text/javascript"> + jQuery(document).ready(function() { + if (jQuery('#smtpssl').is(':checked')) { + jQuery('#smtptls').prop('disabled', true); + } else if (jQuery('#smtptls').is(':checked')) { + jQuery('#smtpssl').prop('disabled', true); + } + }); + jQuery('#smtpssl').change( function() { + jQuery('#smtptls').prop('disabled', this.checked); + }); + jQuery('#smtptls').change( function() { + jQuery('#smtpssl').prop('disabled', this.checked); + }); +</script> <?php include("fend.inc"); ?> </body> </html> |