diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2008-04-17 23:47:39 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2008-04-17 23:47:39 +0000 |
commit | 8304547b4b04bcfb245193f500a2a4f5b5f64626 (patch) | |
tree | 58430a539e6f41c2ac63c65d949274869cd38fb5 /packages/spamd.inc | |
parent | 7c8d7f3e55bae12d6d999a09c1bb7cc04d578436 (diff) | |
download | pfsense-packages-8304547b4b04bcfb245193f500a2a4f5b5f64626.tar.gz pfsense-packages-8304547b4b04bcfb245193f500a2a4f5b5f64626.tar.bz2 pfsense-packages-8304547b4b04bcfb245193f500a2a4f5b5f64626.zip |
* Add code to ensure alias exists before accepting
Diffstat (limited to 'packages/spamd.inc')
-rw-r--r-- | packages/spamd.inc | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/packages/spamd.inc b/packages/spamd.inc index 1b158414..0a17bb72 100644 --- a/packages/spamd.inc +++ b/packages/spamd.inc @@ -104,8 +104,6 @@ function sync_package_spamd() { $delaysecs = " -s " . $ss['delaysecs']; if($ss['window'] <> "") $window = " -w " . $ss['window']; -// if($ss['replysmtperror'] <> "") -// $replysmtperror = " -r " . $ss['replysmtperror']; if($ss['passtime'] <> "") $passtime = $ss['passtime']; if($ss['greyexp'] <> "") @@ -246,4 +244,24 @@ function spamd_install_cron($should_install) { } } +function spamd_validate_input($post, $input_errors) { + global $config, $g; + $nextmta = $post['nextmta']; + if(stristr($nextmta, "{")) { + /* item is an alias, make sure the name exists */ + $nextmta = str_replace("{", "", $nextmta); + $nextmta = str_replace("}", "", $nextmta); + $found = false; + if($config['aliases']['alias']) { + foreach($config['aliases']['alias'] as $alias) { + if($alias['name'] == $nextmta) { + $found = true; + } + } + } + if($found == false) + $intput_errors = "Could not locate alias named " . htmlentities($nextmta); + } +} + ?>
\ No newline at end of file |