Update of /cvsroot/serverfilters
In directory sc8-pr-cvs1:/tmp/cvs-serv20508
Modified Files:
config.php backend.php
Log Message:
SPAMFILTERMAXKB setting -- limits size of messages passed through spam filters
Index: backend.php
===================================================================
RCS file: /cvsroot/serverfilters/backend.php,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** backend.php 9 Dec 2003 19:34:17 -0000 1.4
--- backend.php 9 Dec 2003 21:13:17 -0000 1.5
***************
*** 123,129 ****
function procmail_write_spam_filter($fd) {
! global $username, $SPAMFILTER;
$spamfiltercmd = vd_replace($SPAMFILTER);
! fputs($fd, "\n:0wf\n| ${spamfiltercmd}\n");
}
--- 123,136 ----
function procmail_write_spam_filter($fd) {
! global $username, $SPAMFILTER, $SPAMFILTERMAXKB;
!
$spamfiltercmd = vd_replace($SPAMFILTER);
! if (isset($SPAMFILTERMAXKB) && $SPAMFILTERMAXKB > 0) {
! $bytes = $SPAMFILTERMAXKB * 1024;
! $rules = "* < $bytes\n";
! } else {
! $rules = "";
! }
! fputs($fd, "\n:0wf$rules\n| ${spamfiltercmd}\n");
}
***************
*** 181,187 ****
function maildrop_write_spam_filter($fd) {
! global $username, $SPAMFILTER;
! fputs($fd, "\nxfilter \"${SPAMFILTER} -u ${username} -f\"\n");
}
--- 188,200 ----
function maildrop_write_spam_filter($fd) {
! global $username, $SPAMFILTER, $SPAMFILTERMAXKB;
! $spamfiltercmd = vd_replace($SPAMFILTER);
! $maildropcmd = "\nxfilter \"${spamfiltercmd}\"\n";
! if (isset($SPAMFILTERMAXKB) && $SPAMFILTERMAXKB > 0) {
! $bytes = $SPAMFILTERMAXKB * 1024;
! $maildropcmd = "\n".'if ($SIZE < '.$bytes.")\n{".$maildropcmd."}\n";
! }
! fputs($fd, $maildropcmd);
}
|