/**
* Generates the procmail script to handle mail forwards.
*
* @param Ingo_Rule $rule Rule object.
*/
protected function _generateForward(Ingo_Rule $rule)
{
if (!count($rule)) {
return;
}
$this->_addItem(Ingo::RULE_FORWARD, new Ingo_Script_Procmail_Comment(_("Forwards"), $rule->disable, true));
$recipe = new Ingo_Script_Procmail_Recipe(array('action' => 'Ingo_Rule_System_Forward', 'action-value' => $rule->addresses, 'disable' => $rule->disable), $this->_params);
if ($rule->keep) {
$recipe->addFlag('c');
}
$this->_addItem(Ingo::RULE_FORWARD, $recipe);
}