Hello! I would like to expunge Inbox mailbox every 60 days This mailbox is not in the config any I try to use "doveadm expunge". But my sh configs doesn't works: Fatal: Invalid search date parameter: 60d If I enter the contents of the config directly into the console - everything works correctly the same code in sh - ends with an error.
It is bug or I do mistake?
root@mail:~# doveconf -n # 2.3.16 (7e2e900c1a): /etc/dovecot/dovecot.conf # Pigeonhole version 0.5.16 (09c29328) # OS: Linux 5.15.0-84-generic x86_64 Ubuntu 22.04.2 LTS # Hostname: mail.onelec.ru auth_mechanisms = plain login auth_verbose = yes base_dir = /run/dovecot/ disable_plaintext_auth = no log_path = /var/log/dovecot.log login_greeting = Mail Delivery Agent mail_access_groups = mail mail_location = maildir:%h/mail/%d/%n mail_privileged_group = mail namespace { inbox = yes list = yes location = mailbox Archive { auto = subscribe autoexpunge = 30 days special_use = \Archive } mailbox "Deleted Messages" { auto = no autoexpunge = 1 weeks special_use = \Trash } mailbox Drafts { auto = subscribe autoexpunge = 1 weeks special_use = \Drafts } mailbox Junk { auto = no autoexpunge = 1 weeks special_use = \Junk } mailbox Sent { auto = subscribe autoexpunge = 90 days special_use = \Sent } mailbox "Sent Mail" { auto = no autoexpunge = 90 days special_use = \Sent } mailbox "Sent Messages" { auto = no autoexpunge = 90 days special_use = \Sent } mailbox Spam { auto = subscribe autoexpunge = 1 weeks special_use = \Junk } mailbox Trash { auto = subscribe autoexpunge = 1 weeks special_use = \Trash } prefix = separator = / type = private } passdb { args = scheme=MD5-CRYPT username_format=%n /etc/exim4/domains/%d/passwd driver = passwd-file } plugin { quota = maildir:User quota } protocols = imap pop3 service auth { extra_groups = mail unix_listener auth-client { group = mail mode = 0660 user = dovecot } user = dovecot } service stats { unix_listener stats-writer { group = mail mode = 0660 user = dovecot } } ssl_cert =
Why not run a cron job every 60 days on your accounts with something like
doveadm purge -u $acc
I would like to expunge Inbox mailbox every 60 days This mailbox is not in the config any I try to use "doveadm expunge". But my sh configs doesn't works: Fatal: Invalid search date parameter: 60d If I enter the contents of the config directly into the console - everything works correctly the same code in sh - ends with an error.
It is bug or I do mistake?
root@mail:~# doveconf -n # 2.3.16 (7e2e900c1a): /etc/dovecot/dovecot.conf # Pigeonhole version 0.5.16 (09c29328) # OS: Linux 5.15.0-84-generic x86_64 Ubuntu 22.04.2 LTS # Hostname: mail.onelec.ru auth_mechanisms = plain login auth_verbose = yes base_dir = /run/dovecot/ disable_plaintext_auth = no log_path = /var/log/dovecot.log login_greeting = Mail Delivery Agent mail_access_groups = mail mail_location = maildir:%h/mail/%d/%n mail_privileged_group = mail namespace { inbox = yes list = yes location = mailbox Archive { auto = subscribe autoexpunge = 30 days special_use = \Archive } mailbox "Deleted Messages" { auto = no autoexpunge = 1 weeks special_use = \Trash } mailbox Drafts { auto = subscribe autoexpunge = 1 weeks special_use = \Drafts } mailbox Junk { auto = no autoexpunge = 1 weeks special_use = \Junk } mailbox Sent { auto = subscribe autoexpunge = 90 days special_use = \Sent } mailbox "Sent Mail" { auto = no autoexpunge = 90 days special_use = \Sent } mailbox "Sent Messages" { auto = no autoexpunge = 90 days special_use = \Sent } mailbox Spam { auto = subscribe autoexpunge = 1 weeks special_use = \Junk } mailbox Trash { auto = subscribe autoexpunge = 1 weeks special_use = \Trash } prefix = separator = / type = private } passdb { args = scheme=MD5-CRYPT username_format=%n /etc/exim4/domains/%d/passwd driver = passwd-file } plugin { quota = maildir:User quota } protocols = imap pop3 service auth { extra_groups = mail unix_listener auth-client { group = mail mode = 0660 user = dovecot } user = dovecot } service stats { unix_listener stats-writer { group = mail mode = 0660 user = dovecot } } ssl_cert =
participants (2)
-
Marc
-
Данила Колесников