Version 9 (modified by Ross, 9 years ago) (diff)



This command moves emails out of user inbox and into an archived mailbox, leaving 1000 emails in the inbox by default. It must be run as the designated user not as root.

To change user use:

servername:~# su - username

To view Maildir use:

username@servername:~$ ls -a Maildir/

To see the directories that exist and space being used

username@server:~$ du -h Maildir/ | sort -h

To see how many emails are in the inbox use:

username@server:~$ ls -l Maildir/cur/ | wc -l

Then run command:


Optionally you can run the command such that it leaves a different number of emails in the in box with this syntax:

# MAX_MESSAGES=2000 mf-split-mailbox

To confirm split has worked, re-run:

username@server:~$ ls -l Maildir/cur/ | wc -l

Now run:

ls -a Maildir/

Look for new directory for the moved directory with date, something like:


Then respond to member ticket with the name of the directory that all the mail has been moved to.

Where 2000 above is the number of emails to leave in the inbox.

<< MayFirst Commands