示例#1
0
    public function testForwardNoKeep()
    {
        $forward = new Ingo_Rule_System_Forward();
        $forward->addAddresses('*****@*****.**');
        $forward->keep = false;
        $this->storage->updateRule($forward);
        $this->_assertScript(':0
{
:0
*$ ! ^From *\\/[^  ]+
*$ ! ^Sender: *\\/[^   ]+
*$ ! ^From: *\\/[^     ]+
*$ ! ^Reply-to: *\\/[^     ]+
{
OUTPUT = `formail -zxFrom:`
}
:0 E
{
OUTPUT = $MATCH
}
:0 c
* !^FROM_MAILER
* !^X-Loop: to-joefabetes@example.com
| formail -A"X-Loop: to-joefabetes@example.com" | $SENDMAIL -oi -f $OUTPUT joefabetes@example.com
:0 E
$DEFAULT
:0
/dev/null
}');
    }
示例#2
0
文件: SieveTest.php 项目: horde/horde
    public function testForwardNoKeep()
    {
        $forward = new Ingo_Rule_System_Forward();
        $forward->addAddresses('*****@*****.**');
        $forward->keep = false;
        $this->storage->updateRule($forward);
        $this->_assertScript('if true {
redirect "*****@*****.**";
stop;
}');
    }
示例#3
0
    public function testForwardNoKeep()
    {
        $forward = new Ingo_Rule_System_Forward();
        $forward->addAddresses('*****@*****.**');
        $forward->keep = false;
        $this->storage->updateRule($forward);
        $this->_assertScript('if( \\
/^From:\\s*.*/:h \\
)
exception {
cc "! joefabetes@example.com"
exit
}');
    }