fclose($fp);
}
-
function filters_LoadCache () {
global $data_dir, $SpamFilters_DNScache;
function start_filters() {
global $mailbox, $username, $key, $imapServerAddress, $imapPort, $imap,
- $imap_general, $filters, $imap_stream, $imapConnection,
- $UseSeparateImapConnection, $AllowSpamFilters;
+ $imap_general, $filters, $imap_stream, $imapConnection,
+ $UseSeparateImapConnection, $AllowSpamFilters;
# if ($mailbox == 'INBOX') {
// Detect if we have already connected to IMAP or not.
# }
}
-
function user_filters($imap_stream) {
global $data_dir, $username;
$filters = load_filters();
// Clean out the mailbox whether or not auto_expunge is on
// That way it looks like it was redirected properly
if (count($id)) {
- sqimap_mailbox_expunge($imap_stream, 'INBOX');
+ sqimap_mailbox_expunge($imap_stream, 'INBOX');
}
}
$where = trim($where . ' ' . $what[0]);
$what = addslashes(trim($what[1]));
}
+ $search_str .= ' ' . $where . ' {' . strlen($what) . "}\r\n"
+ . $what . "\r\n";
/* read data back from IMAP */
$read = sqimap_run_command($imap, $search_str, true, $response, $message, $uid_support);
}
-
// Does the loop through each enabled filter for the specified IP address.
// IP format: $a.$b.$c.$d
function filters_spam_check_site($a, $b, $c, $d, &$filters) {