summaryrefslogtreecommitdiffstats
path: root/usr/local/www/system_advanced_notifications.php
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfSense.org>2009-12-31 18:00:07 -0500
committerScott Ullrich <sullrich@pfSense.org>2009-12-31 18:00:15 -0500
commit72306d5a09f96b6ca7ddd4eea757036b5f2c7960 (patch)
tree73f1bcf36e1609c5da761d8abe94d53216c9c9f7 /usr/local/www/system_advanced_notifications.php
parenteb1f8f8ee46f7cdd247604b5c0bedf731333360d (diff)
downloadpfsense-72306d5a09f96b6ca7ddd4eea757036b5f2c7960.zip
pfsense-72306d5a09f96b6ca7ddd4eea757036b5f2c7960.tar.gz
Adding smtp auth support for notifications. Requested-by: pmi@bluegrass.net
Diffstat (limited to 'usr/local/www/system_advanced_notifications.php')
-rw-r--r--usr/local/www/system_advanced_notifications.php37
1 files changed, 35 insertions, 2 deletions
diff --git a/usr/local/www/system_advanced_notifications.php b/usr/local/www/system_advanced_notifications.php
index 5a53ab2..c9917ce 100644
--- a/usr/local/www/system_advanced_notifications.php
+++ b/usr/local/www/system_advanced_notifications.php
@@ -51,6 +51,12 @@ if($config['notifications']['smtp']['ipaddress'])
$pconfig['smtpipaddress'] = $config['notifications']['smtp']['ipaddress'];
if($config['notifications']['smtp']['notifyemailaddress'])
$pconfig['smtpnotifyemailaddress'] = $config['notifications']['smtp']['notifyemailaddress'];
+if($config['notifications']['smtp']['username'])
+ $pconfig['smtpusername'] = $config['notifications']['smtp']['username'];
+if($config['notifications']['smtp']['password'])
+ $pconfig['smtppassword'] = $config['notifications']['smtp']['password'];
+if($config['notifications']['smtp']['fromaddress'])
+ $pconfig['smtpfromaddress'] = $config['notifications']['smtp']['fromaddress'];
if ($_POST) {
@@ -79,12 +85,18 @@ if ($_POST) {
// SMTP
$config['notifications']['smtp']['ipaddress'] = $_POST['smtpipaddress'];
$config['notifications']['smtp']['notifyemailaddress'] = $_POST['smtpnotifyemailaddress'];
+ $config['notifications']['smtp']['username'] = $_POST['smtpusername'];
+ $config['notifications']['smtp']['password'] = $_POST['smtppassword'];
+ $config['notifications']['smtp']['fromaddress'] = $_POST['smtpfromaddress'];
write_config();
// Send test message via growl
- register_via_growl();
- notify_via_growl("This is a test message form pfSense. It is safe to ignore this message.");
+ if($config['notifications']['growl']['ipaddress'] &&
+ $config['notifications']['growl']['password'] = $_POST['password']) {
+ register_via_growl();
+ notify_via_growl("This is a test message form pfSense. It is safe to ignore this message.");
+ }
// Send test message via smtp
if(file_exists("/var/db/notices_lastmsg.txt"))
@@ -164,6 +176,13 @@ include("head.inc");
</td>
</tr>
<tr>
+ <td width="22%" valign="top" class="vncell">From e-mail address</td>
+ <td width="78%" class="vtable">
+ <input name='smtpfromaddress' type='input' value='<?php echo $pconfig['smtpfromaddress']; ?>'><br/>
+ This is the e-mail address that will appear in the from field.
+ </td>
+ </tr>
+ <tr>
<td width="22%" valign="top" class="vncell">Notification E-Mail address</td>
<td width="78%" class="vtable">
<input name='smtpnotifyemailaddress' type='input' value='<?php echo $pconfig['smtpnotifyemailaddress']; ?>'><br/>
@@ -171,6 +190,20 @@ include("head.inc");
</td>
</tr>
<tr>
+ <td width="22%" valign="top" class="vncell">Notification E-Mail auth username (optional)</td>
+ <td width="78%" class="vtable">
+ <input name='smtpusername' type='input' value='<?php echo $pconfig['smtpusername']; ?>'><br/>
+ Enter the e-mail address username for SMTP authentication.
+ </td>
+ </tr>
+ <tr>
+ <td width="22%" valign="top" class="vncell">Notification E-Mail auth password</td>
+ <td width="78%" class="vtable">
+ <input name='smtppassword' type='password' value='<?php echo $pconfig['smtppassword']; ?>'><br/>
+ Enter the e-mail address password for SMTP authentication.
+ </td>
+ </tr>
+ <tr>
<td valign="top" class="">
&nbsp;
</td>
OpenPOWER on IntegriCloud