Re: [SOGo] email are deleted from trash after ~7days

2018-06-05 Thread Peter Schiffer
Hi Christian,

thanks for your reply. So the sieve filters (and cron as well) were the
first things I've checked, but there is nothing regarding delete emails
from trash after a week.

My dovecot config can be found here [1]. I've checked all *.sieve files
on mailserver (found with: find / -name \*sieve 2>/dev/null), but
nothing about deletion from trash. I've also checked all sieve tables
in mysql:

MariaDB [somedb]> select * from sieve_after;
Empty set (0.00 sec)

MariaDB [somedb]> select * from sieve_before;
Empty set (0.01 sec)

MariaDB [somedb]> select * from sieve_filters;
Empty set (0.00 sec)

Do you have any idea what else should I check?

Thanks,

peter

[1] https://github.com/pschiffe/mailcow-dockerized/tree/master/data/conf/dovecot

On Mon, 2018-06-04 at 08:38 +0200, Christian Mack wrote:
> Hello
> 
> Ahh now I see ist, sorry for the confusion.
> It is not deleted from a client.
> It is deleted by a sieve filter defined in dovecots sieve plugin.
> Sieve is called implicitly on every email entering the postbox.
> Expunges at the end of all sessions is normal behaviour.
> 
> Sieve filter rules can be defined per user, but also global for the
> complete server.
> 
> Hope that helps.
> 
> Kind regards,
> Christian Mack
> 
> Am 01.06.2018 um 17:49 schrieb Peter Schiffer (peter+sogo@pschiffer.e
> u):
> > Hello,
> > 
> > thanks for your reply. I don't think the deletion is done by cron,
> > because of these dovecot logs. For every deleted email from trash I
> > can
> > see this line:
> > 
> > May 29 08:02:17 hostname dovecot: imap(some@mail)<7725> > T0CE
> > 8>: Debug: imapsieve: mailbox Trash: FLAG event (changed flags:
> > \Deleted)
> > 
> > And at the end of the imap session, I see:
> > 
> > dovecot-mailcow_1| May 23 12:46:39 hostname dovecot: imap(some@
> > mail
> > box)<11088>: Logged out in=221 out=30927
> > deleted=473
> > expunged=473 trashed=0 hdr_count=0 hdr_bytes=0 body_count=0
> > body_bytes=0
> > 
> > So the emails from trash are deleted by some client, but
> > Thunderbird
> > and Evolution I've checked doesn't have any expunge or empty trash
> > on
> > logout enabled. So there is active-sync by sogo and sogo webmail.
> > In
> > some sogo web mail sessions I also see requests like this:
> > 
> > nginx-mailcow_1  | someip - - [23/May/2018:12:46:11 +0200]
> > "POST
> > /SOGo/so/some@mailbox/Mail/0/folderINBOX/expunge HTTP/2.0" 200 58
> > "http
> > s://hostname/SOGo/so/some@mailbox/Mail/view" "Mozilla/5.0 (X11;
> > Fedora;
> > Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.0"
> > ...
> > sogo-mailcow_1   | May 23 12:46:11 ccec35332334 sogod [43]:
> > someip
> > "POST /SOGo/so/some@mailbox/Mail/0/folderINBOX/expunge HTTP/1.0"
> > 200
> > 58/0 0.291 - - 0
> > 
> > So it looks like sogo itself is responsible for deletion of at
> > least
> > part of the missing emails, but so far I wasn't able to find the
> > exact
> > reason :/
> > 
> > peter
> > 
> > On Fri, 2018-06-01 at 15:58 +0200, Christian Mack wrote:
> > > Hello
> > > 
> > > You do not need the expire plugin.
> > > Do you have a cron job on your dovecot server?
> > > Something like:
> > > /usr/bin/doveadm expunge -A mailbox Trash savedbefore 7d
> > > 
> > > 
> > > Kind regards,
> > > Christian Mack
> > > 
> > > Am 01.06.2018 um 13:05 schrieb Peter Schiffer (peter+sogo@pschiff
> > > er.e
> > > u):
> > > > Sure, but nothing:
> > > > 
> > > > root@host:/# ls -lh /usr/local/etc/dovecot/
> > > > total 20K
> > > > -rw-r--r--. 1 root root   52 May 31 22:51 dovecot-master.passwd
> > > > -rw-r--r--. 1 root root 7.4K May 31 00:09 dovecot.conf
> > > > -rw-r--r--. 1 root root   28 May 23 00:35 extra.conf
> > > > -rw-r--r--. 1 root root  413 May 14  2017 sieve_after
> > > > drwxr-xr-x. 2 root root  215 Nov 16  2017 sql
> > > > root@host:/# grep -R expire /usr/local/etc/dovecot/
> > > > root@host:/#
> > > > 
> > > > peter
> > > > 
> > > > On Fri, 2018-06-01 at 09:32 +0300, devteam wrote:
> > > > > Can you run: grep -R expire /etc/dovecot/ ?
> > > > > 
> > > > > 
> > > > > On 05/31/2018 08:21 PM, Peter Schiffer (peter+sogo@pschiffer.
> > > > > eu)
> > > > > wrote:
> > > > > > Hi,
> > > > > >

