kopano-cleanup/README.md

1.1 KiB

kopano-cleanup

The following scripts allow you to automatically delete or archive all items older than x days in a users Junk E-mail and Deleted Items folder.

Parameters

  -f NAME, --folder=NAME             Specify folder
  --user=USER                        Run script for user
  --wastebasket                      Run cleanup script for the wastebasket
                                     folder
  --archive=ARCHIVE                  instead of removing items archive them
                                     into this folder
  --junk                             Run cleanup script for the junk folder
  --force                            Force items without date to be removed
  --days=DAYS                        Delete older then x days
  --verbose                          Verbose mode
  --dry-run                          Run script in dry mode
  --progressbar                      Show progressbar

Usage

delete

python cleanup.py --user username --junk --wastebasket --days days   

archive

python cleanup.py --user username --junk --wastebasket --days days  --archive foldername