Child pages
  • The remove_dovecot_index_files Script
For cPanel & WHM version 78


Skip to end of metadata
Go to start of metadata

Overview

You can use the /usr/local/cpanel/scripts/remove_dovecot_index_files script to remove the Dovecot® index logs and cache files from cPanel mail accounts. You could use this, for example, to remove corrupted index logs and cache files or to remove files that lost synchronization during a transfer.

Note:

The Dovecot service automatically regenerates an account's index logs and cache files the next time an account logs in.


How to call the remove_dovecot_index_files script

Run the /usr/local/cpanel/scripts/remove_dovecot_index_files script with the following flags:

FlagDescriptionExample
--user

The cPanel account that owns the mailboxes from which you wish to remove Dovecot index files.

example

--resellerThe reseller account that owns the cPanel accounts which owns the mailboxes from which you wish to remove Dovecot index files.examplereseller
--allRemove Dovecot index files from all email accounts that exist on the server.N/A
--verboseReturn expanded output.N/A

Important:

The system treats each flag individually. If you pass an invalid value with a flag, the script will fail.

Example

For example, if you wish to remove the index files from every mailbox under the example account with verbose output, run the following command:

/usr/local/cpanel/scripts/remove_dovecot_index_files --user example --verbose

If the script succeeds, it will return output similar to the following example:

# /scripts/remove_dovecot_index_files --user example --verbose
...
Unlinking '/home/example/mail/.Sent/dovecot.index' …
Unlinking '/home/example/mail/.Sent/dovecot.index.log' …
Unlinking '/home/example/mail/.Drafts/dovecot.index.log' …
Unlinking '/home/example/mail/.Drafts/dovecot.index' …
Unlinking '/home/example/mail/.Junk/dovecot.index.log' …
Unlinking '/home/example/mail/.Junk/dovecot.index' …
Unlinking '/home/example/mail/.Trash/dovecot.index' …
Unlinking '/home/example/mail/.Trash/dovecot.index.log' …
Unlinking '/home/example/mail/.spam/dovecot.index.log' …
Unlinking '/home/example/mail/.spam/dovecot.index.cache' …
Unlinking '/home/example/mail/.mailbox_format.cpanel/dovecot.index.log' …
[+] 'example' processed.


Additional documentation