Re: [SOGo] email are deleted from trash after ~7days

2018-06-01 Thread Peter Schiffer
Hello,

thanks for your reply. I don't think the deletion is done by cron,
because of these dovecot logs. For every deleted email from trash I can
see this line:

May 29 08:02:17 hostname dovecot: imap(some@mail)<7725>: Debug: imapsieve: mailbox Trash: FLAG event (changed flags:
\Deleted)

And at the end of the imap session, I see:

dovecot-mailcow_1| May 23 12:46:39 hostname dovecot: imap(some@mail
box)<11088>: Logged out in=221 out=30927 deleted=473
expunged=473 trashed=0 hdr_count=0 hdr_bytes=0 body_count=0
body_bytes=0

So the emails from trash are deleted by some client, but Thunderbird
and Evolution I've checked doesn't have any expunge or empty trash on
logout enabled. So there is active-sync by sogo and sogo webmail. In
some sogo web mail sessions I also see requests like this:

nginx-mailcow_1  | someip - - [23/May/2018:12:46:11 +0200] "POST
/SOGo/so/some@mailbox/Mail/0/folderINBOX/expunge HTTP/2.0" 200 58 "http
s://hostname/SOGo/so/some@mailbox/Mail/view" "Mozilla/5.0 (X11; Fedora;
Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.0"
...
sogo-mailcow_1   | May 23 12:46:11 ccec35332334 sogod [43]: someip
"POST /SOGo/so/some@mailbox/Mail/0/folderINBOX/expunge HTTP/1.0" 200
58/0 0.291 - - 0

So it looks like sogo itself is responsible for deletion of at least
part of the missing emails, but so far I wasn't able to find the exact
reason :/

peter

