Author: Michael Slusarz (slusarz@horde.org)
Inheritance: extends Ingo_Rule_Addresses, implements Ingo_Rule_System
Esempio n. 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
}');
    }
Esempio n. 2
0
    public function testForwardNoKeep()
    {
        $forward = new Ingo_Rule_System_Forward();
        $forward->addAddresses('*****@*****.**');
        $forward->keep = false;
        $this->storage->updateRule($forward);
        $this->_assertScript('if true {
redirect "*****@*****.**";
stop;
}');
    }
Esempio n. 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
}');
    }