Hi all,
I set up dovecot a couple of months ago and am having trouble getting
autoexpunge=30d to work on my Trash and Junk mailboxes. Not sure why not
because I'm not getting error messages in my log.
Running "doveadm search -u <user> mailbox Junk savedbefore 30d"
shows me many messages (I've got messages back to mid-May, and a couple of
other users have them back to early April, although if this setting were
working, there should be nothing earlier than June 24). Running a manual
doveadm expunge works fine... it's just autoexpunge that seems to not be
running at all.
I'm using sendmail as the MTA and procmail as the LDA, so dovecot is running
purely for IMAP/POP service.
Any help is much appreciated.
Thanks!
doveconf -n:
# 2.2.36 (1f10bfa63): /etc/dovecot/dovecot.conf
# OS: Linux 3.10.0-957.21.3.el7.x86_64 x86_64 CentOS Linux release 7.6.1810
(Core)
# Hostname: REDACTED
auth_username_format = %Ln
first_valid_uid = 1000
mail_location = mbox:~/mail:INBOX=/var/spool/mail/%u
mailbox_list_index = yes
mbox_write_locks = fcntl
namespace compat1 {
alias_for =
hidden = yes
list = no
location =
prefix = mail/
separator = /
}
namespace compat2 {
alias_for =
hidden = yes
list = no
location =
prefix = ~/mail/
separator = /
}
namespace compat3 {
alias_for =
hidden = yes
list = no
location =
prefix = ~%u/mail/
separator = /
}
namespace inbox {
inbox = yes
location =
mailbox Archive {
special_use = \Archive
}
mailbox "Deleted Messages" {
autoexpunge = 30 days
special_use = \Trash
}
mailbox Drafts {
special_use = \Drafts
}
mailbox Junk {
autoexpunge = 30 days
special_use = \Junk
}
mailbox "Junk E-mail" {
autoexpunge = 30 days
special_use = \Junk
}
mailbox Sent {
special_use = \Sent
}
mailbox "Sent Messages" {
special_use = \Sent
}
mailbox Spam {
autoexpunge = 30 days
special_use = \Junk
}
mailbox Trash {
autoexpunge = 30 days
special_use = \Trash
}
prefix =
separator = /
}
passdb {
driver = pam
}
pop3_uidl_format = %08Xv%08Xu
ssl_cert = # REDACTED
ssl_cipher_list = # REDACTED
ssl_dh_parameters_length = # REDACTED
ssl_key = # hidden, use -P to show it
ssl_prefer_server_ciphers = yes
userdb {
driver = passwd
}
--- Amir
On 25 Jul 2019, at 7.18, Amir Caspi via dovecot <dovecot at dovecot.org> wrote:> > Hi all, > > I set up dovecot a couple of months ago and am having trouble getting autoexpunge=30d to work on my Trash and Junk mailboxes. Not sure why not because I'm not getting error messages in my log. > Running "doveadm search -u <user> mailbox Junk savedbefore 30d" shows me many messages (I've got messages back to mid-May, and a couple of other users have them back to early April, although if this setting were working, there should be nothing earlier than June 24). Running a manual doveadm expunge works fine... it's just autoexpunge that seems to not be running at all.Autoexpunging tries to be efficient, so it looks only at the first email's saved-timestamp. It's also cached in dovecot.list.index. So you should check: 1. What's the first mail's saved-timestamp? doveadm fetch -u user date.saved mailbox Junk 1 2. That timestamp should also be the same in dovecot.list.index: doveadm mailbox status -u user firstsaved Junk
Hi all, Might anyone have any idea about this issue? I can run a cron job if needed but it seems like autoexpunge SHOULD be doing this automatically... Thanks! --- Amir> On Jul 24, 2019, at 10:18 PM, Amir Caspi <Cepheid at 3phase.com> wrote: > > Hi all, > > I set up dovecot a couple of months ago and am having trouble getting autoexpunge=30d to work on my Trash and Junk mailboxes. Not sure why not because I'm not getting error messages in my log. > Running "doveadm search -u <user> mailbox Junk savedbefore 30d" shows me many messages (I've got messages back to mid-May, and a couple of other users have them back to early April, although if this setting were working, there should be nothing earlier than June 24). Running a manual doveadm expunge works fine... it's just autoexpunge that seems to not be running at all. > > I'm using sendmail as the MTA and procmail as the LDA, so dovecot is running purely for IMAP/POP service. > > Any help is much appreciated. > > Thanks! > > doveconf -n: > # 2.2.36 (1f10bfa63): /etc/dovecot/dovecot.conf > # OS: Linux 3.10.0-957.21.3.el7.x86_64 x86_64 CentOS Linux release 7.6.1810 (Core) > # Hostname: REDACTED > auth_username_format = %Ln > first_valid_uid = 1000 > mail_location = mbox:~/mail:INBOX=/var/spool/mail/%u > mailbox_list_index = yes > mbox_write_locks = fcntl > namespace compat1 { > alias_for = > hidden = yes > list = no > location = > prefix = mail/ > separator = / > } > namespace compat2 { > alias_for = > hidden = yes > list = no > location = > prefix = ~/mail/ > separator = / > } > namespace compat3 { > alias_for = > hidden = yes > list = no > location = > prefix = ~%u/mail/ > separator = / > } > namespace inbox { > inbox = yes > location = > mailbox Archive { > special_use = \Archive > } > mailbox "Deleted Messages" { > autoexpunge = 30 days > special_use = \Trash > } > mailbox Drafts { > special_use = \Drafts > } > mailbox Junk { > autoexpunge = 30 days > special_use = \Junk > } > mailbox "Junk E-mail" { > autoexpunge = 30 days > special_use = \Junk > } > mailbox Sent { > special_use = \Sent > } > mailbox "Sent Messages" { > special_use = \Sent > } > mailbox Spam { > autoexpunge = 30 days > special_use = \Junk > } > mailbox Trash { > autoexpunge = 30 days > special_use = \Trash > } > prefix = > separator = / > } > passdb { > driver = pam > } > pop3_uidl_format = %08Xv%08Xu > ssl_cert = # REDACTED > ssl_cipher_list = # REDACTED > ssl_dh_parameters_length = # REDACTED > ssl_key = # hidden, use -P to show it > ssl_prefer_server_ciphers = yes > userdb { > driver = passwd > } > > > --- Amir >-------------- next part -------------- An HTML attachment was scrubbed... URL: <https://dovecot.org/pipermail/dovecot/attachments/20190808/7f58a380/attachment-0001.html>
Hello!
I have the autoexpunge settings defined inside protocol imap thus (and
it works):
protocol imap {
? mail_plugins = quota notify replication imap_quota imap_sieve
? namespace inbox {
??? location ??? mailbox Ham {
????? autoexpunge = 365 days
??? }
??? mailbox Spam {
????? autoexpunge = 365 days
??? }
??? mailbox Trash {
????? autoexpunge = 180 days
??? }
??? prefix ? }
}
Good luck,
Reio
On 08.08.2019 21:34, Amir Caspi via dovecot wrote:> Hi all,
>
> Might anyone have any idea about this issue? ?I can run a cron job if
> needed but it seems like autoexpunge SHOULD be doing this automatically...
>
> Thanks!
>
> --- Amir
>
>> On Jul 24, 2019, at 10:18 PM, Amir Caspi <Cepheid at 3phase.com
>> <mailto:Cepheid at 3phase.com>> wrote:
>>
>> Hi all,
>>
>> I set up dovecot a couple of months ago and am having trouble getting
>> autoexpunge=30d to work on my Trash and Junk mailboxes. ?Not sure why
>> not because I'm not getting error messages in my log.
>> Running "doveadm search -u <user> mailbox Junk savedbefore
30d" shows
>> me many messages (I've got messages back to mid-May, and a couple
of
>> other users have them back to early April, although if this setting
>> were working, there should be nothing earlier than June 24). ?Running
>> a manual doveadm expunge works fine... it's just autoexpunge that
>> seems to not be running at all.
>>
>> I'm using sendmail as the MTA and procmail as the LDA, so dovecot
is
>> running purely for IMAP/POP service.
>>
>> Any help is much appreciated.
>>
>> Thanks!
>>
>> doveconf -n:
>> # 2.2.36 (1f10bfa63): /etc/dovecot/dovecot.conf
>> # OS: Linux 3.10.0-957.21.3.el7.x86_64 x86_64 CentOS Linux release
>> 7.6.1810 (Core)
>> # Hostname: REDACTED
>> auth_username_format = %Ln
>> first_valid_uid = 1000
>> mail_location = mbox:~/mail:INBOX=/var/spool/mail/%u
>> mailbox_list_index = yes
>> mbox_write_locks = fcntl
>> namespace compat1 {
>> ?alias_for >> ?hidden = yes
>> ?list = no
>> ?location >> ?prefix = mail/
>> ?separator = /
>> }
>> namespace compat2 {
>> ?alias_for >> ?hidden = yes
>> ?list = no
>> ?location >> ?prefix = ~/mail/
>> ?separator = /
>> }
>> namespace compat3 {
>> ?alias_for >> ?hidden = yes
>> ?list = no
>> ?location >> ?prefix = ~%u/mail/
>> ?separator = /
>> }
>> namespace inbox {
>> ?inbox = yes
>> ?location >> ?mailbox Archive {
>> ???special_use = \Archive
>> ?}
>> ?mailbox "Deleted Messages" {
>> ???autoexpunge = 30 days
>> ???special_use = \Trash
>> ?}
>> ?mailbox Drafts {
>> ???special_use = \Drafts
>> ?}
>> ?mailbox Junk {
>> ???autoexpunge = 30 days
>> ???special_use = \Junk
>> ?}
>> ?mailbox "Junk E-mail" {
>> ???autoexpunge = 30 days
>> ???special_use = \Junk
>> ?}
>> ?mailbox Sent {
>> ???special_use = \Sent
>> ?}
>> ?mailbox "Sent Messages" {
>> ???special_use = \Sent
>> ?}
>> ?mailbox Spam {
>> ???autoexpunge = 30 days
>> ???special_use = \Junk
>> ?}
>> ?mailbox Trash {
>> ???autoexpunge = 30 days
>> ???special_use = \Trash
>> ?}
>> ?prefix >> ?separator = /
>> }
>> passdb {
>> ?driver = pam
>> }
>> pop3_uidl_format = %08Xv%08Xu
>> ssl_cert = # REDACTED
>> ssl_cipher_list = # REDACTED
>> ssl_dh_parameters_length = # REDACTED
>> ssl_key = ?# hidden, use -P to show it
>> ssl_prefer_server_ciphers = yes
>> userdb {
>> ?driver = passwd
>> }
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<https://dovecot.org/pipermail/dovecot/attachments/20190808/08b9cd33/attachment.html>