diff options
Diffstat (limited to 'mail/dspampd/files')
-rw-r--r-- | mail/dspampd/files/dspampd.rc | 40 | ||||
-rw-r--r-- | mail/dspampd/files/lpatch-dspampd_system_users.diff | 14 | ||||
-rw-r--r-- | mail/dspampd/files/patch-dspampd.conf | 134 | ||||
-rw-r--r-- | mail/dspampd/files/patch-dspampd.relaycontrol | 10 |
4 files changed, 198 insertions, 0 deletions
diff --git a/mail/dspampd/files/dspampd.rc b/mail/dspampd/files/dspampd.rc new file mode 100644 index 000000000000..a8306e362941 --- /dev/null +++ b/mail/dspampd/files/dspampd.rc @@ -0,0 +1,40 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# PROVIDE: dspampd +# REQUIRE: LOGIN %%CLAMAV%% %%DSPAM%% +# BEFORE: mail +# KEYWORD: FreeBSD shutdown + +# +# Add the following lines to /etc/rc.conf[.local] to enable dspampd: +# +#dspampd_enable="YES" +# + +. /etc/rc.subr + +name=dspampd +rcvar=`set_rcvar` + +command=%%PREFIX%%/sbin/dspampd > /dev/null 2>&1 +pidfile=/var/run/dspampd.pid +required_dirs=%%ARCHIVE_DIR%% +required_files=%%CONF_DIR%%/dspampd.conf + +stop_postcmd=stop_postcmd + +stop_postcmd() +{ + rm -f $pidfile +} + +# set defaults + +dspampd_enable=${dspampd_enable:-"NO"} +dspampd_flags=${dspampd_flags:-"--daemon"} + +load_rc_config $name +run_rc_command "$1" diff --git a/mail/dspampd/files/lpatch-dspampd_system_users.diff b/mail/dspampd/files/lpatch-dspampd_system_users.diff new file mode 100644 index 000000000000..297c3b227e8c --- /dev/null +++ b/mail/dspampd/files/lpatch-dspampd_system_users.diff @@ -0,0 +1,14 @@ +--- dspampd.dist Sun Jan 2 00:05:34 2005 ++++ dspampd Sun Jan 2 00:40:10 2005 +@@ -2017,6 +2017,11 @@ + $dspam{'dspam-user'} = ${applytoList}[0]; + ## Remove angled arrows on addresses like: <caspian@dotconf.net> + $dspam{'dspam-user'} =~ s/^<|>$//go; ++ ## FreeBSD-local patch if port built with WITHOUT_DSPAM_VIRT_USERS= on ++ ## This works if you relay mail for system users ONLY ++ $dspam{'dspam-user'} =~ s/@.*$//go; ++ ## FreeBSD-local patch WITHOUT_DSPAM_VIRT_USERS= on ++ ## end + $dspam{'dspam-user'} =~ tr/A-Z/a-z/; # convert to lower case + } + else { diff --git a/mail/dspampd/files/patch-dspampd.conf b/mail/dspampd/files/patch-dspampd.conf new file mode 100644 index 000000000000..d3801f817e25 --- /dev/null +++ b/mail/dspampd/files/patch-dspampd.conf @@ -0,0 +1,134 @@ +--- dspampd.conf.dist Sat Jan 1 16:33:38 2005 ++++ dspampd.conf Sat Jan 1 16:37:41 2005 +@@ -43,7 +43,7 @@ + ## Directory to store quarantined messages in. (/var/spool/dspam-archive) + ## This needs to be defined even if you don't archive anything, + ## it is used for temporary file storage. +- archive-dir => /var/spool/dspam-archive ++ archive-dir => %%ARCHIVE_DIR%% + + ## Comma separated list of modules to pass email through. + ## Modules will be run in the order listed. +@@ -52,16 +52,16 @@ + + ## Path to a file with entries that control what messages can be + ## relayed through us. +- ## Default: /etc/dspampd.relaycontrol +- //relaycontrolfile => /etc/dspampd.relaycontrol ++ ## Default: /usr/local/etc/dspampd/dspampd.relaycontrol ++ relaycontrolfile => %%CONF_DIR%%/dspampd.relaycontrol + + ## Path to a file with entries that control what recipient domains + ## and/or recipient addresses the checks are applied to. No entry + ## at all causes all messages to be checked, otherwise only if at + ## least one of the recipients is configured, the messae is + ## checked (with the settings of the first matching recipient). +- ## Default: /etc/dspampd.applyto +- //applytocontrolfile => /etc/dspampd.applyto ++ ## Default: /usr/local/etc/dspampd/dspampd.applyto ++ applytocontrolfile => %%CONF_DIR%%/dspampd.applyto + + + +@@ -92,17 +92,19 @@ + listenHost => 127.0.0.1 + + ## Port to accept smtp connections on. ex. 25 or 10025 +- listenPort => 10025 ++ listenPort => 20024 + + ## Fixme, this needs way more options ;) + ## Address to proxy mail to. ex: 127.0.0.1 or mail.isp.net + relayHost => 127.0.0.1 + + ## Port to on relayHost to proxy mail to. ex. 25 or 10125 +- relayPort => 10125 ++ relayPort => 20025 + + ## maximum number of concurrent connections allowed +- concurrentConnections => 128 ++ # this is just a safe-belt, you should enforce this from your MTA ++ # and play with it until you get optimum performance for your site ++ concurrentConnections => 10 + + ## timeouts for any/all connections (360 seconds) + timeout => 360 +@@ -113,7 +115,7 @@ + [module:dspam] + + ## Full path to dspam binary (/usr/bin/dspam) +- dspam-command => /usr/bin/dspam ++ dspam-command => /usr/local/bin/dspam + + ## DSPAM training mode [toe|tum|teft] + training-mode => tum +@@ -125,7 +127,7 @@ + // dspam-user => spamfilter + + ## Additional command line arguments for dspam +- additional-arguments => --feature=chained,noise ++ additional-arguments => --feature=ch,no,wh,tb=4 + + ## Write DSPAM headers into email header + ## 1 writes DSPAM headers in email, 0 leaves email untouched. +@@ -134,17 +136,17 @@ + ## Maximum size (in KB) of mail to scan. Use 0 to scan all mail. + ## Messages larger than this are considered "unscanned" mail in the + ## next few options. +- max-size => 0 ++ max-size => 250 + + ## Deliver specified message types. (ham) + ## Note: "unscanned" is considered a subset of "ham" + ## Can be one of: all, ham, spam, unscanned, none +- deliver => ham ++ deliver => all + + ## archive a copy of specified message types. (spam) + ## Note: "unscanned" is considered a subset of "ham" + ## Can be one of: all, ham, spam, unscanned, none +- archive => spam ++ archive => none + + ## The following options are for advanced users only. By default + ## if a message is NOT delivered it is bounced. +@@ -193,7 +195,7 @@ + ## Full path to clamav's configuration file + ## This is used for determining how to connect to the clamd daemon. + ## Not yet implemented, use the following parameters instead. +- config-file => /etc/clamav.conf ++ config-file => /usr/local/etc/clamav.conf + + ## This is the socket type to use for connecting to clamd. + ## Possible values: TCP UNIX +@@ -214,7 +216,7 @@ + ## When using a socktype of UNIX, this is the full path of the + ## socket where clamd should be contacted. +- ## Default: /tmp/clamd +- peersocket => /tmp/clamd ++ ## Default: /var/run/clamav/clamd ++ peersocket => /var/run/clamav/clamd + + ## Write ClamAV headers into email header. + ## Example header entries: +@@ -230,11 +232,11 @@ + + ## deliver specified message types. (clean) + ## devliver => <all | clean | infected | unscanned | none> +- deliver => clean ++ deliver => all + + ## archive a copy of specified message types. (infected) + ## archive => <all | clean | infected | unscanned | none> +- archive => infected ++ archive => none + + ## The following options are for advanced users only. By default + ## if a message is NOT delivered it is bounced. +@@ -272,5 +274,5 @@ + + // clean-custom-response => 220 Message is clean + // unscanned-custom-response => 220 Large message was not scanned by clamav +- infected-custom-response => 220 Virus infected message will be quarantined ++ // infected-custom-response => 220 Virus infected message will be quarantined + diff --git a/mail/dspampd/files/patch-dspampd.relaycontrol b/mail/dspampd/files/patch-dspampd.relaycontrol new file mode 100644 index 000000000000..73bf94c99079 --- /dev/null +++ b/mail/dspampd/files/patch-dspampd.relaycontrol @@ -0,0 +1,10 @@ +--- dspampd.relaycontrol.dist Sun Jan 2 02:12:40 2005 ++++ dspampd.relaycontrol Sat Jan 1 17:34:25 2005 +@@ -39,6 +39,7 @@ + ## relayed. Subdomains are included. + ## The only supported key type at the moment is 'allow'. + //allow => my.domain ++ allow => 127.0.0.1 + + [relay OK to Address] + |