[ingo] make maildrop vacation ignore mailing lists and spam.
gimili
gimili17 at gmail.com
Wed Sep 3 12:24:50 UTC 2008
I changed /usr/share/horde3/ingo/lib/Script/maildrop.php as per below
(minus the asterisks) to stop the maildrop vacation filter from
responding to mailing lists and spam. I don't know why the line that
starts with "// $this->_action[] = '(^(Mailing-List : |Precedence
:.*(junk |bulk |list) |To : Multiple recip" is commented out or whether
it works but what I did below seems to work. This is just my stab at it
and I have only limited experience. I thought it might help someone or
perhaps someone could point out my errors or suggest improvements. I
can't have the vacation filter replying to mailing lists especially if
it doesn't warn users. Thanks.
$xfilter .= '"';
** $this->_action[] = ' if (! /^Precedence: (bulk|list|junk)/
&& ! /^X-Spam-Flag: YES/ )';
** $this->_action[] = ' exception {';
** $this->_action[] = ' }';
** $this->_action[] = ' else';
** $this->_action[] = ' {';
$this->_action[] = ' cc $DEFAULT';
$this->_action[] = $xfilter;
$this->_action[] = ' /^To:.*/';
$this->_action[] = ' getaddr($MATCH) =~ /^.*/;';
$this->_action[] = ' MATCH=tolower($MATCH)';
$this->_action[] = ' flock "vacation.lock" {';
$this->_action[] = ' current_time=time;';
$this->_action[] = ' if (gdbmopen("vacation.dat", "C") ==
0)';
$this->_action[] = ' {';
$this->_action[] = ' if ((prev_time=gdbmfetch($MATCH))
ne "" && $prev_time >= $current_time - 60 * 60 * 24 $
$this->_action[] = ' {';
$this->_action[] = ' exit';
$this->_action[] = ' }';
$this->_action[] = ' gdbmstore($MATCH, $current_time)';
$this->_action[] = ' gdbmclose';
$this->_action[] = ' }';
$this->_action[] = ' }';
$reason = addcslashes($reason, "\\\n\r\t\"`");
$reason = addcslashes($reason, "\\\n\r\t\"");
$this->_action[] = ' to "| ( cat - ; echo -e \"' . $reason
. '\" ) | /usr/sbin/sendmail -t"';
** $this->_action[] = ' }';
break;
More information about the ingo
mailing list