summaryrefslogtreecommitdiffstats
path: root/src/usr/local/www/system_advanced_notifications.php
diff options
context:
space:
mode:
authorRenato Botelho <renato@netgate.com>2016-08-11 14:38:30 -0300
committerRenato Botelho <renato@netgate.com>2016-08-11 14:38:30 -0300
commitc8c46e5a8e9551db0172b79aae1fee4553b3bf7d (patch)
tree47ef216815b2f3d8d30ec67ae96316f6a24568c8 /src/usr/local/www/system_advanced_notifications.php
parent626ff13a0eb92f539f7860314235ba8d0cf70ad2 (diff)
downloadpfsense-c8c46e5a8e9551db0172b79aae1fee4553b3bf7d.zip
pfsense-c8c46e5a8e9551db0172b79aae1fee4553b3bf7d.tar.gz
Ticket #3734:
- Added timeout parameter for SMTP configuration - Removed STARTTLS option, it's enabled automatically by pear-Mail when server supports it
Diffstat (limited to 'src/usr/local/www/system_advanced_notifications.php')
-rw-r--r--src/usr/local/www/system_advanced_notifications.php25
1 files changed, 10 insertions, 15 deletions
diff --git a/src/usr/local/www/system_advanced_notifications.php b/src/usr/local/www/system_advanced_notifications.php
index 36436b2..4b3a1a5 100644
--- a/src/usr/local/www/system_advanced_notifications.php
+++ b/src/usr/local/www/system_advanced_notifications.php
@@ -62,8 +62,8 @@ if ($config['notifications']['smtp']['port']) {
if (isset($config['notifications']['smtp']['ssl'])) {
$pconfig['smtpssl'] = true;
}
-if (isset($config['notifications']['smtp']['tls'])) {
- $pconfig['smtptls'] = true;
+if (!empty($config['notifications']['smtp']['timeout'])) {
+ $pconfig['smtptimeout'] = $config['notifications']['smtp']['timeout'];
}
if ($config['notifications']['smtp']['notifyemailaddress']) {
$pconfig['smtpnotifyemailaddress'] = $config['notifications']['smtp']['notifyemailaddress'];
@@ -118,12 +118,7 @@ if ($_POST) {
unset($config['notifications']['smtp']['ssl']);
}
- if (isset($_POST['smtptls'])) {
- $config['notifications']['smtp']['tls'] = true;
- } else {
- unset($config['notifications']['smtp']['tls']);
- }
-
+ $config['notifications']['smtp']['timeout'] = $_POST['smtptimeout'];
$config['notifications']['smtp']['notifyemailaddress'] = $_POST['smtpnotifyemailaddress'];
$config['notifications']['smtp']['username'] = $_POST['smtpusername'];
@@ -277,6 +272,13 @@ $section->addInput(new Form_Input(
))->setHelp('This is the port of the SMTP E-Mail server, typically 25, 587 '.
'(submission) or 465 (smtps).');
+$section->addInput(new Form_Input(
+ 'smtptimeout',
+ 'Connection timeout to E-Mail server',
+ 'number',
+ $pconfig['smtptimeout']
+))->setHelp('This is how many seconds it will wait for the SMTP server to connect. Default is 20s.');
+
$group = new Form_Group('Secure SMTP Connection');
$group->add(new Form_Checkbox(
'smtpssl',
@@ -285,13 +287,6 @@ $group->add(new Form_Checkbox(
isset($pconfig['smtpssl'])
));
-$group->add(new Form_Checkbox(
- 'smtptls',
- 'Secure STARTTLS',
- 'Enable STARTTLS',
- isset($pconfig['smtptls'])
-));
-
$section->add($group);
$section->addInput(new Form_Input(
OpenPOWER on IntegriCloud