View Issue Details

IDProjectCategoryView StatusLast Update
0002332SOGoBackend Mailpublic2015-02-09 21:13
Reporterryacketta Assigned Toludovic  
PrioritynormalSeveritymajorReproducibilityalways
Status resolvedResolutionfixed 
Product Version2.0.5a 
Fixed in Version2.2.16 
Summary0002332: Vacation Rules not parsed if prior rules have stop directives
Description

Stumbled upon a little oddity with SOGo's Vacation rules in that they are appended to the end of the sieve script and end up not processed if a prior rules have stop directives.

For example, I setup a rule to put messages from my gmail account into 'TESTING' and have a Vacation message enabled everything works as expected. If I add a stop directive to the gmail rule the vacation rule does not process.

These rules work in Oder listed:
if anyof (address :contains "from" "joe_user@gmail.com";) {
fileinto "TESTING";
}

if allof ( not exists ["list-help", "list-unsubscribe", "list-subscribe", "list-owner", "list-post", "list-archive", "list-id", "Mailing-List"], not header :comparator "i;ascii-casemap" :is "Precedence" ["list", "bulk", "junk"], not header :comparator "i;ascii-casemap" :matches "To" "Multiple recipients of*" ) {vacation :days 7 :addresses ["yacketrj@potsdam.edu";] text:
Testing Vacation rules, please ignore
.
;
}

Jun 3 14:21:52 hermes dovecot: lda(yacketrj): sieve: msgid=<CAD3YU+=TPw8F7OY898vaNcD6rtOWF9L2izC3QV2osxHxm6krrg@mail.gmail.com>: stored mail into mailbox 'TESTING'
Jun 3 14:21:52 hermes dovecot: lda(yacketrj): sieve: msgid=<CAD3YU+=TPw8F7OY898vaNcD6rtOWF9L2izC3QV2osxHxm6krrg@mail.gmail.com>: sent vacation response to <ronald.yacketta@gmail.com>

If I add a stop directive to the gmail check then ONLY the gmail rule is processed

if anyof (address :contains "from" "joe_user@gmail.com";) {
fileinto "TESTING";
stop;
}

Jun 3 14:29:46 hermes dovecot: lda(yacketrj): sieve: msgid=<CAD3YU+mB=Xa6d-bsWC8g62dvp5-2DUNcsNN3Krz9wx_J_Ft8Fg@mail.gmail.com>: stored mail into mailbox 'TESTING'

Other sieve parsers that I have used in the past always placed the Vacation rule at the top of the rule file to ensure it was always processed first.

Will toss a bug/feature in the tracker.

Additional Information

The order is defined in [SOGoSieveManager updateFiltersForLogin:authname:password:account:].

TagsNo tags attached.

Activities

francis

francis

2014-03-24 11:39

administrator   ~0006764

SOGo used to write the vacation auto-reply rule after the filters but this behaviour was changed a while ago:

https://github.com/inverse-inc/sogo/commit/36bde4e042ec48a55ce7082a328465f842526211

We should make it customizable to mitigate the issue.

romeyn

romeyn

2014-09-11 16:33

reporter   ~0007490

Any traction on this issue? It's the only thing keeping us from migrating away from our current "official" web mail app in favor of SOGo.

ludovic

ludovic

2015-01-29 18:26

administrator   ~0008120

What do you think if we add the following option in the Vacation tab:

[ ] Always send vacation message response

That would place it to the top of the Sieve script. If not checked, it'll place it at the bottom like we do right now.

romeyn

romeyn

2015-02-09 20:30

reporter   ~0008159

We think that would fit the bill quite nicely. Thank you!

ludovic

ludovic

2015-02-09 21:13

administrator   ~0008162

https://github.com/inverse-inc/sogo/commit/6c9b1a494fa1f0a44b118f6c4a399e958796704d

Issue History

Date Modified Username Field Change
2013-06-03 18:36 ryacketta New Issue
2013-06-10 13:17 francis Additional Information Updated
2014-03-24 11:39 francis Note Added: 0006764
2014-09-11 16:33 romeyn Note Added: 0007490
2015-01-29 18:26 ludovic Note Added: 0008120
2015-02-09 20:30 romeyn Note Added: 0008159
2015-02-09 21:13 ludovic Note Added: 0008162
2015-02-09 21:13 ludovic Status new => resolved
2015-02-09 21:13 ludovic Fixed in Version => 2.2.16
2015-02-09 21:13 ludovic Resolution open => fixed
2015-02-09 21:13 ludovic Assigned To => ludovic