From: <jgs...@us...> - 2004-02-24 05:58:23
|
Update of /cvsroot/serverfilters In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24509 Modified Files: backend.php config.php functions.php options.php recipie_functions.php Log Message: Fixed "To or Cc" option that never worked. Miscellaneous bug fixes. Index: config.php =================================================================== RCS file: /cvsroot/serverfilters/config.php,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** config.php 22 Feb 2004 21:20:16 -0000 1.10 --- config.php 24 Feb 2004 05:44:24 -0000 1.11 *************** *** 7,14 **** ! global $ALWAYS_CREATE, $FILTERDIR, $FILTER_APP_PATH, $DEFAULT_DELIVERY, $ALLOW_UNSUBSCRIBED, $SPAMFILTER, $SPAMHEADER, $SPAMFILTERMAXKB, $SPAMVALUE, $UNSUREVALUE, $VIRTUAL_DOMAINS, $LOCAL_MAILDIR, ! $USE_MAILDIRS, $SEPERATOR, $CREATE_DOT_QMAIL, $DOT_QMAIL_DIR; /** --- 7,14 ---- ! global $ALWAYS_CREATE, $FILTER_APP_PATH, $DEFAULT_DELIVERY, $ALLOW_UNSUBSCRIBED, $SPAMFILTER, $SPAMHEADER, $SPAMFILTERMAXKB, $SPAMVALUE, $UNSUREVALUE, $VIRTUAL_DOMAINS, $LOCAL_MAILDIR, ! $USE_MAILDIRS, $SEPERATOR; /** *************** *** 32,36 **** */ //$FILTERDIR = '/var/lib/squirrelmail/home/[DOMAIN]/[USERNAME]'; ! $FILTERDIR = '/home/email/[DOMUSER]/users/[USERNAME]'; /* --- 32,38 ---- */ //$FILTERDIR = '/var/lib/squirrelmail/home/[DOMAIN]/[USERNAME]'; ! //$FILTERDIR = '/home/email/[DOMUSER]/users/[USERNAME]'; ! //$FILTER_FILE_PATH = '/home/email/[DOMUSER]/users/[USERNAME]/.mailfilter'; ! $FILTER_FILE_PATH = '/home/email/[DOMUSER]/users/[USERNAME]/.procmailrc'; /* *************** *** 41,46 **** * 'maildrop' */ ! //$FILTER_APP_PATH = '/usr/bin/procmail'; ! $FILTER_APP_PATH = '/usr/bin/maildrop'; /** --- 43,48 ---- * 'maildrop' */ ! $FILTER_APP_PATH = '/usr/bin/procmail'; ! //$FILTER_APP_PATH = '/usr/bin/maildrop'; /** *************** *** 117,125 **** // option will be ignored if virtual domains are enabled. If you really // want this capability try adding a "| forward" to the default delivery ! $CREATE_DOT_QMAIL = true; ! $DOT_QMAIL_DIR = "/home/email/[DOMUSER]/"; ! ! $CREATE_DOT_FORWARD = false; ! $DOT_FORWARD_DIR = "/home/email/[DOMUSER]/"; ?> --- 119,124 ---- // option will be ignored if virtual domains are enabled. If you really // want this capability try adding a "| forward" to the default delivery ! $FORWARD_FILE_TYPE = "qmail"; ! $FORWARD_FILE_PATH = "/home/email/[DOMUSER]/.qmail-[USERNAME]"; ?> Index: functions.php =================================================================== RCS file: /cvsroot/serverfilters/functions.php,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** functions.php 24 Feb 2004 03:29:40 -0000 1.13 --- functions.php 24 Feb 2004 05:44:24 -0000 1.14 *************** *** 50,64 **** function write_forward() { ! global $username, $FORWARD_FILE_PATH, $FORWARD_FILE_TYPE, $FILTER_APP_PATH; $tmpfile = "/tmp/forwardfile-$username"; $fd = fopen($tmpfile,"w"); ! $filterpath = vd_replace($FORWARD_FILE_PATH); $contents_array = array( ! "qmail" => "|preline $FILTER_APP_PATH $filterfile\n", ! "forward" => "|$FILTER_APP_PATH $filterfile\n" ); $contents = $contents_array[$FORWARD_FILE_TYPE]; fwrite($fd, $contents); fclose($fd); --- 50,65 ---- function write_forward() { ! global $username, $FILTER_FILE_PATH, $FORWARD_FILE_TYPE, $FILTER_APP_PATH; $tmpfile = "/tmp/forwardfile-$username"; $fd = fopen($tmpfile,"w"); ! $filterpath = vd_replace($FILTER_FILE_PATH); $contents_array = array( ! "qmail" => "|preline $FILTER_APP_PATH $filterpath\n", ! "forward" => "|$FILTER_APP_PATH $filterpath\n" ); $contents = $contents_array[$FORWARD_FILE_TYPE]; + echo "Forward file: " . $contents; fwrite($fd, $contents); fclose($fd); Index: options.php =================================================================== RCS file: /cvsroot/serverfilters/options.php,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** options.php 24 Feb 2004 03:29:40 -0000 1.12 --- options.php 24 Feb 2004 05:44:24 -0000 1.13 *************** *** 116,123 **** else $new['toAddress'] = 'off'; ! if ($_POST['add_string'] != null) ! $new['add_string'] = $_POST['add_string']; ! if (get_magic_quotes_gpc() == 1) ! $new['add_string'] = stripslashes($new['add_string']); else $new['add_string'] = ""; array_push($recipies, $new); --- 116,124 ---- else $new['toAddress'] = 'off'; ! if ($_POST['add_string'] != null) { ! $new['add_string'] = $_POST['add_string']; ! if (get_magic_quotes_gpc() == 1) ! $new['add_string'] = stripslashes($new['add_string']); ! } else $new['add_string'] = ""; array_push($recipies, $new); *************** *** 175,179 **** } ! unlink($file); $value = count($recipies); displayPageHeader($color, 'None'); --- 176,181 ---- } ! unlink($file); ! unlink("/tmp/filterfile.$username.tmp"); $value = count($recipies); displayPageHeader($color, 'None'); Index: recipie_functions.php =================================================================== RCS file: /cvsroot/serverfilters/recipie_functions.php,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** recipie_functions.php 24 Feb 2004 03:30:09 -0000 1.7 --- recipie_functions.php 24 Feb 2004 05:44:24 -0000 1.8 *************** *** 115,119 **** function write_recipies($oldfile, $newfile) { global $username, $recipies, $SEPERATOR, $SPAMFILTER, $SPAMHEADER, $UNSUREVALUE, $SPAMVALUE, ! $VIRTUAL_DOMAINS, $LOCAL_MAILDIR, $FILE_BACKEND; if (isset($VIRTUAL_DOMAINS) && $VIRTUAL_DOMAINS==1) --- 115,119 ---- function write_recipies($oldfile, $newfile) { global $username, $recipies, $SEPERATOR, $SPAMFILTER, $SPAMHEADER, $UNSUREVALUE, $SPAMVALUE, ! $VIRTUAL_DOMAINS, $LOCAL_MAILDIR, $FILE_BACKEND, $FORWARD_FILE_PATH; if (isset($VIRTUAL_DOMAINS) && $VIRTUAL_DOMAINS==1) |