Author: Michael Slusarz (slusarz@horde.org)
Inheritance: extends Ingo_Rule_Addresses, implements Ingo_Rule_System
コード例 #1
0
ファイル: ScriptTest.php プロジェクト: horde/horde
 function testPartialWhitelistAddressShouldNotMatch()
 {
     $runner = ScriptTester::factory('all', $this);
     $bl = new Ingo_Rule_System_Blacklist();
     $bl->addAddresses('*****@*****.**');
     $runner->addRule($bl);
     $wl = new Ingo_Rule_System_Whitelist();
     $wl->addAddresses('*****@*****.**');
     $runner->addRule($wl);
     $runner->assertDeletesMessage('from_spammer');
 }
コード例 #2
0
ファイル: SieveTest.php プロジェクト: horde/horde
    public function testBlacklistMarker()
    {
        $bl = new Ingo_Rule_System_Blacklist();
        $bl->addAddresses('*****@*****.**');
        $bl->mailbox = Ingo_Rule_System_Blacklist::DELETE_MARKER;
        $this->storage->updateRule($bl);
        $this->_assertScript('require "imap4flags";
if address :all :comparator "i;ascii-casemap" :is ["From", "Sender", "Resent-From"] "*****@*****.**"  {
addflag ["\\\\Deleted"];
keep;
removeflag ["\\\\Deleted"];
stop;
}');
    }
コード例 #3
0
ファイル: ProcmailTest.php プロジェクト: raz0rsdge/horde
    public function testBlacklistDiscard()
    {
        $bl = new Ingo_Rule_System_Blacklist();
        $bl->addAddresses('*****@*****.**');
        $this->storage->updateRule($bl);
        $this->_assertScript(':0
* ^From:(.*\\<)?spammer@example\\.com
/dev/null');
    }
コード例 #4
0
ファイル: MaildropTest.php プロジェクト: raz0rsdge/horde
    public function testBlacklistDiscard()
    {
        $bl = new Ingo_Rule_System_Blacklist();
        $bl->addAddresses('*****@*****.**');
        $this->storage->updateRule($bl);
        $this->_assertScript('if( \\
/^From:\\s*.*spammer@example\\.com/:h \\
)
exception {
exit
}');
    }