Skip to content
Snippets Groups Projects
Verified Commit 5adae994 authored by Frederik Schwan's avatar Frederik Schwan
Browse files

add dovecot cleanup timer to purge mdbox files

While mbox and maildir files get deleted by dovecot right away, that's
not the case for mdbox files. Since they contain multiple mails at once
in a proprietary format rewriting is expensive. That's why this step
is done in a separate step outside the dovecot process.
parent 8919302b
No related branches found
No related tags found
No related merge requests found
[Unit]
Description=Daily Dovecot cleanup
[Service]
Type=oneshot
ExecStart=/usr/bin/doveadm purge -A
[Unit]
Description=Daily Dovecot cleanup
[Timer]
OnCalendar=00:05:00
[Install]
WantedBy=timers.target
......@@ -42,3 +42,18 @@
when: configure_firewall
tags:
- firewall
- name: install systemd timers
copy: src={{ item }} dest=/etc/systemd/system/{{ item }} owner=root group=root mode=0644
with_items:
- dovecot-cleanup.timer
- dovecot-cleanup.service
- name: activate systemd timers
systemd:
name: "{{ item }}"
state: started
enabled: yes
daemon_reload: yes
with_items:
- dovecot-cleanup.timer
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment