Only discard mails if vacation conditions match

Fixes #4245
pull/237/merge
Francis Lachapelle 2017-08-23 14:14:45 -04:00
parent 9495c43b4b
commit 399397bd79
1 changed files with 4 additions and 4 deletions

View File

@ -961,14 +961,14 @@ static NSString *sieveScriptName = @"sogo";
[vacation_script appendFormat: @"text:\r\n%@\r\n.\r\n;\r\n", text];
// Closing bracket of conditions
if ([allConditions count])
[vacation_script appendString: @"}\r\n"];
// Should we discard incoming mails during vacation?
if (discardMails)
[vacation_script appendString: @"discard;\r\n"];
// Closing bracket of conditions
if ([allConditions count])
[vacation_script appendString: @"}\r\n"];
//
// See https://sogo.nu/bugs/view.php?id=2332 for details
//