command line deletion of files

Vladislav Kurz vladislav.kurz at webstep.net
Thu Sep 29 11:04:32 EDT 2016


On 09/29/16 16:32, Patrick Boutilier via Info-cyrus wrote:
> On 09/29/2016 11:27 AM, Shawn Bakhtiar via Info-cyrus wrote:
>> Good morning,
>>
>> trying to get rid of some emails that have large attachments (i.e.
>> videos sent over email, or cd images, etc...)
>>
>> Would it be proper to
>>
>> rm -rf /var/spool/imap/u/username/mailbox/4321.
>>
>> then
>>
>> reconstruct -rf user.username
>>
>> Or is there a more "proper" way using cyrus?
> 
> Not sure about deleting a single message but you can use ipurge to
> delete messages based on size. Good to use in a script to parses the
> mail spool.
> 

rm + reconstruct is IMHO ok, we use that for trash/spam cleanup,
antivirus checks, and similar things.

ipurge is nice but I would really appreciate if it had a --dry-run
option. I'm never sure what it will really delete.


-- 
Best Regards
        Vladislav Kurz



More information about the Info-cyrus mailing list