X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=blobdiff_plain;f=plugins%2Ffilters%2Ffilters.php;h=34ffd31dd5b355784e5c04ef10200e4f74b0b271;hp=c4c66cef9dc1e450440aa124a755eb4a6cf388af;hb=595848f9dbf9fda650ca1809f94702043dbc0f79;hpb=fb577a4d2eda1577ff04cfdd6225090d794aece7 diff --git a/plugins/filters/filters.php b/plugins/filters/filters.php index c4c66cef..34ffd31d 100644 --- a/plugins/filters/filters.php +++ b/plugins/filters/filters.php @@ -1,10 +1,6 @@ $value) { @@ -399,6 +430,10 @@ function filters_spam_check_site($a, $b, $c, $d, &$filters) { return 0; } +/** + * FIXME: Undocumented function + * @access private + */ function load_filters() { global $data_dir, $username; @@ -412,6 +447,10 @@ function load_filters() { return $filters; } +/** + * FIXME: Undocumented function + * @access private + */ function load_spam_filters() { global $data_dir, $username, $SpamFilters_ShowCommercial; @@ -430,7 +469,7 @@ function load_spam_filters() { $filters['MAPS RSS']['dns'] = 'relays.mail-abuse.org'; $filters['MAPS RSS']['result'] = '127.0.0.2'; $filters['MAPS RSS']['comment'] = - _("COMMERCIAL - Servers that are configured (or misconfigured) to allow spam to be relayed through their system will be banned with this. Another good one to use."); + _("COMMERCIAL - Servers that are configured (or misconfigured) to allow spam to be relayed through their system will be banned with this. Another good one to use."); $filters['MAPS DUL']['prefname'] = 'filters_spam_maps_dul'; $filters['MAPS DUL']['name'] = 'MAPS Dial-Up List'; @@ -438,7 +477,7 @@ function load_spam_filters() { $filters['MAPS DUL']['dns'] = 'dialups.mail-abuse.org'; $filters['MAPS DUL']['result'] = '127.0.0.3'; $filters['MAPS DUL']['comment'] = - _("COMMERCIAL - Dial-up users are often filtered out since they should use their ISP's mail servers to send mail. Spammers typically get a dial-up account and send spam directly from there."); + _("COMMERCIAL - Dial-up users are often filtered out since they should use their ISP's mail servers to send mail. Spammers typically get a dial-up account and send spam directly from there."); $filters['MAPS RBLplus-RBL']['prefname'] = 'filters_spam_maps_rblplus_rbl'; $filters['MAPS RBLplus-RBL']['name'] = 'MAPS RBL+ RBL List'; @@ -569,29 +608,29 @@ function load_spam_filters() { $filters['visi.com']['comment'] = _("FREE - visi.com - Relay Stop List. Very conservative OpenRelay List."); - $filters['2mbit.com Open Relays']['prefname'] = 'filters_spam_2mb_or'; - $filters['2mbit.com Open Relays']['name'] = '2mbit.com Open Relays List'; - $filters['2mbit.com Open Relays']['link'] = 'http://www.2mbit.com/sbl.php'; - $filters['2mbit.com Open Relays']['dns'] = 'blackholes.2mbit.com'; - $filters['2mbit.com Open Relays']['result'] = '127.0.0.2'; - $filters['2mbit.com Open Relays']['comment'] = - _("FREE - 2mbit.com Open Relays - Another list of Open Relays."); - - $filters['2mbit.com SPAM Source']['prefname'] = 'filters_spam_2mb_ss'; - $filters['2mbit.com SPAM Source']['name'] = '2mbit.com SPAM Source List'; - $filters['2mbit.com SPAM Source']['link'] = 'http://www.2mbit.com/sbl.php'; - $filters['2mbit.com SPAM Source']['dns'] = 'blackholes.2mbit.com'; - $filters['2mbit.com SPAM Source']['result'] = '127.0.0.4'; - $filters['2mbit.com SPAM Source']['comment'] = - _("FREE - 2mbit.com SPAM Source - List of Direct SPAM Sources."); - - $filters['2mbit.com SPAM ISPs']['prefname'] = 'filters_spam_2mb_isp'; - $filters['2mbit.com SPAM ISPs']['name'] = '2mbit.com SPAM-friendly ISP List'; - $filters['2mbit.com SPAM ISPs']['link'] = 'http://www.2mbit.com/sbl.php'; - $filters['2mbit.com SPAM ISPs']['dns'] = 'blackholes.2mbit.com'; - $filters['2mbit.com SPAM ISPs']['result'] = '127.0.0.10'; - $filters['2mbit.com SPAM ISPs']['comment'] = - _("FREE - 2mbit.com SPAM ISPs - List of SPAM-friendly ISPs."); + $filters['ahbl.org Open Relays']['prefname'] = 'filters_spam_2mb_or'; + $filters['ahbl.org Open Relays']['name'] = 'ahbl.org Open Relays List'; + $filters['ahbl.org Open Relays']['link'] = 'http://www.ahbl.org/'; + $filters['ahbl.org Open Relays']['dns'] = 'dnsbl.ahbl.org'; + $filters['ahbl.org Open Relays']['result'] = '127.0.0.2'; + $filters['ahbl.org Open Relays']['comment'] = + _("FREE - ahbl.org Open Relays - Another list of Open Relays."); + + $filters['ahbl.org SPAM Source']['prefname'] = 'filters_spam_2mb_ss'; + $filters['ahbl.org SPAM Source']['name'] = 'ahbl.org SPAM Source List'; + $filters['ahbl.org SPAM Source']['link'] = 'http://www.ahbl.org/'; + $filters['ahbl.org SPAM Source']['dns'] = 'dnsbl.ahbl.org'; + $filters['ahbl.org SPAM Source']['result'] = '127.0.0.4'; + $filters['ahbl.org SPAM Source']['comment'] = + _("FREE - ahbl.org SPAM Source - List of Direct SPAM Sources."); + + $filters['ahbl.org SPAM ISPs']['prefname'] = 'filters_spam_2mb_isp'; + $filters['ahbl.org SPAM ISPs']['name'] = 'ahbl.org SPAM-friendly ISP List'; + $filters['ahbl.org SPAM ISPs']['link'] = 'http://www.ahbl.org/'; + $filters['ahbl.org SPAM ISPs']['dns'] = 'dnsbl.ahbl.org'; + $filters['ahbl.org SPAM ISPs']['result'] = '127.0.0.7'; + $filters['ahbl.org SPAM ISPs']['comment'] = + _("FREE - ahbl.org SPAM ISPs - List of SPAM-friendly ISPs."); $filters['Leadmon DUL']['prefname'] = 'filters_spam_lm_dul'; $filters['Leadmon DUL']['name'] = 'Leadmon.net DUL List'; @@ -689,6 +728,10 @@ function load_spam_filters() { return $filters; } +/** + * FIXME: Undocumented function + * @access private + */ function remove_filter ($id) { global $data_dir, $username; @@ -701,6 +744,10 @@ function remove_filter ($id) { removePref($data_dir, $username, 'filter' . $id); } +/** + * FIXME: Undocumented function + * @access private + */ function filter_swap($id1, $id2) { global $data_dir, $username; @@ -713,8 +760,11 @@ function filter_swap($id1, $id2) { } } -/* This update the filter rules when - renaming or deleting folders */ +/** + * This update the filter rules when renaming or deleting folders + * @param array $args + * @access private + */ function update_for_folder ($args) { $old_folder = $args[0]; $new_folder = $args[2]; @@ -741,15 +791,16 @@ function update_for_folder ($args) { } } } -/* + +/** * Function extracted from sqimap_get_small_header_list. * The unused FETCH arguments and HEADERS are disabled. + * @access private */ function filter_get_headers ($imap_stream, $query) { - global $uid_support; /* Get the small headers for each message in $msg_list */ - $read_list = sqimap_run_command_list ($imap_stream, $query, false, $response, $message, $uid_support); + $read_list = sqimap_run_command_list ($imap_stream, $query, false, $response, $message, TRUE); if (isset($response) && $response != 'OK') { return false; @@ -862,4 +913,16 @@ function filter_get_headers ($imap_stream, $query) { return $msgs; } +/** + * Display formated error message + * @param string $string text message + * @return string html formated text message + * @access private + */ +function do_error($string) { + global $color; + echo "

"; + echo $string; + echo "

\n"; +} ?>