[Dovecot] Please HELP: how to delete all messages older than X days from the server?

Pascal Volk user+dovecot at localhost.localdomain.org
Tue Aug 6 20:18:15 EEST 2013


On 08/06/2013 06:31 PM Răzvan Sandu wrote:
>> 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).

Use Dovecot's quota plugin - which supports different backends. Each
user may have a different quota limit.

	* http://wiki2.dovecot.org/Quota

> So I need EITHER:
> 
> 1. 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

Usually only the INBOX is visible via POP3 …

> OR
> 
> 2. an automatic, elegant but forceful method of deleting all messages 
> older than X days (incoming, sent, trash, drafts, etc.)

There is the expire plugin for Dovecot.

	* http://wiki2.dovecot.org/Plugins/Expire


> I've tried to use a line such as:
> 
> doveadm expunge -u john.doe at 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.

There is also the -A option, see
http://wiki2.dovecot.org/Tools/Doveadm/Expunge#section_options


Regards,
Pascal
-- 
The trapper recommends today: cafebabe.1321819 at localdomain.org


More information about the dovecot mailing list