Hello,
Would you please help me solve the following case?
My (CentOS) server runs dovecot and allows both POP3 and IMAP service. Users are virtual users (no home directories), with messages stored in Maildir directories under /var/spool/mail/vhosts/example.com/username
Some of them use mobile devices (without local storage space), so I must allow IMAP access, not just POP3. But the storage on the server must be for a strictly *limited* period of time.
As an admin, I'm trying to force each user to:
- download *locally* received messages when they arrive at the office
- don't let copies of messages on the server (incoming, sent, trash, drafts, etc.)
For various reasons, e-mail client configuration is not under my control (I can't rely on client configuration for implementing this).
Implementing filesystem quotas is not an option because a. presently, all virtual users share same UID/GID on the server and b. administrative reasons (the "full quota" situation may occur unexpectedly and this is not tolerable in corporate policy).
So I need EITHER:
- a method of downloading locally *all* messages from the server (incoming, sent, trash, drafts, etc.) to the workstation, when the user consults his/her mailbox from a POP3 desktop client, thus completely *emptying* the user's mailbox on the server
OR
- an automatic, elegant but forceful method of deleting all messages older than X days (incoming, sent, trash, drafts, etc.)
I've tried to use a line such as:
doveadm expunge -u john.doe@example.com before 4w
run as root, from a script in crontab, but for "expunge" doveadm won't let me skip the "-u" parameter (to perform the expunge for *all* users).
Could you please help? Any sugestion is welcomed.
Thanks a lot, Răzvan