aboutsummaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2006-01-28 23:54:29 +0000
committerScott Ullrich <sullrich@pfsense.org>2006-01-28 23:54:29 +0000
commit32cef3f6dde37080e8230657b8939f7ce0cfdcac (patch)
treead9d236c912256cd4541470633db212fef753f90 /packages
parentec5738fa79e4b87d4474e2b8e719740226abfb42 (diff)
downloadpfsense-packages-32cef3f6dde37080e8230657b8939f7ce0cfdcac.tar.gz
pfsense-packages-32cef3f6dde37080e8230657b8939f7ce0cfdcac.tar.bz2
pfsense-packages-32cef3f6dde37080e8230657b8939f7ce0cfdcac.zip
Add window support
Diffstat (limited to 'packages')
-rw-r--r--packages/spamd.inc19
-rw-r--r--packages/spamd_settings.xml19
2 files changed, 22 insertions, 16 deletions
diff --git a/packages/spamd.inc b/packages/spamd.inc
index 7d46c6fa..897aaeda 100644
--- a/packages/spamd.inc
+++ b/packages/spamd.inc
@@ -44,8 +44,6 @@ function sync_package_spamd() {
$maxblack = "";
$stuttersecs = "";
$delaysecs = "";
- $pkg = get_pkg_id("spamd");
-
if($config['installedpackages']['spamdsettings']['config']) {
foreach($config['installedpackages']['spamdsettings']['config'] as $ss) {
if($ss['nextmta'] <> "")
@@ -64,20 +62,20 @@ function sync_package_spamd() {
$stuttersecs = " -S " . $ss['stuttersecs'];
if($ss['delaysecs'] <> "")
$delaysecs = " -s " . $ss['delaysecs'];
+ if($ss['window'] <> "")
+ $window = " -w " . $ss['window'];
}
}
$start = "/usr/local/sbin/spamd-setup &\n" .
"/sbin/pflogd &\n" .
"/sbin/mount_fdescfs fdescfs /dev/fd\n" .
"/usr/local/libexec/spamlogd &\n" .
- "/usr/local/libexec/spamd {$passtime}{$identifier}{$greylisting}{$maxcon}{$maxblack} -b 127.0.0.1 &\n" .
- "/usr/local/libexec/spamlogd &\n" .
- "sleep 1\n";
+ "/usr/local/libexec/spamd {$passtime}{$identifier}{$greylisting}{$maxcon}{$maxblack}{$window} -b 127.0.0.1 &\n" .
+ "/usr/local/libexec/spamlogd\n";
$stop = "/usr/bin/killall spamd-setup\n" .
- "/usr/bin/killall spamd\n" .
- "/usr/bin/killall /sbin/pflogd\n" .
- "/usr/bin/killall mount_fdescfs\n" .
"/usr/bin/killall spamlogd\n" .
+ "/usr/bin/killall spamd\n" .
+ "/usr/bin/killall /sbin/pflogd\n" .
"sleep 2";
write_rcfile(array(
"file" => "spamd.sh",
@@ -87,13 +85,14 @@ function sync_package_spamd() {
);
conf_mount_ro();
config_unlock();
- restart_service("spamd");
+ stop_service("spamd");
+ sleep(3);
+ start_service("spamd");
}
function custom_php_install_command() {
global $config, $g;
system("touch /var/db/whitelist.txt");
-
sync_package_spamd();
}
diff --git a/packages/spamd_settings.xml b/packages/spamd_settings.xml
index 7fca88e5..b7c3a1de 100644
--- a/packages/spamd_settings.xml
+++ b/packages/spamd_settings.xml
@@ -44,27 +44,27 @@
<type>input</type>
</field>
<field>
- <fielddescr>MaxBlack</fielddescr>
+ <fielddescr>Maximum blacklisted connections</fielddescr>
<fieldname>maxblack</fieldname>
<description>The maximum number of concurrent blacklisted connections to allow in greylisting mode. This value may not be greater than maxcon (see below). The default is maxcon - 100.</description>
<type>input</type>
</field>
<field>
- <fielddescr>MaxCon</fielddescr>
+ <fielddescr>Max concurrent connections</fielddescr>
<fieldname>maxcon</fieldname>
<description>The maximum number of concurrent connections to allow. The default is 800.</description>
<type>input</type>
<value>800</value>
</field>
<field>
- <fielddescr>Greylisting</fielddescr>
+ <fielddescr>Grey listing</fielddescr>
<fieldname>greylisting</fieldname>
<description>Connections from addresses not blacklisted on the black lists tab will be considered for greylisting. Such connections will not be stuttered at (though see the stutter secs option) or delayed, and will receive the pleasantly innocuous temporary failure. After passtime if the host returns it will be added to the white list.</description>
<type>checkbox</type>
<value>yes</value>
</field>
<field>
- <fielddescr>passtime:greyexp:whiteexp</fielddescr>
+ <fielddescr>Passtime:GreyExp:WhiteExp</fielddescr>
<fieldname>greylistingparms</fieldname>
<description>Adjust the three time parameters for greylisting; see GREYLISTING. passtime defaults to 25 (minutes), greyexp to 4 (hours), and whiteexp to 864 (hours, approximately 36 days).</description>
<type>input</type>
@@ -72,20 +72,27 @@
<value>25:4:864</value>
</field>
<field>
- <fielddescr>StutterSecs</fielddescr>
+ <fielddescr>Stutter Secs</fielddescr>
<fieldname>stuttersecs</fieldname>
<description>Stutter at greylisted connections for the specified amount of seconds, after which the connection is not stuttered at. Defaults to 10.</description>
<type>input</type>
<value>10</value>
</field>
<field>
- <fielddescr>DelaySecs</fielddescr>
+ <fielddescr>Delay Secs</fielddescr>
<fieldname>delaysecs</fieldname>
<description>Delay each character sent to the client by the specified amount of seconds. Defaults to 1.</description>
<type>input</type>
<value>1</value>
</field>
<field>
+ <fielddescr>Window Size</fielddescr>
+ <fieldname>window</fieldname>
+ <description>Set the socket receive buffer to this many bytes, adjusting the window size.</description>
+ <type>input</type>
+ <value></value>
+ </field>
+ <field>
<fielddescr>NextMTA</fielddescr>
<fieldname>nextmta</fieldname>
<description>Automatically sends messages after being processed by SpamD to IP Address. Note, if you have postfix package installed enter 127.0.0.1 here.</description>