⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.19
Server IP:
41.128.143.86
Server:
Linux host.raqmix.cloud 6.8.0-1025-azure #30~22.04.1-Ubuntu SMP Wed Mar 12 15:28:20 UTC 2025 x86_64
Server Software:
Apache
PHP Version:
8.3.23
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
usr
/
share
/
psa-pear
/
pear
/
tests
/
ingo
/
Ingo
/
Unit
/
View File Name :
MaildropTest.php
* @author Michael Slusarz
* @category Horde * @copyright 2014-2016 Horde LLC * @ignore * @license http://www.horde.org/licenses/apache ASL * @package Ingo * @subpackage UnitTests */ class Ingo_Unit_MaildropTest extends Ingo_Unit_TestBase { public function setUp() { parent::setUp(); $this->script = new Ingo_Script_Maildrop(array( 'path_style' => 'mbox', 'skip' => array(), 'spam_compare' => 'string', 'spam_header' => 'X-Spam-Level', 'spam_char' => '*', 'storage' => $this->storage, 'transport' => array( Ingo::RULE_ALL => array( 'driver' => 'Null' ) ) )); } public function testForwardKeep() { $forward = new Ingo_Storage_Forward(); $forward->setForwardAddresses('joefabetes@example.com'); $forward->setForwardKeep(true); $this->storage->store($forward); $this->_enableRule(Ingo_Storage::ACTION_FORWARD); $this->_assertScript('if( \ /^From:\s*.*/:h \ ) exception { cc "! joefabetes@example.com" to "${DEFAULT}" }'); } public function testForwardNoKeep() { $forward = new Ingo_Storage_Forward(); $forward->setForwardAddresses('joefabetes@example.com'); $forward->setForwardKeep(false); $this->storage->store($forward); $this->_enableRule(Ingo_Storage::ACTION_FORWARD); $this->_assertScript('if( \ /^From:\s*.*/:h \ ) exception { cc "! joefabetes@example.com" exit }'); } public function testBlacklistWithFolder() { $bl = new Ingo_Storage_Blacklist(3); $bl->setBlacklist(array('spammer@example.com')); $bl->setBlacklistFolder('Junk'); $this->storage->store($bl); $this->_assertScript('if( \ /^From:\s*.*spammer@example\.com/:h \ ) exception { to Junk }'); } public function testBlacklistMarker() { $bl = new Ingo_Storage_Blacklist(3); $bl->setBlacklist(array('spammer@example.com')); $bl->setBlacklistFolder(Ingo::BLACKLIST_MARKER); $this->storage->store($bl); $this->_assertScript('if( \ /^From:\s*.*spammer@example\.com/:h \ ) exception { to ++DELETE++ }'); } public function testBlacklistDiscard() { $bl = new Ingo_Storage_Blacklist(3); $bl->setBlacklist(array('spammer@example.com')); $bl->setBlacklistFolder(null); $this->storage->store($bl); $this->_assertScript('if( \ /^From:\s*.*spammer@example\.com/:h \ ) exception { exit }'); } public function testWhitelist() { $wl = new Ingo_Storage_Whitelist(3); $wl->setWhitelist(array('spammer@example.com')); $this->storage->store($wl); $this->_assertScript('if( \ /^From:\s*.*spammer@example\.com/:h \ ) exception { to "${DEFAULT}" }'); } }