$this->_action[] = '{';
foreach ($params['action-value']['addresses'] as $address) {
if (!empty($address)) {
- $this->_action[] = ' FILEDATE=`test -f ${VACATION_DIR:-.}/\'.vacation.' . $address . '\' && '
+ $this->_action[] = ' :0';
+ $this->_action[] = ' * ^TO_' . $address;
+ $this->_action[] = ' {';
+ $this->_action[] = ' FILEDATE=`test -f ${VACATION_DIR:-.}/\'.vacation.' . $address . '\' && '
. $this->_params['ls'] . ' -lcn --time-style=+%s ${VACATION_DIR:-.}/\'.vacation.' . $address . '\' | '
. 'awk \'{ print $6 + (' . $days * 86400 . ') }\'`';
- $this->_action[] = ' DATE=`' . $this->_params['date'] . ' +%s`';
- $this->_action[] = ' DUMMY=`test -f ${VACATION_DIR:-.}/\'.vacation.' . $address . '\' && '
+ $this->_action[] = ' DATE=`' . $this->_params['date'] . ' +%s`';
+ $this->_action[] = ' DUMMY=`test -f ${VACATION_DIR:-.}/\'.vacation.' . $address . '\' && '
. 'test $FILEDATE -le $DATE && '
. 'rm ${VACATION_DIR:-.}/\'.vacation.' . $address . '\'`';
if ($timed) {
- $this->_action[] = ' START=' . $params['action-value']['start'];
- $this->_action[] = ' END=' . $params['action-value']['end'];
+ $this->_action[] = ' START=' . $params['action-value']['start'];
+ $this->_action[] = ' END=' . $params['action-value']['end'];
}
$this->_action[] = '';
- $this->_action[] = ' :0 h';
- $this->_action[] = ' SUBJECT=| formail -xSubject:';
+ $this->_action[] = ' :0 h';
+ $this->_action[] = ' SUBJECT=| formail -xSubject:';
$this->_action[] = '';
- $this->_action[] = ' :0 Whc: ${VACATION_DIR:-.}/vacation.lock';
+ $this->_action[] = ' :0 Whc: ${VACATION_DIR:-.}/vacation.lock';
if ($timed) {
- $this->_action[] = ' * ? test $DATE -gt $START && test $END -gt $DATE';
- $this->_action[] = ' {';
- $this->_action[] = ' :0 Whc';
+ $this->_action[] = ' * ? test $DATE -gt $START && test $END -gt $DATE';
+ $this->_action[] = ' {';
+ $this->_action[] = ' :0 Wh';
}
- $this->_action[] = ' * ^TO_' . $address;
- $this->_action[] = ' * !^X-Loop: ' . $address;
- $this->_action[] = ' * !^X-Spam-Flag: YES';
+ $this->_action[] = ' * ^TO_' . $address;
+ $this->_action[] = ' * !^X-Loop: ' . $address;
+ $this->_action[] = ' * !^X-Spam-Flag: YES';
if (count($params['action-value']['excludes']) > 0) {
foreach ($params['action-value']['excludes'] as $exclude) {
if (!empty($exclude)) {
- $this->_action[] = ' * !^From.*' . $exclude;
+ $this->_action[] = ' * !^From.*' . $exclude;
}
}
}
if ($params['action-value']['ignorelist']) {
- $this->_action[] = ' * !^FROM_DAEMON';
+ $this->_action[] = ' * !^FROM_DAEMON';
}
- $this->_action[] = ' | formail -rD 8192 ${VACATION_DIR:-.}/.vacation.' . $address;
- $this->_action[] = ' :0 ehc';
- $this->_action[] = ' | (formail -rI"Precedence: junk" \\';
- $this->_action[] = ' -a"From: <' . $address . '>" \\';
- $this->_action[] = ' -A"X-Loop: ' . $address . '" \\';
+ $this->_action[] = ' | formail -rD 8192 ${VACATION_DIR:-.}/.vacation.' . $address;
+ $this->_action[] = ' :0 eh';
+ $this->_action[] = ' | (formail -rI"Precedence: junk" \\';
+ $this->_action[] = ' -a"From: <' . $address . '>" \\';
+ $this->_action[] = ' -A"X-Loop: ' . $address . '" \\';
if (Horde_Mime::is8bit($params['action-value']['reason'])) {
- $this->_action[] = ' -i"Subject: ' . Horde_Mime::encode($params['action-value']['subject'] . ' (Re: $SUBJECT)', Horde_Nls::getCharset()) . '" \\';
- $this->_action[] = ' -i"Content-Transfer-Encoding: quoted-printable" \\';
- $this->_action[] = ' -i"Content-Type: text/plain; charset=' . Horde_Nls::getCharset() . '" ; \\';
+ $this->_action[] = ' -i"Subject: ' . Horde_Mime::encode($params['action-value']['subject'] . ' (Re: $SUBJECT)', Horde_Nls::getCharset()) . '" \\';
+ $this->_action[] = ' -i"Content-Transfer-Encoding: quoted-printable" \\';
+ $this->_action[] = ' -i"Content-Type: text/plain; charset=' . Horde_Nls::getCharset() . '" ; \\';
$reason = Horde_Mime::quotedPrintableEncode($params['action-value']['reason'], "\n");
} else {
- $this->_action[] = ' -i"Subject: ' . Horde_Mime::encode($params['action-value']['subject'] . ' (Re: $SUBJECT)', Horde_Nls::getCharset()) . '" ; \\';
+ $this->_action[] = ' -i"Subject: ' . Horde_Mime::encode($params['action-value']['subject'] . ' (Re: $SUBJECT)', Horde_Nls::getCharset()) . '" ; \\';
$reason = $params['action-value']['reason'];
}
$reason = addcslashes($reason, "\\\n\r\t\"`");
- $this->_action[] = ' ' . $this->_params['echo'] . ' -e "' . $reason . '" \\';
- $this->_action[] = ' ) | $SENDMAIL -f' . $address . ' -oi -t';
- $this->_action[] = '';
- $this->_action[] = ' :0';
- $this->_action[] = ' /dev/null';
+ $this->_action[] = ' ' . $this->_params['echo'] . ' -e "' . $reason . '" \\';
+ $this->_action[] = ' ) | $SENDMAIL -f' . $address . ' -oi -t';
if ($timed) {
- $this->_action[] = ' }';
+ $this->_action[] = ' }';
}
+ $this->_action[] = ' }';
}
}
$this->_action[] = '}';