BlueShoes Application Framework made with PHP http://www.blueshoes.org/


Packageindex Classtrees Modulegroups Elementlist Report XML Files

File: C:/usr/local/lib/php/blueshoes-4.2/core/net/email/spambuster/Bs_SpamBuster.class.php
BlueShoes Application Framework - net/email/spambuster

Bs_SpamBuster

Bs_Object
   |
  +-- Bs_SpamBuster

Treats Spam (unwanted emails).

 

public class Bs_SpamBuster extends Bs_Object

Treats Spam (unwanted emails).
i couldn't find a mailserver or mailclient that offered thefeatures i wanted. so i wrote this class to save me time andhappiness.when a new mail comes in, it's accepted by the mailserver. thenthis class checks if it wants me to read it. if the sender isan approved address, it goes through immediatly. if not, somespam checks are made. they include:- optional blocking of freemail providers(do i need mail from hotmail users? ...)- vocabulary checks ("special limited offer" etc)and if the message fails, it is [re]moved and the sendergets informed about that. spammers won't read my responseanyway. if the system fails and treats a real mail as spam,the sender gets noticed about that and can try it again, orcontact me differently.this avoids the situation "didn't you get my email?".wish list:- option to block html mails- option to block mails with attachements- option to complain with the mailmasterdependencies: Bs_EmailParser, Bs_EmailValidator, Bs_Smtp, Bs_Dir,

Authors
Sincebs4.1 @status experimental
Version4.0.$id$
Copyrightblueshoes.org

 

Methods inherited from Bs_Object

isex, isexception, tostring, tohtml, persist, unpersist, bs_object, bbsetoutput, bbawake, bbisawake, bbxmsg, bbxfunctionstart, bbxfunctionend, bbxecho, bbxvar, bbxvardump, bbforcetrace, bbbufferstart, bbbufferget, bbbufferendflush, bbbufferendclean

Public Method Summary

void

Bs_SpamBuster()

Constructor

Private Method Summary

void

checkDirectory( $fullPath)

void

_bust(array $emailHash, string $fileFullPath, int $bustReason)

array

_getFileList(string $fullPath)

returns the email files in the given directory.
void

_createReplyText( $bustReason)

Warning: documentation is missing.
void

_move( $fileFullPath)

Warning: documentation is missing.
void

_delete()

Warning: documentation is missing.

Public Field Summary

string

$allowFreemail

by default we don't allow freemail providers.

Private Constant Summary

BS_SPAMBUSTER_VERSION >>4.0.$x$<< Warning: documentation is missing.
BS_SPAMBUSTER_TXT_BLACKLIST >>1<< Warning: documentation is missing.
BS_SPAMBUSTER_TXT_FREEMAIL >>2<< Warning: documentation is missing.
BS_SPAMBUSTER_TXT_SPAM >>3<< Warning: documentation is missing.
BS_SPAMBUSTER_TXT_HTML >>4<< Warning: documentation is missing.
BS_SPAMBUSTER_TXT_ATTACHEMENT >>5<< Warning: documentation is missing.

Public Method Details

Bs_SpamBuster

public void Bs_SpamBuster( )

  Constructor

Returns void


Private Method Details

checkDirectory

private void checkDirectory( $fullPath )

 

Parameter
$fullPath
Warning: documentation is missing.
Returns void


_bust

private void _bust( array $emailHash, string $fileFullPath, int $bustReason )

 

Parameter
array $emailHash
(email file parsed into hash)
string $fileFullPath
(full path to email file)
int $bustReason
(see constants)
Returns void


_getFileList

private array _getFileList( string $fullPath )

  returns the email files in the given directory.
does not go into subdirs. msg files must have the ending ".msg".

Parameter
string $fullPath
Returns array

(vector filled with fullPaths, may be empty if no files.)


_createReplyText

private void _createReplyText( $bustReason )

 

Warning: documentation is missing.

Parameter
$bustReason
Warning: documentation is missing.
Returns void


_move

private void _move( $fileFullPath )

 

Warning: documentation is missing.

Parameter
$fileFullPath
Warning: documentation is missing.
Returns void


_delete

private void _delete( )

 

Warning: documentation is missing.

Returns void


Public Field Details

$allowFreemail

public string $allowFreemail

>>FALSE<<

by default we don't allow freemail providers.


Private Constant Details

BS_SPAMBUSTER_VERSION

define( BS_SPAMBUSTER_VERSION, >>4.0.$x$<< )
Case: default: case sensitive



BS_SPAMBUSTER_TXT_BLACKLIST

define( BS_SPAMBUSTER_TXT_BLACKLIST, >>1<< )
Case: default: case sensitive



BS_SPAMBUSTER_TXT_FREEMAIL

define( BS_SPAMBUSTER_TXT_FREEMAIL, >>2<< )
Case: default: case sensitive



BS_SPAMBUSTER_TXT_SPAM

define( BS_SPAMBUSTER_TXT_SPAM, >>3<< )
Case: default: case sensitive



BS_SPAMBUSTER_TXT_HTML

define( BS_SPAMBUSTER_TXT_HTML, >>4<< )
Case: default: case sensitive



BS_SPAMBUSTER_TXT_ATTACHEMENT

define( BS_SPAMBUSTER_TXT_ATTACHEMENT, >>5<< )
Case: default: case sensitive




Packageindex Classtrees Modulegroups Elementlist Report XML Files
PHPDoc 1.0beta