squirrelmail-webmail  1.4.22
About: SquirrelMail is a standards-based webmail package with strong MIME support, address books, and folder manipulation (written in PHP4).
  Fossies Dox: squirrelmail-webmail-1.4.22.tar.gz  ("inofficial" and yet experimental doxygen-generated source code documentation)  

filters.php File Reference

Go to the source code of this file.

Namespaces

 plugins
 

Functions

 filters_SaveCache ()
 
 filters_LoadCache ()
 
 filters_bulkquery ($filters_spam_scan, $filters, $read)
 
 start_filters ()
 
 user_filters ($imap_stream)
 
 filter_search_and_delete ($imap, $where, $what, $where_to, $user_scan, $del_id)
 
 spam_filters ($imap_stream)
 
 filters_spam_check_site ($a, $b, $c, $d, &$filters)
 
 load_filters ()
 
 load_spam_filters ()
 
 remove_filter ($id)
 
 filter_swap ($id1, $id2)
 
 update_for_folder ($args)
 
 do_error ($string)
 

Function Documentation

◆ do_error()

do_error (   $string)

Display formated error message

Parameters
string$stringtext message
Returns
string html formated text message @access private

Definition at line 884 of file filters.php.

References $color.

◆ filter_search_and_delete()

filter_search_and_delete (   $imap,
  $where,
  $what,
  $where_to,
  $user_scan,
  $del_id 
)

Creates and runs the IMAP command to filter messages

Parameters
string$imapTODO: Document this parameter
string$whereWhich part of the message to search (TO, CC, SUBJECT, etc...)
string$whatString to search for
string$where_toFolder it will move to
string$user_scanWhether to search all or just unseen
string$del_idTODO: Document this parameter @access private

Definition at line 301 of file filters.php.

References $allow_charset_search, $id, $imap_server_type, $j, $languages, $message, $num, $r, $read, $squirrelmail_language, $uid_support, sqimap_mailbox_exists(), sqimap_msgs_list_move(), sqimap_run_command_list(), and sqimap_run_literal_command().

Referenced by user_filters().

◆ filter_swap()

filter_swap (   $id1,
  $id2 
)

Swaps two filters

Parameters
int$id1ID of first filter to swap
int$id2ID of second filter to swap @access private

Definition at line 834 of file filters.php.

References $data_dir, $username, getPref(), and setPref().

◆ filters_bulkquery()

filters_bulkquery (   $filters_spam_scan,
  $filters,
  $read 
)

Uses the BulkQuery executable to query all the RBLs at once

Parameters
array$filtersArray of SPAM Filters
array$IPsArray of IP Addresses
array$readTODO: Document this parameter @access private

Definition at line 88 of file filters.php.

References $attachment_dir, $filters, $read, $SpamFilters_BulkQuery, $SpamFilters_CacheTTL, $SpamFilters_DNScache, $SpamFilters_YourHop, and $username.

Referenced by spam_filters().

◆ filters_LoadCache()

filters_LoadCache ( )

Loads the DNS Cache from disk @access private

Definition at line 63 of file filters.php.

References $data, $data_dir, and $SpamFilters_DNScache.

Referenced by spam_filters().

◆ filters_SaveCache()

filters_SaveCache ( )

FIXME: Undocumented function @access private

Definition at line 32 of file filters.php.

References $data_dir, and $SpamFilters_DNScache.

Referenced by spam_filters().

◆ filters_spam_check_site()

filters_spam_check_site (   $a,
  $b,
  $c,
  $d,
$filters 
)

Does the loop through each enabled filter for the specified IP address. IP format: $a.$b.$c.$d

Parameters
int$aFirst subset of IP
int$bSecond subset of IP
int$cThird subset of IP
int$dForth subset of IP
array$filtersThe Spam Filters
Returns
boolean Whether the IP is Spam @access private

RFC allows . on end of hostname to force domain lookup to not use search domain from resolv.conf, i.e. to ensure search domain isn't used if no hostname is found

gethostbyname returns ip if resolved, or returns original host supplied to function if there is no resolution

Definition at line 505 of file filters.php.

References $filters, $SpamFilters_CacheTTL, and $SpamFilters_DNScache.

Referenced by spam_filters().

◆ load_filters()

load_filters ( )

Loads the filters from the user preferences

Returns
array All the user filters @access private

Definition at line 550 of file filters.php.

References $data_dir, $filters, $username, and getPref().

Referenced by start_filters(), update_for_folder(), and user_filters().

◆ load_spam_filters()

load_spam_filters ( )

Loads the Spam Filters and checks the preferences for the enabled status

Returns
array All the spam filters @access private

Definition at line 568 of file filters.php.

References $data_dir, $filters, $SpamFilters_ShowCommercial, $username, _(), and getPref().

Referenced by spam_filters(), and start_filters().

◆ remove_filter()

remove_filter (   $id)

Removes a User filter

Parameters
int$idID of the filter to remove @access private

Definition at line 817 of file filters.php.

References $data_dir, $id, $username, getPref(), removePref(), and setPref().

Referenced by update_for_folder().

◆ spam_filters()

◆ start_filters()

◆ update_for_folder()

update_for_folder (   $args)

This updates the filter rules when renaming or deleting folders

Parameters
array$args@access private

Definition at line 851 of file filters.php.

References $action, $data_dir, $filters, $plugins, $username, elseif, load_filters(), remove_filter(), and setPref().

◆ user_filters()

user_filters (   $imap_stream)

Does the loop through each filter

Parameters
streamimap_stream the stream to read from @access private

Definition at line 249 of file filters.php.

References $data_dir, $filters, $filters_user_scan, $id, $imap_stream, $num, $username, filter_search_and_delete(), getPref(), load_filters(), sqimap_mailbox_exists(), sqimap_mailbox_expunge(), and sqimap_mailbox_select().

Referenced by start_filters().