View Issue Details

IDProjectCategoryView StatusLast Update
0001392SOGoBackend Mailpublic2019-11-11 14:12
Reportermra Assigned Toludovic  
PrioritynormalSeverityfeatureReproducibilityN/A
Status resolvedResolutionfixed 
Product Versionnightly v2 
Fixed in Version4.2.0 
Summary0001392: Patch: Inclusion/Embedding of server-side sieve scripts into standard sogo-script
Description

In our company we migrated to SOGo with Dovecot and Postfix for IMAP and SMTP.
Several users used "sophisticated" sieve scripts on the old Groupware Server which they want to use again on SOGo in conjunction with the easy use of the SOGo created sieve scripts (vacation, redirects).
So the best solution seems to be merging the several scripts to one 'big' sogo.sieve, where the merge will be done by SOGo.

REMARK: This feature is IMHO only usable for experienced Users! If the embedded (userwritten) Script has an error, the sogo.sieve-script will fail, too!

Additional Information

Configuration

SOGoSievePrependFilterName - name of user sieve script, which will run before sogo.sieve

SOGoSieveAppendFilterName - name of user sieve script, which will run at the end of sogo.sieve

SOGoSievePrependGlobalFilterName - Dovecot special: name of configured global sieve script, which will run before the user sieve script in sogo.sieve (should be unofficial, maybe removed)

SOGoSieveAppendGlobalFilterName - Dovecot special: name of configured global sieve script, which will run after the use sieve script in sogo.sieve (should be unofficial, maybe removed)

SOGoSieveInsertServerFilter - Default is NO, if YES than all the sieve scripts which current stored in the users sieve directory will be used instead of the configured 'SOGoSieve*FilterName' scripts. The convention is

  • sieve scripts with prefix 'pre_' will be included at the beginning of the standard sogo.sieve
  • sieve scripts with prefix 'post_' will be included at the End of the standard sogo.sieve

Example:

  • pre_01.sieve and pre_02.sieve will be included at the beginning of the sogo.sieve
  • post_01.sieve will be included at the end of the sogo.sieve

SOGoSieveDebugEnabled - enables some debug messages

Dependencies

This patch depends on 0001391

Function

The external scripts inclusion into sogo.sieve will be done in two possible ways

  • with sieve include-plugin or, if 'include' is not available,
  • embedding of the content of this scripts in sogo.sieve

The partly used sieve plugin 'include' is a RFC Proprosal for sieve and is current implemented only in dovecot,
so we check the managesieve server for its capabilities before creating the sogo.sieve script.

REMARK

The plugin uses only the 'include' command with the locations ":personal" and (if configured) ':global'.
In this implementation a global filter is the first (pre) and the last (post) filter.
The personal filter will run directly after the first global, the last personal filter will
be included before the last global filter.

TagsNo tags attached.

Relationships

parent of 0001391 closed Patch for retrieving managesieve capabilities 
related to 0003209 new Skip ManageSieve sync if user has not modified filter Preferences 

Activities

2011-07-20 22:09

 

mra

mra

2011-07-20 22:13

reporter   ~0002731

Possible script names in the configuration:

SOGoSievePrependFilterName -> pre.sieve
SOGoSieveAppendFilterName -> post.sieve
SOGoSievePrependGlobalFilterName -> global_pre.sieve
SOGoSieveAppendGlobalFilterName -> global_post.sieve

mra

mra

2011-07-20 22:18

reporter   ~0002732

Maybe this patch will show a solution for 0000809 - toy around with sieve under control of SOGo ;-)

mra

mra

2012-07-11 08:39

reporter   ~0004121

This patch could be seen as a child of 0001391, it depends on it.

ludovic

ludovic

2019-11-11 14:12

administrator   ~0013886

https://github.com/inverse-inc/sogo/commit/4475ac651d1d94513729d6133a70d0e70ea52b87

Issue History

Date Modified Username Field Change
2011-07-20 22:09 mra New Issue
2011-07-20 22:09 mra File Added: patch_SOGo_sieve_external_scripts.diff
2011-07-20 22:13 mra Note Added: 0002731
2011-07-20 22:18 mra Note Added: 0002732
2012-07-11 07:35 Christian Mack Relationship added parent of 0001391
2012-07-11 08:39 mra Note Added: 0004121
2015-07-13 14:55 Christian Mack Relationship added related to 0003209
2019-11-11 14:12 ludovic Note Added: 0013886
2019-11-11 14:12 ludovic Status new => resolved
2019-11-11 14:12 ludovic Fixed in Version => 4.2.0
2019-11-11 14:12 ludovic Resolution open => fixed
2019-11-11 14:12 ludovic Assigned To => ludovic