I have configured autoexpunge on some folders:
namespace inbox { inbox = yes location = mailbox Junk { auto = subscribe autoexpunge = 30 days special_use = \Junk } mailbox Trash { auto = subscribe autoexpunge = 2 weeks special_use = \Trash } prefix = separator = / }
After adding these and restarting, logging in and out several times, I still see messages days/weeks past the autoexpunge setting. I checked the logs but never see any autoexpunge messages logged. Is there something else that needs to be set to trigger this?
-- Robert inoc.net!rblayzor XMPP: rblayzor.AT.inoc.net PGP Key: 78BEDCE1 @ pgp.mit.edu
Hi Robert,
the autoexpunge feature only removes mails wich have the \Delete Flag so no deletion of mails wich doesn't have this Flag(see https://tools.ietf.org/html/rfc4315#section-2.1 or http://wiki2.dovecot.org/Tools/Doveadm/Expunge)
you could run a cron job with a doveadm move comando to move the mail to an othe mailbox (see http://wiki2.dovecot.org/Tools/Doveadm/Move)
greetings dominik
Am 22.12.2015 um 13:32 schrieb Robert Blayzor:
I have configured autoexpunge on some folders:
namespace inbox { inbox = yes location = mailbox Junk { auto = subscribe autoexpunge = 30 days special_use = \Junk } mailbox Trash { auto = subscribe autoexpunge = 2 weeks special_use = \Trash } prefix = separator = / }
After adding these and restarting, logging in and out several times, I still see messages days/weeks past the autoexpunge setting. I checked the logs but never see any autoexpunge messages logged. Is there something else that needs to be set to trigger this?
-- Robert inoc.net!rblayzor XMPP: rblayzor.AT.inoc.net PGP Key: 78BEDCE1 @ pgp.mit.edu
On Dec 22, 2015, at 9:49 AM, Dominik Breu <dominik@dominikbreu.de> wrote: the autoexpunge feature only removes mails wich have the \Delete Flag so no deletion of mails wich doesn't have this Flag(see https://tools.ietf.org/html/rfc4315#section-2.1 or http://wiki2.dovecot.org/Tools/Doveadm/Expunge)
you could run a cron job with a doveadm move comando to move the mail to an othe mailbox (see http://wiki2.dovecot.org/Tools/Doveadm/Move)
Ok, but that’s not how the documentation for expire or this features reads. According to the docs it’s based off the “saved timestamp”, not a deleted flag? So it’s based off “saved timestamp” *and* deleted flag?
-- Robert inoc.net!rblayzor XMPP: rblayzor.AT.inoc.net PGP Key: 78BEDCE1 @ pgp.mit.edu
On 22.12.2015 19:24, Robert Blayzor wrote:
On Dec 22, 2015, at 9:49 AM, Dominik Breu <dominik@dominikbreu.de> wrote: the autoexpunge feature only removes mails wich have the \Delete Flag so no deletion of mails wich doesn't have this Flag(see https://tools.ietf.org/html/rfc4315#section-2.1 or http://wiki2.dovecot.org/Tools/Doveadm/Expunge)
you could run a cron job with a doveadm move comando to move the mail to an othe mailbox (see http://wiki2.dovecot.org/Tools/Doveadm/Move)
Ok, but that’s not how the documentation for expire or this features reads. According to the docs it’s based off the “saved timestamp”, not a deleted flag? So it’s based off “saved timestamp” *and* deleted flag? The autoexpunge feature does not check the \Deleted flag.
Are any errors logged in "doveadm log errors"? Could you post your complete output of doveconf -n please.
br, Teemu Huovila
On Dec 22, 2015, at 2:56 PM, Teemu Huovila <teemu.huovila@dovecot.fi> wrote:
The autoexpunge feature does not check the \Deleted flag.
Are any errors logged in "doveadm log errors"? Could you post your complete output of doveconf -n please.
That’s what I thought. If I run expunge from doveadm manually, it will work as expected. I just never seem to get autoexpunge to fire.
Looking in the logs, I see no errors:
Below is the config…
-- Robert inoc.net!rblayzor XMPP: rblayzor.AT.inoc.net PGP Key: 78BEDCE1 @ pgp.mit.edu
# 2.2.21 (5345f22): /usr/local/etc/dovecot/dovecot.conf
# Pigeonhole version 0.4.9 (357ac0a0e68b+)
# OS: FreeBSD 10.2-RELEASE-p8 amd64
doveconf: Warning: Dovecot was last started using /etc/dovecot/dovecot.conf, but this config is /usr/local/etc/dovecot/dovecot.conf
auth_mechanisms = plain login
disable_plaintext_auth = no
lda_mailbox_autocreate = yes
lda_mailbox_autosubscribe = yes
mail_location = maildir:~/Maildir
mail_plugins = zlib
mail_temp_dir = /var/tmp
mailbox_list_index = yes
managesieve_sieve_capability = fileinto reject envelope encoded-character vacation subaddress comparator-i;ascii-numeric relational regex imap4flags copy include variables body environment mailbox date index ihave duplicate
namespace inbox {
inbox = yes
location =
mailbox Archive {
auto = subscribe
special_use = \Archive
}
mailbox Drafts {
auto = subscribe
special_use = \Drafts
}
mailbox Junk {
auto = subscribe
autoexpunge = 30 days
special_use = \Junk
}
mailbox Sent {
auto = subscribe
special_use = \Sent
}
mailbox Trash {
auto = subscribe
autoexpunge = 2 weeks
special_use = \Trash
}
prefix =
}
passdb {
driver = pam
}
plugin {
sieve = ~/.dovecot.sieve
sieve_default = /etc/dovecot/sieve/default.sieve
sieve_dir = ~/.sieve.d
sieve_extensions = -enotify
sieve_global_dir = /etc/dovecot/sieve/global/
zlib_save = xz
zlib_save_level = 6
}
protocols = imap pop3 lmtp sieve
service auth {
unix_listener auth-client {
mode = 0660
user = mailnull
}
}
service lmtp {
unix_listener lmtp {
mode = 0666
}
}
service managesieve-login {
inet_listener sieve {
port = 4190
}
service_count = 1
}
service managesieve {
process_limit = 100
}
ssl_cipher_list = ALL:-SSLv3:!ADH:RC4+RSA:+HIGH:+MEDIUM:-LOW:-SSLv2:-EXP
ssl_protocols = !SSLv2 !SSLv3
userdb {
driver = passwd
}
protocol lmtp {
auth_username_format = %Ln
mail_plugins = zlib sieve
}
protocol lda {
mail_plugins = zlib sieve
}
protocol imap {
mail_max_userip_connections = 10
mail_plugins = zlib
}
protocol pop3 {
mail_max_userip_connections = 2
mail_plugins = zlib
}
protocol sieve {
mail_max_userip_connections = 3
managesieve_implementation_string = Dovecot
managesieve_max_line_length = 65536
}
On 22 Dec 2015, at 22:23, Robert Blayzor <rblayzor.bulk@inoc.net> wrote:
On Dec 22, 2015, at 2:56 PM, Teemu Huovila <teemu.huovila@dovecot.fi> wrote:
The autoexpunge feature does not check the \Deleted flag.
Are any errors logged in "doveadm log errors"? Could you post your complete output of doveconf -n please.
That’s what I thought. If I run expunge from doveadm manually, it will work as expected. I just never seem to get autoexpunge to fire.
..
mailbox Trash { auto = subscribe autoexpunge = 2 weeks special_use = \Trash }
So this keeps finding mails that aren't being automatically deleted? (You were testing with savedbefore, right?) :
doveadm search -u user@domain mailbox Trash savedbefore 2w
If that works, try if it happens to work with mailbox_list_index=no? Maybe the index somehow got messed up. If that works, send the output of:
doveadm dump /path/to/Maildir/dovecot.list.index
The dump includes folder names, so maybe send it privately.
On Dec 23, 2015, at 3:17 AM, Timo Sirainen <tss@iki.fi> wrote:
So this keeps finding mails that aren't being automatically deleted? (You were testing with savedbefore, right?) :
doveadm search -u user@domain mailbox Trash savedbefore 2w
If that works, try if it happens to work with mailbox_list_index=no? Maybe the index somehow got messed up. If that works, send the output of:
doveadm dump /path/to/Maildir/dovecot.list.index
The dump includes folder names, so maybe send it privately.
Thanks Timo! I will certainly try tracking things down with the suggested outputs and see if I can get more info.
On a side note regarding doveadm…
If we have two or more servers, doveadm can be executed and run on any one of the servers and things run fine. If you want to install dovecot (doveadm) on another server to be able to get information (like the commands above) from a tertiary server, is that possible? I’m just wondering if doveadm runs directly on the server with access to the maildirs and config files or if it somehow talks over a socket to the actual dovecot mail servers.
TIA
-- Robert inoc.net!rblayzor XMPP: rblayzor.AT.inoc.net PGP Key: 78BEDCE1 @ pgp.mit.edu
participants (4)
-
Dominik Breu
-
Robert Blayzor
-
Teemu Huovila
-
Timo Sirainen