On Fri, 2018-06-01 at 15:58 +0200, Christian Mack wrote:
> Hello
> 
> You do not need the expire plugin.
> Do you have a cron job on your dovecot server?
> Something like:
> /usr/bin/doveadm expunge -A mailbox Trash savedbefore 7d
> 
> 
> Kind regards,
> Christian Mack
> 
> Am 01.06.2018 um 13:05 schrieb Peter Schiffer (peter+sogo@pschiffer.e
> u):
> > Sure, but nothing:
> > 
> > root@host:/# ls -lh /usr/local/etc/dovecot/
> > total 20K
> > -rw-r--r--. 1 root root   52 May 31 22:51 dovecot-master.passwd
> > -rw-r--r--. 1 root root 7.4K May 31 00:09 dovecot.conf
> > -rw-r--r--. 1 root root   28 May 23 00:35 extra.conf
> > -rw-r--r--. 1 root root  413 May 14  2017 sieve_after
> > drwxr-xr-x. 2 root root  215 Nov 16  2017 sql
> > root@host:/# grep -R expire /usr/local/etc/dovecot/
> > root@host:/#
> > 
> > peter
> > 
> > On Fri, 2018-06-01 at 09:32 +0300, devteam wrote:
> > > Can you run: grep -R expire /etc/dovecot/ ?
> > > 
> > > 
> > > On 05/31/2018 08:21 PM, Peter Schiffer (peter+s...@pschiffer.eu)
> > > wrote:
> > > > Hi,
> > > > 
> > > > thank you for your reply, but I don't have expire plugin
> > > > enabled in
> > > > dovecot. See attachment for output of doveconf -n.
> > > > 
> > > > What else could be a reason here?
> > > > 
> > > > Thanks,
> > > > 
> > > > peter
> > > > 
> > > > On Thu, 2018-05-31 at 17:36 +0300, devteam wrote:
> > > > > Hi,
> > > > > 
> > > > > /etc/dovecot/dovecot.conf
> > > > > 
> > > > > plugin: expire
> > > > > 
> > > > > expire = Trash 7 Trash/*7 Junk 30
> > > > > 
> > > > > 
> > > > > 
> > > > > On 05/31/2018 04:41 PM, Peter Schiffer (peter+sogo@pschiffer.
> > > > > eu)
> > > > > wrote:
> > > > > > Hi all,
> > > > > > 
> > > > > > I've noticed recently, that when using sogo web ui, emails
> > > > > > from
> > > > > > trash
> > > > > > folder are automatically deleted after ~7 days. This wasn't
> > > > > > happening
> > > > > > before. I'm running sogo-4.0.0.20180528-1 from
> > > > > > SOGo/nightly/4/debian
> > > > > > repo. Version from before was 2 - 3 months older 4.0
> > > > > > 
> > > > > > In the nginx and sogo logs I see:
> > > > > > 
> > > > > > nginx-mailcow_1  | someip - - [23/May/2018:12:46:11
> > > > > > +0200]
> > > > > > "POST
> > > > > > /SOGo/so/some@mailbox/Mail/0/folderINBOX/expunge HTTP/2.0"
> > > > > > 200
> > > > > > 58
> > > > > > "http
> > > > > > s://hostname/SOGo/so/some@mailbox/Mail/view" "Mozilla/5.0
> > > > > > (X11;
> > > > > > Fedora;
> > > > > > Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.0"
> > > > > > ...
> > > > > > so

Re: [SOGo] email are deleted from trash after ~7days

2018-06-01 Thread Peter Schiffer
Sure, but nothing:

root@host:/# ls -lh /usr/local/etc/dovecot/
total 20K
-rw-r--r--. 1 root root   52 May 31 22:51 dovecot-master.passwd
-rw-r--r--. 1 root root 7.4K May 31 00:09 dovecot.conf
-rw-r--r--. 1 root root   28 May 23 00:35 extra.conf
-rw-r--r--. 1 root root  413 May 14  2017 sieve_after
drwxr-xr-x. 2 root root  215 Nov 16  2017 sql
root@host:/# grep -R expire /usr/local/etc/dovecot/
root@host:/#

peter

On Fri, 2018-06-01 at 09:32 +0300, devteam wrote:
> Can you run: grep -R expire /etc/dovecot/ ?
> 
> 
> On 05/31/2018 08:21 PM, Peter Schiffer (peter+s...@pschiffer.eu)
> wrote:
> > Hi,
> > 
> > thank you for your reply, but I don't have expire plugin enabled in
> > dovecot. See attachment for output of doveconf -n.
> > 
> > What else could be a reason here?
> > 
> > Thanks,
> > 
> > peter
> > 
> > On Thu, 2018-05-31 at 17:36 +0300, devteam wrote:
> > > Hi,
> > > 
> > > /etc/dovecot/dovecot.conf
> > > 
> > > plugin: expire
> > > 
> > > expire = Trash 7 Trash/*7 Junk 30
> > > 
> > > 
> > > 
> > > On 05/31/2018 04:41 PM, Peter Schiffer (peter+s...@pschiffer.eu)
> > > wrote:
> > > > Hi all,
> > > > 
> > > > I've noticed recently, that when using sogo web ui, emails from
> > > > trash
> > > > folder are automatically deleted after ~7 days. This wasn't
> > > > happening
> > > > before. I'm running sogo-4.0.0.20180528-1 from
> > > > SOGo/nightly/4/debian
> > > > repo. Version from before was 2 - 3 months older 4.0
> > > > 
> > > > In the nginx and sogo logs I see:
> > > > 
> > > > nginx-mailcow_1  | someip - - [23/May/2018:12:46:11 +0200]
> > > > "POST
> > > > /SOGo/so/some@mailbox/Mail/0/folderINBOX/expunge HTTP/2.0" 200
> > > > 58
> > > > "http
> > > > s://hostname/SOGo/so/some@mailbox/Mail/view" "Mozilla/5.0 (X11;
> > > > Fedora;
> > > > Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.0"
> > > > ...
> > > > sogo-mailcow_1   | May 23 12:46:11 ccec35332334 sogod [43]:
> > > > someip
> > > > "POST /SOGo/so/some@mailbox/Mail/0/folderINBOX/expunge
> > > > HTTP/1.0"
> > > > 200
> > > > 58/0 0.291 - - 0
> > > > 
> > > > 
> > > > And then in the dovecot logs:
> > > > 
> > > > May 29 08:02:17 hostname dovecot: imap(some@mail)<7725> > > > tL+J
> > > > T0CE
> > > > 8>: Debug: imapsieve: mailbox Trash: FLAG event (changed flags:
> > > > \Deleted)
> > > > ...
> > > > dovecot-mailcow_1| May 23 12:46:39 hostname dovecot:
> > > > imap(some@
> > > > mail
> > > > box)<11088>: Logged out in=221 out=30927
> > > > deleted=473
> > > > expunged=473 trashed=0 hdr_count=0 hdr_bytes=0 body_count=0
> > > > body_bytes=0
> > > > 
> > > > 
> > > > I need to turn this off :-) I don't want to delete anything
> > > > automatically, but I wasn't able to find anything related in
> > > > documentation.
> > > > 
> > > > Also I suspect, that clients connected via active-sync are also
> > > > doing
> > > > this, without specific email client configured to do so. I've
> > > > verified
> > > > that the final email clients (Thunderbird, Evolution, Email on
> > > > Android)
> > > > don't have such options enabled (auto empty trash, expunge on
> > > > logout,
> > > > etc).
> > > > 
> > > > Sogo configuration can be found here:
> > > > https://github.com/pschiffe/mailcow-dockerized/tree/master/data
> > > > /con
> > > > f/sogo
> > > > 
> > > > Thanks in advance,
> > > > 
> > > > peter
-- 
users@sogo.nu
https://inverse.ca/sogo/lists


Re: [SOGo] email are deleted from trash after ~7days

2018-05-31 Thread Peter Schiffer
Hi,

thank you for your reply, but I don't have expire plugin enabled in
dovecot. See attachment for output of doveconf -n.

What else could be a reason here?

Thanks,

peter

On Thu, 2018-05-31 at 17:36 +0300, devteam wrote:
> Hi,
> 
> /etc/dovecot/dovecot.conf
> 
> plugin: expire
> 
> expire = Trash 7 Trash/*7 Junk 30
> 
> 
> 
> On 05/31/2018 04:41 PM, Peter Schiffer (peter+s...@pschiffer.eu)
> wrote:
> > Hi all,
> > 
> > I've noticed recently, that when using sogo web ui, emails from
> > trash
> > folder are automatically deleted after ~7 days. This wasn't
> > happening
> > before. I'm running sogo-4.0.0.20180528-1 from
> > SOGo/nightly/4/debian
> > repo. Version from before was 2 - 3 months older 4.0
> > 
> > In the nginx and sogo logs I see:
> > 
> > nginx-mailcow_1  | someip - - [23/May/2018:12:46:11 +0200]
> > "POST
> > /SOGo/so/some@mailbox/Mail/0/folderINBOX/expunge HTTP/2.0" 200 58
> > "http
> > s://hostname/SOGo/so/some@mailbox/Mail/view" "Mozilla/5.0 (X11;
> > Fedora;
> > Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.0"
> > ...
> > sogo-mailcow_1   | May 23 12:46:11 ccec35332334 sogod [43]:
> > someip
> > "POST /SOGo/so/some@mailbox/Mail/0/folderINBOX/expunge HTTP/1.0"
> > 200
> > 58/0 0.291 - - 0
> > 
> > 
> > And then in the dovecot logs:
> > 
> > May 29 08:02:17 hostname dovecot: imap(some@mail)<7725> > T0CE
> > 8>: Debug: imapsieve: mailbox Trash: FLAG event (changed flags:
> > \Deleted)
> > ...
> > dovecot-mailcow_1| May 23 12:46:39 hostname dovecot: imap(some@
> > mail
> > box)<11088>: Logged out in=221 out=30927
> > deleted=473
> > expunged=473 trashed=0 hdr_count=0 hdr_bytes=0 body_count=0
> > body_bytes=0
> > 
> > 
> > I need to turn this off :-) I don't want to delete anything
> > automatically, but I wasn't able to find anything related in
> > documentation.
> > 
> > Also I suspect, that clients connected via active-sync are also
> > doing
> > this, without specific email client configured to do so. I've
> > verified
> > that the final email clients (Thunderbird, Evolution, Email on
> > Android)
> > don't have such options enabled (auto empty trash, expunge on
> > logout,
> > etc).
> > 
> > Sogo configuration can be found here:
> > https://github.com/pschiffe/mailcow-dockerized/tree/master/data/con
> > f/sogo
> > 
> > Thanks in advance,
> > 
> > peter
> 
> 
-- 
users@sogo.nu
https://inverse.ca/sogo/lists# doveconf -n
# 2.3.1 (8e2f634): /usr/local/etc/dovecot/dovecot.conf
# Pigeonhole version 0.5.1 (d9bc6dfe)
doveconf: Warning: service auth { client_limit=1000 } is lower than required 
under max. load (2000)
doveconf: Warning: service anvil { client_limit=1000 } is lower than required 
under max. load (1603)
# OS: Linux 3.10.0-862.3.2.el7.x86_64 x86_64 Debian 9.4 
auth_debug = yes
auth_master_user_separator = *
auth_mechanisms = plain login
default_process_limit = 400
dict {
  sieve_after = 
mysql:/usr/local/etc/dovecot/sql/dovecot-dict-sql-sieve_after.conf
  sieve_before = 
mysql:/usr/local/etc/dovecot/sql/dovecot-dict-sql-sieve_before.conf
  sqlquota = mysql:/usr/local/etc/dovecot/sql/dovecot-dict-sql-quota.conf
}
listen = *,[::]
log_timestamp = "%Y-%m-%d %H:%M:%S "
login_log_format_elements = user=<%u> method=%m rip=%r lip=%l mpid=%e %c %k
mail_attribute_dict = file:%h/dovecot-attributes
mail_debug = yes
mail_home = /var/vmail/%d/%n
mail_location = maildir:~/
mail_max_userip_connections = 500
mail_plugins = quota acl zlib listescape old_stats
mail_prefetch_count = 30
mail_shared_explicit_inbox = yes
managesieve_notify_capability = mailto
managesieve_sieve_capability = fileinto reject envelope encoded-character 
vacation subaddress comparator-i;ascii-numeric relational regex imap4flags copy 
include variables body enotify environment mailbox date index ihave duplicate 
mime foreverypart extracttext imapsieve vnd.dovecot.imapsieve
namespace {
  list = children
  location = maildir:%%h/:INDEX=~/Shared/%%u:INDEXPVT=~/Shared/%%u
  prefix = Shared/%%u/
  separator = /
  subscriptions = no
  type = shared
}
namespace inbox {
  inbox = yes
  location = 
  mailbox Archief {
special_use = \Archive
  }
  mailbox Archiv {
special_use = \Archive
  }
  mailbox Archive {
auto = subscribe
special_use = \Archive
  }
  mailbox Archives {
special_use = \Archive
  }
  mailbox Arquivo {
special_use = \Archive
  }
  mailbox Arquivos {
special_use = \Archive
  }
  mailbox Concepten {
special_use = \Drafts
  }
  mailbox "Deleted Items" {
special_us

[SOGo] email are deleted from trash after ~7days

2018-05-31 Thread Peter Schiffer
Hi all,

I've noticed recently, that when using sogo web ui, emails from trash
folder are automatically deleted after ~7 days. This wasn't happening
before. I'm running sogo-4.0.0.20180528-1 from SOGo/nightly/4/debian
repo. Version from before was 2 - 3 months older 4.0

In the nginx and sogo logs I see:

nginx-mailcow_1  | someip - - [23/May/2018:12:46:11 +0200] "POST
/SOGo/so/some@mailbox/Mail/0/folderINBOX/expunge HTTP/2.0" 200 58 "http
s://hostname/SOGo/so/some@mailbox/Mail/view" "Mozilla/5.0 (X11; Fedora;
Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.0"
...
sogo-mailcow_1   | May 23 12:46:11 ccec35332334 sogod [43]: someip
"POST /SOGo/so/some@mailbox/Mail/0/folderINBOX/expunge HTTP/1.0" 200
58/0 0.291 - - 0


And then in the dovecot logs:

May 29 08:02:17 hostname dovecot: imap(some@mail)<7725>: Debug: imapsieve: mailbox Trash: FLAG event (changed flags:
\Deleted)
...
dovecot-mailcow_1| May 23 12:46:39 hostname dovecot: imap(some@mail
box)<11088>: Logged out in=221 out=30927 deleted=473
expunged=473 trashed=0 hdr_count=0 hdr_bytes=0 body_count=0
body_bytes=0


I need to turn this off :-) I don't want to delete anything
automatically, but I wasn't able to find anything related in
documentation.

Also I suspect, that clients connected via active-sync are also doing
this, without specific email client configured to do so. I've verified
that the final email clients (Thunderbird, Evolution, Email on Android)
don't have such options enabled (auto empty trash, expunge on logout,
etc).

Sogo configuration can be found here:
https://github.com/pschiffe/mailcow-dockerized/tree/master/data/conf/sogo

Thanks in advance,

peter
-- 
users@sogo.nu
https://inverse.ca/sogo/lists