{"id":567,"date":"2016-03-11T19:25:06","date_gmt":"2016-03-11T19:25:06","guid":{"rendered":"http:\/\/wp-p3d2tsa2xh.pairsite.com\/?p=567"},"modified":"2020-02-27T09:30:48","modified_gmt":"2020-02-27T14:30:48","slug":"archivemail","status":"publish","type":"ht_kb","link":"https:\/\/www.pair.com\/support\/kb\/archivemail\/","title":{"rendered":"How to Use archivemail"},"content":{"rendered":"<p class=\"p1\"><span class=\"s1\"><a style=\"color:#fff; text-decoration:none!important;\" href=\"https:\/\/www.pair.com\/support\/kb\/tags\/shared-hosting\/\"><p style=\"background-color:#1a3d6e !important;color:#fff;padding:6px; display:inline-block!important;font-size:12px;font-weight:bold; border-radius:3px;\">Shared<\/p><\/a><\/span><\/p>\n<h3>Introduction<\/h3>\n<p>The archivemail utility is used to archive and compress email, and can be used by all Shared Hosting account types.<\/p>\n<p class=\"p1\">In its default form, archivemail will move messages older than a specified number of days to a compressed archive file to download from your server. You can also use archivemail to simply delete messages.<\/p>\n<h3>Syntax<\/h3>\n<p>The syntax for the archivemail command is:<\/p>\n<pre>archivemail [options] {mailbox}<\/pre>\n<h3>Options<\/h3>\n<p>There are many options for archivemail. To see them all, just run the archivemail by itself with no arguments.<\/p>\n<p>Some of the most common options are below.<\/p>\n<p>The following two options let you specify the date before which to archive messages. You can use one option or the other, but not both:<\/p>\n<pre>-d NUMBER<\/pre>\n<p>For example:<\/p>\n<p>-d 365 {mailbox} will archive messages older than 365 days (one year).<\/p>\n<p>or<\/p>\n<pre>-D DATE<\/pre>\n<p>For example:<\/p>\n<p>-D 2005-03-11 will archive messages that predate March 3rd, 2005.<\/p>\n<p>Note the acceptable formats for dates. You may use ISO format (YEAR-MM-DD) or Internet format: DD Mon YYYY<\/p>\n<pre>-n<\/pre>\n<p>-n will do a \"dry run\" of the archivemail command, showing what would have happened if you had done the command \"for real\". This can be useful when learning the command or when using the command just to get info about your mailbox.<\/p>\n<p>Using the -n command before using archivemail\u00a0in a delete capacity\u00a0can also help you avoid doing something disastrous.<\/p>\n<pre>-u<\/pre>\n<p>This will skip unread messages.<\/p>\n<pre>--delete<\/pre>\n    \t\t<div class=\"hts-messages hts-messages--danger  hts-messages--withtitle hts-messages--withicon \"   >\r\n    \t\t\t<span class=\"hts-messages__title\">Warning<\/span>    \t\t\t    \t\t\t\t<p>\r\n    \t\t\t\t\tThis can have disastrous effects. Please be absolutely certain you know what you are doing before using archivemail to delete mail. Deletion is permanent. We are unable to restore permanently deleted files.    \t\t\t\t<\/p>\r\n    \t\t\t    \t\t\t\r\n    \t\t<\/div><!-- \/.ht-shortcodes-messages -->\r\n    \t\t\n<p>This option will cause archivemail to operate in a deleting, rather than archiving, capacity. Messages will be permanently deleted and will not be eligible for restoration.<\/p>\n<h3>Mailbox\u00a0Format<\/h3>\n<p>The last part of the archivemail is the {mailbox} component.<\/p>\n<p>You'll need some information specific to your mailbox:<\/p>\n<ul>\n<li>The email address associated with the mailbox. For example, this might be <strong>me@example.com<\/strong>.<\/li>\n<li>The password for the mailbox. Let's use the fictional password\u00a0<strong>P7qxZnM4<\/strong> for our examples.<\/li>\n<li>Your email server. This is typically <strong>username.mail.pairserver.com<\/strong>, substituting your Pair Networks account username.<strong>\u00a0<\/strong>If you're unsure, check out our <a href=\"https:\/\/www.pair.com\/support\/kb\/setting-up-an-e-mail-reader\/\" target=\"_blank\" rel=\"noopener noreferrer\">article on setting up an email reader<\/a>.<\/li>\n<li>The name of the mailbox itself. To archive your main mailbox, you'll typically use <strong>inbox<\/strong>. You can specify other custom mailboxes you've made or mailboxes like <strong>trash<\/strong> and <strong>spam<\/strong>. We'll use\u00a0<strong>inbox<\/strong> for our examples.<\/li>\n<\/ul>\n<p>You'll also need to specify a protocol. In many cases, this will be <strong>imaps:\/\/<\/strong><\/p>\n<h4>Putting it all together<\/h4>\n<p>To run the archivemail command on me@example.com's inbox, with password\u00a0P7qxZnM4, on mail server exampleguy.mail.pairserver.com you'd enter the following as the {mailbox} argument:<\/p>\n<p>imaps:\/\/me@example.com:P7qxZnM4@exampleguy.mail.pairserver.com\/inbox<\/p>\n<h3>A Warning About\u00a0\/usr\/tmp<\/h3>\n<p class=\"p1\">When running archivemail it makes use of \/usr\/tmp on the server it is being run from. When trying to archive too many messages at once, you may cause \/usr\/tmp to fill up and the command may fail. If this happens, consider\u00a0using the -d option to set a threshold, starting with very old messages, and then progressing through\u00a0to new messages in more manageable 365- or 180-day chunks.<\/p>\n<h3>Examples<\/h3>\n<p>Our examples will use the fictional mailbox described above.<\/p>\n<p>Let's take a simple archive of last year's mail (and earlier, if any):<\/p>\n<pre>archivemail -D 2016-01-01 imaps:\/\/me@example.com:P7qxZnM4@exampleguy.mail.pairserver.com\/inbox<\/pre>\n<p>Let's check how much space we're using up by hoarding messages that are over 30 days old:<\/p>\n<pre>archivemail -n -d 30\u00a0imaps:\/\/me@example.com:P7qxZnM4@exampleguy.mail.pairserver.com\/inbox<\/pre>\n<p>Having taken the time to consider the consequences of permanent deletion, let's clear up valuable disk space on our account by getting rid of old spam messages:<\/p>\n<pre>archivemail --delete\u00a0imaps:\/\/me@example.com:P7qxZnM4@exampleguy.mail.pairserver.com\/spam<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Introduction The archivemail utility is used to archive and compress email, and can be used by all Shared Hosting account types. In its default form, archivemail will move messages older than a specified number of days to a compressed archive file to download from your server. You can also use&#8230;<\/p>\n","protected":false},"author":12,"comment_status":"closed","ping_status":"open","template":"","format":"standard","meta":[],"ht-kb-category":[6],"ht-kb-tag":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v21.8.1 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to Use archivemail - Knowledge Base - Pair Networks<\/title>\n<meta name=\"description\" content=\"The archivemail utility is used to archive and compress email, and can be used by all Shared Hosting account types. In its default form, archivemail will move messages older than a specified number of days to a compressed archive file to download from your server. You can also use archivemail to simply delete messages.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.pair.com\/support\/kb\/archivemail\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Use archivemail - Knowledge Base - Pair Networks\" \/>\n<meta property=\"og:description\" content=\"The archivemail utility is used to archive and compress email, and can be used by all Shared Hosting account types. In its default form, archivemail will move messages older than a specified number of days to a compressed archive file to download from your server. You can also use archivemail to simply delete messages.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.pair.com\/support\/kb\/archivemail\/\" \/>\n<meta property=\"og:site_name\" content=\"Knowledge Base - Pair Networks\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/pairnetworks\/\" \/>\n<meta property=\"article:modified_time\" content=\"2020-02-27T14:30:48+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:site\" content=\"@pairNetworks\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.pair.com\/support\/kb\/archivemail\/\",\"url\":\"https:\/\/www.pair.com\/support\/kb\/archivemail\/\",\"name\":\"How to Use archivemail - Knowledge Base - Pair Networks\",\"isPartOf\":{\"@id\":\"https:\/\/www.pair.com\/support\/kb\/#website\"},\"datePublished\":\"2016-03-11T19:25:06+00:00\",\"dateModified\":\"2020-02-27T14:30:48+00:00\",\"description\":\"The archivemail utility is used to archive and compress email, and can be used by all Shared Hosting account types. In its default form, archivemail will move messages older than a specified number of days to a compressed archive file to download from your server. You can also use archivemail to simply delete messages.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.pair.com\/support\/kb\/archivemail\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.pair.com\/support\/kb\/archivemail\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.pair.com\/support\/kb\/archivemail\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.pair.com\/support\/kb\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Use archivemail\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.pair.com\/support\/kb\/#website\",\"url\":\"https:\/\/www.pair.com\/support\/kb\/\",\"name\":\"Knowledge Base - Pair Networks\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/www.pair.com\/support\/kb\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.pair.com\/support\/kb\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.pair.com\/support\/kb\/#organization\",\"name\":\"Pair Networks\",\"url\":\"https:\/\/www.pair.com\/support\/kb\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.pair.com\/support\/kb\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.pair.com\/support\/kb\/wp-content\/uploads\/2022\/02\/Gb_TUkUE_400x400.jpeg\",\"contentUrl\":\"https:\/\/www.pair.com\/support\/kb\/wp-content\/uploads\/2022\/02\/Gb_TUkUE_400x400.jpeg\",\"width\":360,\"height\":360,\"caption\":\"Pair Networks\"},\"image\":{\"@id\":\"https:\/\/www.pair.com\/support\/kb\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/pairnetworks\/\",\"https:\/\/twitter.com\/pairNetworks\",\"https:\/\/www.instagram.com\/pairnetworks\/\",\"https:\/\/www.linkedin.com\/company\/2269676\/\",\"https:\/\/www.pinterest.com\/pairnetworksinc\/pins\/\",\"https:\/\/www.youtube.com\/user\/pairnetworks\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Use archivemail - Knowledge Base - Pair Networks","description":"The archivemail utility is used to archive and compress email, and can be used by all Shared Hosting account types. In its default form, archivemail will move messages older than a specified number of days to a compressed archive file to download from your server. You can also use archivemail to simply delete messages.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.pair.com\/support\/kb\/archivemail\/","og_locale":"en_US","og_type":"article","og_title":"How to Use archivemail - Knowledge Base - Pair Networks","og_description":"The archivemail utility is used to archive and compress email, and can be used by all Shared Hosting account types. In its default form, archivemail will move messages older than a specified number of days to a compressed archive file to download from your server. You can also use archivemail to simply delete messages.","og_url":"https:\/\/www.pair.com\/support\/kb\/archivemail\/","og_site_name":"Knowledge Base - Pair Networks","article_publisher":"https:\/\/www.facebook.com\/pairnetworks\/","article_modified_time":"2020-02-27T14:30:48+00:00","twitter_card":"summary_large_image","twitter_site":"@pairNetworks","twitter_misc":{"Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.pair.com\/support\/kb\/archivemail\/","url":"https:\/\/www.pair.com\/support\/kb\/archivemail\/","name":"How to Use archivemail - Knowledge Base - Pair Networks","isPartOf":{"@id":"https:\/\/www.pair.com\/support\/kb\/#website"},"datePublished":"2016-03-11T19:25:06+00:00","dateModified":"2020-02-27T14:30:48+00:00","description":"The archivemail utility is used to archive and compress email, and can be used by all Shared Hosting account types. In its default form, archivemail will move messages older than a specified number of days to a compressed archive file to download from your server. You can also use archivemail to simply delete messages.","breadcrumb":{"@id":"https:\/\/www.pair.com\/support\/kb\/archivemail\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.pair.com\/support\/kb\/archivemail\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.pair.com\/support\/kb\/archivemail\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.pair.com\/support\/kb\/"},{"@type":"ListItem","position":2,"name":"How to Use archivemail"}]},{"@type":"WebSite","@id":"https:\/\/www.pair.com\/support\/kb\/#website","url":"https:\/\/www.pair.com\/support\/kb\/","name":"Knowledge Base - Pair Networks","description":"","publisher":{"@id":"https:\/\/www.pair.com\/support\/kb\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.pair.com\/support\/kb\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.pair.com\/support\/kb\/#organization","name":"Pair Networks","url":"https:\/\/www.pair.com\/support\/kb\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.pair.com\/support\/kb\/#\/schema\/logo\/image\/","url":"https:\/\/www.pair.com\/support\/kb\/wp-content\/uploads\/2022\/02\/Gb_TUkUE_400x400.jpeg","contentUrl":"https:\/\/www.pair.com\/support\/kb\/wp-content\/uploads\/2022\/02\/Gb_TUkUE_400x400.jpeg","width":360,"height":360,"caption":"Pair Networks"},"image":{"@id":"https:\/\/www.pair.com\/support\/kb\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/pairnetworks\/","https:\/\/twitter.com\/pairNetworks","https:\/\/www.instagram.com\/pairnetworks\/","https:\/\/www.linkedin.com\/company\/2269676\/","https:\/\/www.pinterest.com\/pairnetworksinc\/pins\/","https:\/\/www.youtube.com\/user\/pairnetworks"]}]}},"_links":{"self":[{"href":"https:\/\/www.pair.com\/support\/kb\/wp-json\/wp\/v2\/ht-kb\/567"}],"collection":[{"href":"https:\/\/www.pair.com\/support\/kb\/wp-json\/wp\/v2\/ht-kb"}],"about":[{"href":"https:\/\/www.pair.com\/support\/kb\/wp-json\/wp\/v2\/types\/ht_kb"}],"author":[{"embeddable":true,"href":"https:\/\/www.pair.com\/support\/kb\/wp-json\/wp\/v2\/users\/12"}],"replies":[{"embeddable":true,"href":"https:\/\/www.pair.com\/support\/kb\/wp-json\/wp\/v2\/comments?post=567"}],"version-history":[{"count":15,"href":"https:\/\/www.pair.com\/support\/kb\/wp-json\/wp\/v2\/ht-kb\/567\/revisions"}],"predecessor-version":[{"id":7487,"href":"https:\/\/www.pair.com\/support\/kb\/wp-json\/wp\/v2\/ht-kb\/567\/revisions\/7487"}],"wp:attachment":[{"href":"https:\/\/www.pair.com\/support\/kb\/wp-json\/wp\/v2\/media?parent=567"}],"wp:term":[{"taxonomy":"ht_kb_category","embeddable":true,"href":"https:\/\/www.pair.com\/support\/kb\/wp-json\/wp\/v2\/ht-kb-category?post=567"},{"taxonomy":"ht_kb_tag","embeddable":true,"href":"https:\/\/www.pair.com\/support\/kb\/wp-json\/wp\/v2\/ht-kb-tag?post=567"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}