mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-26 16:48:49 +01:00
* Mail: fix vacation notice still sending out notification mail even if the original mail is a spam.
This commit is contained in:
parent
f275a6a5fe
commit
d52ede97c5
@ -415,17 +415,6 @@ class Script
|
||||
if (($vacation['status'] == 'on' && strlen(trim($vacation['text']))>0)|| $vacation['status'] == 'by_date' &&
|
||||
$vacation['start_date'] <= time() && time() < $vacation['end_date']+24*3600) // +24*3600 to include the end_date day
|
||||
{
|
||||
if (trim($vacation['forwards'])) {
|
||||
$if = array();
|
||||
foreach($vacation['addresses'] as $addr) {
|
||||
$if[] = 'address :contains ["To","TO","Cc","CC"] "'.trim($addr).'"';
|
||||
}
|
||||
$newscriptbody .= 'if anyof ('.implode(', ',$if).") {\n";
|
||||
foreach(preg_split('/, ?/',$vacation['forwards']) as $addr) {
|
||||
$newscriptbody .= "\tredirect \"".trim($addr)."\";\n";
|
||||
}
|
||||
$newscriptbody .= "\tkeep;\n}\n";
|
||||
}
|
||||
$vacation_active = true;
|
||||
if ($vacation['text'])
|
||||
{
|
||||
@ -442,6 +431,17 @@ class Script
|
||||
$newscriptbody .= "if header :contains ".'"X-Spam-Status" '.'"YES"'."{\n\tstop;\n}\n"; //stop vacation reply if it is spam
|
||||
}
|
||||
}
|
||||
if (trim($vacation['forwards'])) {
|
||||
$if = array();
|
||||
foreach($vacation['addresses'] as $addr) {
|
||||
$if[] = 'address :contains ["To","TO","Cc","CC"] "'.trim($addr).'"';
|
||||
}
|
||||
$newscriptbody .= 'if anyof ('.implode(', ',$if).") {\n";
|
||||
foreach(preg_split('/, ?/',$vacation['forwards']) as $addr) {
|
||||
$newscriptbody .= "\tredirect \"".trim($addr)."\";\n";
|
||||
}
|
||||
$newscriptbody .= "\tkeep;\n}\n";
|
||||
}
|
||||
$newscriptbody .= "vacation :days " . $vacation['days'];
|
||||
$first = 1;
|
||||
if (!empty($vacation['addresses'][0]))
|
||||
|
Loading…
Reference in New Issue
Block a user