How our automated IMAP archiving works

Of note, the scripts below no longer function as intended. Please read Creating a Local Folder in Thunderbird to learn how to archive your IMAP emails. 

If you read our previous article, you should have a good understanding of why IMAP can cause resource usage issues on the server.

Our System Administration team has the ability to run an automated IMAP archive process for you to keep your e-mail account automatically organized to be efficient. This would run once a week and always keep your Inbox tidy with a predetermined time-frame worth of messages.

We’ve found typically 30 days is a good time-frame to set, and any messages older than 30 days would simply be moved automatically for you into an archive folder with the name of the month those messages were received.

Below you can see the way this would look in our various webmail clients:








You also have the ability to subscribe to these server-side IMAP folders from your favorite e-mail client. We already have an article explaining how to subscribe to specific IMAP folders in Outlook 2010, as well as syncing your IMAP folders on your iPhone.

The instructions should be very similar for any other mail clients. If you’re still having issues getting your mail client to subscribe to these IMAP folders, please comment below with the mail client you use, so that we can write additional articles for your specific mail client.

To have our automated IMAP archiving setup on any of your e-mail accounts for you, please open a ticket letting us know which e-mail accounts you’d like this applied to.

InMotion Hosting Contributor
InMotion Hosting Contributor Content Writer

InMotion Hosting contributors are highly knowledgeable individuals who create relevant content on new trends and troubleshooting techniques to help you achieve your online goals!

More Articles by InMotion Hosting

27 thoughts on “How our automated IMAP archiving works

    1. Hello Mike,

      Unfortunately it does not as POP does not handle seperate folders correctly. It combines them all so if you have your email account archived you should be using IMAP.

      Best Regards,
      TJ Edens

  1. my actual inbox is ussally under 150 messages. I like to hold on to my sent and trash mailboxes for work purposes for longer and it seems auto archive would work well

  2. Are there some better screen shots?

    Do I adjust the settings or does tech support?

    can I have it just archive my trash and sent folders?

    1. Unfortunately, we do not have any addition screenshots.

      Email archiving is done by technical support via a verified ticket.

      Archiving your trsh and sent folders do not typically have the performance impact that your inbox does as sent and trash folders are not accessed frequently. The reason that archiving your inbox helps is due to the entire inbox being loaded when accessing it. If the inbox is archived, only content that is being accessed in that particular archive is being loaded.

  3. I have a few questions about how Automated Archiving works.

    1. When it says inbox, does that also include trash and sent folders?

    2. Can it be set for a different time frame then 30 days?

    3. If I dont like how it effects my work flow, can I turn it off? if yes what hapens to the archived messages?

    1. The inbox does indeed include the trash and junk mail. Different time frames can indeed be set, depending on your preference as well as thresholds such as number of emails (ex: keep 100 emails and archive the rest). You may ask for email archiving to be disabled, however, it is not easily reversed.

    2. In addition, not archiving your mail if you have a large inbox using IMAP can cause resource usage so archiving your mail is typically a good idea if you have a large inbox.

  4. We have an employee that accesses his email account through Gmail (set up as iMAP). If we set his account to auto archive on the server will he be able see, as described above and for an iPhone, the the archive folders in Gmail?

  5. I had a few questions for your support staff regarding IMAP archiving and wanted to share them here for anyone else who might run into them down the line.

    1.  Does IMAP archiving result in a temporary, or permanent, increase in the amount of hard drive space the email account requires?  The cPanel documentation states the following:

    “Note: When you enable Email Archiving, the amount of disk space used can quickly double depending on the length of time you store messages. Verify that your disk drive has ample space before you enable Email Archiving”



    2.  How does your automated IMAP archiving process (I am assuming this is  email_archive_maintenance from the cPanel documentation) handle existing directories?  Are emails removed from them, and recategorized by date in Archives -> Year -> day/month folders?  Are year -> day/month folders created within each existing directory?  Or are existing directories not archived?

    3.  Is it possible to specify which directories to archive, and which directories to not archive?

    4. Your doc “Possible server resource usage problems when using IMAP“, describes how IMAP connections must loop through all of the messages in the Inbox folder, which can lead to performance issues.  Do IMAP connections also need to loop through other subscribed imap folders?

    Is the key to lower the overall number of emails in the Inbox, or is it to lower the overall number of emails in any subscribed folder which has a large number of emails?

    Thanks from Netpay!

    1. When email archiving is turned on, it will only archive the main inbox and will not affect your created folders. The subscribed email folders are also reviewed, but only when reviewed by your mail client. So in most clients, unless you click on the folder, it will not loop through the mail within it. This saves on resources as it is looping through folders only when requested.

Was this article helpful? Join the conversation!

Leap into Savings
Leap Ahead with Limited Time Deals