dovecot: Auto-archive unflagged messages in inbox

This commit is contained in:
Alex Palaistras 2023-08-20 11:16:35 +01:00
parent 779e6e09f9
commit 5afcea8f05
4 changed files with 33 additions and 0 deletions

View File

@ -53,6 +53,16 @@ namespace inbox {
special_use = \Sent
}
mailbox Archive {
auto = create
special_use = \Archive
}
mailbox Archives {
auto = no
special_use = \Archive
}
mailbox Trash {
auto = subscribe
special_use = \Trash

View File

@ -14,3 +14,5 @@ systemd:
enabled: true
- name: dovecot-fts-optimize.timer
enabled: true
- name: dovecot-autoarchive.timer
enabled: true

View File

@ -0,0 +1,12 @@
[Unit]
Description=Auto-archive Dovecot inbox messages
Wants=dovecot.service
After=dovecot.service
[Service]
Type=oneshot
SyslogIdentifier=%N
ExecStart=/bin/podman exec dovecot doveadm -v move -A INBOX.Archive mailbox INBOX UNFLAGGED BEFORE 2w
[Install]
WantedBy=multi-user.target

View File

@ -0,0 +1,9 @@
[Unit]
Description=Auto-archive Dovecot inbox messages
[Timer]
OnCalendar=daily
Persistent=true
[Install]
WantedBy=timers.target