Doesn't work in Samsung Email still. And with COPY FLAG set, it doesn't work with outlook either. You need APPEND for it to work in outlook.
It currently works in outlook with either no causes restriction, or with COPY FLAG APPEND. But not in Samsung Email.
And what I understand, leaving .causes out, should have it match ALL causes.
If I look in the dovecot.log with debugging on, it looks like this:
May 10 03:53:38 imap-login: Info: Login: user=sebastian@sebbe.eu,
method=PLAIN, rip=192.168.2.2, lip=192.168.1.10, mpid=3385220,
session=<U4PCf0GlaKvAqAIC>
May 10 03:53:38 imap(sebastian@sebbe.eu)<3385220><U4PCf0GlaKvAqAIC>: Debug:
Loading modules from directory: /usr/lib/dovecot/modules
May 10 03:53:38 imap(sebastian@sebbe.eu)<3385220><U4PCf0GlaKvAqAIC>: Debug:
Module loaded: /usr/lib/dovecot/modules/lib95_imap_sieve_plugin.so
May 10 03:53:38 imap(sebastian@sebbe.eu)<3385220><U4PCf0GlaKvAqAIC>: Debug:
Added userdb setting: plugin/=yes
May 10 03:53:38 imap(sebastian@sebbe.eu)<3385220><U4PCf0GlaKvAqAIC>: Debug:
Effective uid=1001, gid=1001, home=
May 10 03:53:38 imap(sebastian@sebbe.eu)<3385220><U4PCf0GlaKvAqAIC>: Debug:
Namespace inbox: type=private, prefix=, sep=, inbox=yes, hidden=no,
list=yes, subscriptions=yes
location=mbox:/var/mail/asterisk2:INBOX=/var/mail/asterisk
May 10 03:53:38 imap(sebastian@sebbe.eu)<3385220><U4PCf0GlaKvAqAIC>: Debug:
fs: root=/var/mail/asterisk2, index=, indexpvt=, control=,
inbox=/var/mail/asterisk, alt=
May 10 03:53:38 imap(sebastian@sebbe.eu)<3385220><U4PCf0GlaKvAqAIC>: Debug:
Mailbox INBOX: Mailbox opened because: SELECT
May 10 03:53:38 imap(sebastian@sebbe.eu)<3385220><U4PCf0GlaKvAqAIC>: Debug:
Mailbox Trash: Mailbox opened because: UID MOVE
May 10 03:53:38 imap(sebastian@sebbe.eu)<3385220><U4PCf0GlaKvAqAIC>: Debug:
Mailbox INBOX: UID 1068: Opened mail because: copying
May 10 03:53:38 imap(sebastian@sebbe.eu)<3385220><U4PCf0GlaKvAqAIC>: Debug:
imapsieve: mailbox Trash: MOVE event
May 10 03:53:38 imap(sebastian@sebbe.eu)<3385220><U4PCf0GlaKvAqAIC>: Error:
User sebastian@sebbe.eu doesn't have home dir set, disabling duplicate
database
May 10 03:53:38 imap(sebastian@sebbe.eu)<3385220><U4PCf0GlaKvAqAIC>: Debug:
sieve: Pigeonhole version 0.5.7.2 () initializing
May 10 03:53:38 imap(sebastian@sebbe.eu)<3385220><U4PCf0GlaKvAqAIC>: Debug:
sieve: Sieve imapsieve plugin for Pigeonhole version 0.5.7.2 () loaded
May 10 03:53:38 imap(sebastian@sebbe.eu)<3385220><U4PCf0GlaKvAqAIC>: Debug:
imapsieve: Static mailbox rule [1]: mailbox=Trash' from=
*' causes=(COPY
FLAG APPEND) => before=file:/etc/dovecot/sieve/trash.sieve' after=
file:/etc/dovecot/>
May 10 03:53:38 imap(sebastian@sebbe.eu)<3385220><U4PCf0GlaKvAqAIC>: Debug:
imapsieve: Static mailbox rule [2]: mailbox=Sent' from=
*' causes=(APPEND)
=> before=(none) after=file:/etc/dovecot/sieve/sent.sieve' May 10 03:53:38 imap(sebastian@sebbe.eu)<3385220><U4PCf0GlaKvAqAIC>: Debug: imapsieve: Matched static mailbox rule [1] May 10 03:53:38 imap(sebastian@sebbe.eu)<3385220><U4PCf0GlaKvAqAIC>: Debug: sieve: file storage: Using Sieve script path: /etc/dovecot/sieve/trash.sieve May 10 03:53:38 imap(sebastian@sebbe.eu)<3385220><U4PCf0GlaKvAqAIC>: Debug: sieve: file script: Opened script
trash' from
/etc/dovecot/sieve/trash.sieve' May 10 03:53:38 imap(sebastian@sebbe.eu)<3385220><U4PCf0GlaKvAqAIC>: Debug: sieve: file storage: Using Sieve script path: /etc/dovecot/sieve/trash.sieve May 10 03:53:38 imap(sebastian@sebbe.eu)<3385220><U4PCf0GlaKvAqAIC>: Debug: sieve: file script: Opened script
trash' from
/etc/dovecot/sieve/trash.sieve' May 10 03:53:38 imap(sebastian@sebbe.eu)<3385220><U4PCf0GlaKvAqAIC>: Debug: sieve: Opening script 1 of 2 from
/etc/dovecot/sieve/trash.sieve'
May 10 03:53:38 imap(sebastian@sebbe.eu)<3385220><U4PCf0GlaKvAqAIC>: Debug:
sieve: Loading script /etc/dovecot/sieve/trash.sieve
May 10 03:53:38 imap(sebastian@sebbe.eu)<3385220><U4PCf0GlaKvAqAIC>: Debug:
sieve: Script binary /etc/dovecot/sieve/trash.svbin successfully loaded
May 10 03:53:38 imap(sebastian@sebbe.eu)<3385220><U4PCf0GlaKvAqAIC>: Debug:
sieve: binary save: not saving binary /etc/dovecot/sieve/trash.svbin,
because it is already stored
May 10 03:53:38 imap(sebastian@sebbe.eu)<3385220><U4PCf0GlaKvAqAIC>: Debug:
sieve: Executing script from /etc/dovecot/sieve/trash.svbin' May 10 03:53:38 imap(sebastian@sebbe.eu)<3385220><U4PCf0GlaKvAqAIC>: Debug: sieve: Opening script 2 of 2 from
/etc/dovecot/sieve/trash.sieve'
May 10 03:53:38 imap(sebastian@sebbe.eu)<3385220><U4PCf0GlaKvAqAIC>: Debug:
sieve: Loading script /etc/dovecot/sieve/trash.sieve
May 10 03:53:38 imap(sebastian@sebbe.eu)<3385220><U4PCf0GlaKvAqAIC>: Debug:
sieve: Script binary /etc/dovecot/sieve/trash.svbin successfully loaded
May 10 03:53:38 imap(sebastian@sebbe.eu)<3385220><U4PCf0GlaKvAqAIC>: Debug:
sieve: binary save: not saving binary /etc/dovecot/sieve/trash.svbin,
because it is already stored
May 10 03:53:38 imap(sebastian@sebbe.eu)<3385220><U4PCf0GlaKvAqAIC>: Debug:
sieve: Executing script from `/etc/dovecot/sieve/trash.svbin'
May 10 03:53:38 imap(sebastian@sebbe.eu)<3385220><U4PCf0GlaKvAqAIC>: Info:
sieve: left message in mailbox 'Trash'
May 10 03:53:38 imap(sebastian@sebbe.eu)<3385218><hp3Bf0GlZqvAqAIC>: Info:
Connection closed (SELECT finished 0.127 secs ago) in=77 out=928 deleted=0
expunged=0 trashed=0 hdr_count=0 hdr_bytes=0 body_count=0 body_bytes=0
May 10 03:53:38 imap(sebastian@sebbe.eu)<3385220><U4PCf0GlaKvAqAIC>: Info:
Connection closed (CLOSE finished 0.010 secs ago) in=160 out=1192 deleted=0
expunged=0 trashed=1 hdr_count=0 hdr_bytes=0 body_count=0 body_bytes=0
May 10 03:53:44 imap(sebastian@sebbe.eu)<3385185>
Then in trash, its still unread.
-----Ursprungligt meddelande----- Från: dovecot-bounces@dovecot.org dovecot-bounces@dovecot.org För Mark Constable Skickat: den 10 maj 2020 03:48 Till: dovecot@dovecot.org Ämne: Re: SV: Marking all emails in "Trash" as opened, and also prohibiting email clients from creating ne
On 10/5/20 3:33 am, Sebastian Nielsen wrote:
And then this in plugins.conf:
plugin { sieve_plugins = sieve_imapsieve imapsieve_mailbox1_name = Trash imapsieve_mailbox1_before = file:/etc/dovecot/sieve/trash.sieve }
Maybe adding this will help...
imapsieve_mailbox1_causes = COPY FLAG