{"id":808,"date":"2013-01-18T21:35:16","date_gmt":"2013-01-19T02:35:16","guid":{"rendered":"https:\/\/www.inmotionhosting.com\/support\/2013\/01\/18\/manage-the-exim-mail-queue-via-ssh\/"},"modified":"2021-08-16T23:23:53","modified_gmt":"2021-08-17T03:23:53","slug":"manage-the-exim-mail-queue-via-ssh","status":"publish","type":"post","link":"https:\/\/www.inmotionhosting.com\/support\/email\/manage-the-exim-mail-queue-via-ssh\/","title":{"rendered":"Manage the Exim mail queue via SSH"},"content":{"rendered":"\n<p>In this article I&#8217;ll review how to manage your Exim mail queue on your VPS (Virtual Private Server) or dedicated server via SSH. This will allow you to find out why sent messages haven&#8217;t possibly been successfully delivered yet.<\/p>\n\n<p>The MTA (Mail Transfer Agent) that runs on your server is called Exim and it controls your email deliveries. There are certain commands your can run over SSH that will allow you to manage the Exim mail queue and we&#8217;ll be reviewing those below.<\/p>\n\n<p class=\"alert\">To follow this guide you&#8217;ll have to have <a href=\"\/support\/server\/ssh\/root-access-faq\/\">root access<\/a> to either your VPS or dedicated server so you can access the Exim commands.<\/p>\n\n<h2>Viewing messages in the Exim mail queue<\/h2>\n\n<p>Using the steps below, I&#8217;ll show you how to locate a message that we&#8217;ve attempted to send to <strong>user@example.com<\/strong>, but it hasn&#8217;t arrived yet in that user&#8217;s Inbox so we&#8217;d like to investigate why.<\/p>\n\n<ol class=\"article_list\">\n\n<li><a href=\"\/support\/server\/ssh\/how-to-login-ssh\/\" target=\"\u201d_blank\u201d\" rel=\"noopener noreferrer\">Login to your server via SSH<\/a> as the root user.<\/li>\n\n<li>Run the following command to view the current Exim mail queue:<br><code>exim -bp<\/code>\n\n<p>You should get back something that looks like:<\/p><br><code>8m 13K 1TwJgO-0001q8-E5 &lt;sender@example.com&gt; *** frozen ***<br> user@example.com\n7m 7.5K 1TwJhK-00037o-U8 &lt;sender@example.com&gt; *** frozen ***<br> user@example.com\n5m 8.0K 1TwJic-00047T-70 &lt;sender@example.com&gt; *** frozen ***<br> user@example.com\n3m 7.6K 1TwJlQ-0006MV-84 &lt;sender@example.com&gt; *** frozen ***<br> user@example.com\n<\/code>\n\n<p>In this case we can see that there are 4 messages waiting to try to deliver to <strong>user@example.com<\/strong>, but they are all frozen. This means Exim has encountered an error while trying to deliver the message, and it has frozen it, until the next delivery retry time.<\/p>\n<\/li>\n\n<li>Now you can take one of the Exim message IDs from the queue and further investigate it in the Exim mail log as to why the message can&#8217;t deliver with this command:\n\n<p> <code>exigrep -I -l 1TwJlQ-0006MV-84 \/var\/log\/exim_mainlog<\/code> <\/p>\n<p>This will give you back the full transaction of that message ID exposing<\/p><br><code>2013-01-18 16:46:16 1TwJlQ-0006MV-84 &lt;= sender@example.com H=localhost [127.0.0.1]\n<br>T=\"Update on employee contacts\" for user@example.com<br> 2013-01-18 16:46:16 1TwJlQ-0006MV-84 ** user@example.com R=virtual_user_maildir_overquota:<br>Mailbox quota exceeded<br> 2013-01-18 16:46:16 1TwJlQ-0006MV-84 Completed<\/code>\n<\/li>\n<li>Now in this case we can see that this message is failing because the <strong>user@example.com<\/strong> server is giving back an error of <strong>Mailbox quota exceeded<\/strong>.\n<p>If you&#8217;d like to attempt to go ahead and forcefully try to re-send the message you can run this command on the message ID:<\/p>\n<p> <code>exim -M 1TwJlQ-0006MV-84<\/code> <\/p>\n<p>If you wanted to remove the message from the mail queue.<\/p>\n<p> <code>exim -Mrm 1TwJlQ-0006MV-84<\/code><\/p><\/li>\n<\/ol>\n\n<p>You should now know how to investigate messages in your Exim mail queue using Exim commands over SSH.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this article I&#8217;ll review how to manage your Exim mail queue on your VPS (Virtual Private Server) or dedicated server via SSH. This will allow you to find out why sent messages haven&#8217;t possibly been successfully delivered yet. The MTA (Mail Transfer Agent) that runs on your server is called Exim and it controls<a class=\"moretag\" href=\"https:\/\/www.inmotionhosting.com\/support\/email\/manage-the-exim-mail-queue-via-ssh\/\"> Read More ><\/a><\/p>\n","protected":false},"author":57014,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[4],"tags":[],"class_list":["post-808","post","type-post","status-publish","format-standard","hentry","category-email"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.1.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Manage the Exim mail queue via SSH | InMotion Hosting<\/title>\n<meta name=\"description\" content=\"In this article I&#039;ll review how to manage your Exim mail queue on your VPS (Virtual Private Server) or dedicated server via SSH. This will allow you to find out why sent messages haven&#039;t possibly been successfully delivered yet.\" \/>\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.inmotionhosting.com\/support\/email\/manage-the-exim-mail-queue-via-ssh\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Manage the Exim mail queue via SSH | InMotion Hosting\" \/>\n<meta property=\"og:description\" content=\"In this article I&#039;ll review how to manage your Exim mail queue on your VPS (Virtual Private Server) or dedicated server via SSH. This will allow you to find out why sent messages haven&#039;t possibly been successfully delivered yet.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.inmotionhosting.com\/support\/email\/manage-the-exim-mail-queue-via-ssh\/\" \/>\n<meta property=\"og:site_name\" content=\"InMotion Hosting Support Center\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/inmotionhosting\/\" \/>\n<meta property=\"article:published_time\" content=\"2013-01-19T02:35:16+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-08-17T03:23:53+00:00\" \/>\n<meta name=\"author\" content=\"InMotion Hosting Contributor\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@https:\/\/twitter.com\/InMotionHosting\" \/>\n<meta name=\"twitter:site\" content=\"@InMotionHosting\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"InMotion Hosting Contributor\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/email\/manage-the-exim-mail-queue-via-ssh\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/email\/manage-the-exim-mail-queue-via-ssh\/\"},\"author\":{\"name\":\"InMotion Hosting Contributor\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/f9a4fc454cd1df128ee8e898d30d4644\"},\"headline\":\"Manage the Exim mail queue via SSH\",\"datePublished\":\"2013-01-19T02:35:16+00:00\",\"dateModified\":\"2021-08-17T03:23:53+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/email\/manage-the-exim-mail-queue-via-ssh\/\"},\"wordCount\":370,\"commentCount\":6,\"publisher\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#organization\"},\"articleSection\":[\"Email\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.inmotionhosting.com\/support\/email\/manage-the-exim-mail-queue-via-ssh\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/email\/manage-the-exim-mail-queue-via-ssh\/\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/email\/manage-the-exim-mail-queue-via-ssh\/\",\"name\":\"Manage the Exim mail queue via SSH | InMotion Hosting\",\"isPartOf\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#website\"},\"datePublished\":\"2013-01-19T02:35:16+00:00\",\"dateModified\":\"2021-08-17T03:23:53+00:00\",\"description\":\"In this article I'll review how to manage your Exim mail queue on your VPS (Virtual Private Server) or dedicated server via SSH. This will allow you to find out why sent messages haven't possibly been successfully delivered yet.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/email\/manage-the-exim-mail-queue-via-ssh\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.inmotionhosting.com\/support\/email\/manage-the-exim-mail-queue-via-ssh\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/email\/manage-the-exim-mail-queue-via-ssh\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.inmotionhosting.com\/support\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Manage the Exim mail queue via SSH\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#website\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/\",\"name\":\"InMotion Hosting Support Center\",\"description\":\"Web Hosting Support &amp; Tutorials\",\"publisher\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.inmotionhosting.com\/support\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#organization\",\"name\":\"InMotion Hosting\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg\",\"contentUrl\":\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg\",\"width\":696,\"height\":696,\"caption\":\"InMotion Hosting\"},\"image\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/inmotionhosting\/\",\"https:\/\/x.com\/InMotionHosting\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/f9a4fc454cd1df128ee8e898d30d4644\",\"name\":\"InMotion Hosting Contributor\",\"description\":\"InMotion Hosting contributors are highly knowledgeable individuals who create relevant content on new trends and troubleshooting techniques to help you achieve your online goals!\",\"sameAs\":[\"https:\/\/www.linkedin.com\/company\/inmotion-hosting\/\",\"https:\/\/x.com\/https:\/\/twitter.com\/InMotionHosting\"],\"url\":\"https:\/\/www.inmotionhosting.com\/support\/author\/inmotion-hosting-contributor\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Manage the Exim mail queue via SSH | InMotion Hosting","description":"In this article I'll review how to manage your Exim mail queue on your VPS (Virtual Private Server) or dedicated server via SSH. This will allow you to find out why sent messages haven't possibly been successfully delivered yet.","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.inmotionhosting.com\/support\/email\/manage-the-exim-mail-queue-via-ssh\/","og_locale":"en_US","og_type":"article","og_title":"Manage the Exim mail queue via SSH | InMotion Hosting","og_description":"In this article I'll review how to manage your Exim mail queue on your VPS (Virtual Private Server) or dedicated server via SSH. This will allow you to find out why sent messages haven't possibly been successfully delivered yet.","og_url":"https:\/\/www.inmotionhosting.com\/support\/email\/manage-the-exim-mail-queue-via-ssh\/","og_site_name":"InMotion Hosting Support Center","article_publisher":"https:\/\/www.facebook.com\/inmotionhosting\/","article_published_time":"2013-01-19T02:35:16+00:00","article_modified_time":"2021-08-17T03:23:53+00:00","author":"InMotion Hosting Contributor","twitter_card":"summary_large_image","twitter_creator":"@https:\/\/twitter.com\/InMotionHosting","twitter_site":"@InMotionHosting","twitter_misc":{"Written by":"InMotion Hosting Contributor","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.inmotionhosting.com\/support\/email\/manage-the-exim-mail-queue-via-ssh\/#article","isPartOf":{"@id":"https:\/\/www.inmotionhosting.com\/support\/email\/manage-the-exim-mail-queue-via-ssh\/"},"author":{"name":"InMotion Hosting Contributor","@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/f9a4fc454cd1df128ee8e898d30d4644"},"headline":"Manage the Exim mail queue via SSH","datePublished":"2013-01-19T02:35:16+00:00","dateModified":"2021-08-17T03:23:53+00:00","mainEntityOfPage":{"@id":"https:\/\/www.inmotionhosting.com\/support\/email\/manage-the-exim-mail-queue-via-ssh\/"},"wordCount":370,"commentCount":6,"publisher":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#organization"},"articleSection":["Email"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.inmotionhosting.com\/support\/email\/manage-the-exim-mail-queue-via-ssh\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.inmotionhosting.com\/support\/email\/manage-the-exim-mail-queue-via-ssh\/","url":"https:\/\/www.inmotionhosting.com\/support\/email\/manage-the-exim-mail-queue-via-ssh\/","name":"Manage the Exim mail queue via SSH | InMotion Hosting","isPartOf":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#website"},"datePublished":"2013-01-19T02:35:16+00:00","dateModified":"2021-08-17T03:23:53+00:00","description":"In this article I'll review how to manage your Exim mail queue on your VPS (Virtual Private Server) or dedicated server via SSH. This will allow you to find out why sent messages haven't possibly been successfully delivered yet.","breadcrumb":{"@id":"https:\/\/www.inmotionhosting.com\/support\/email\/manage-the-exim-mail-queue-via-ssh\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.inmotionhosting.com\/support\/email\/manage-the-exim-mail-queue-via-ssh\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.inmotionhosting.com\/support\/email\/manage-the-exim-mail-queue-via-ssh\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.inmotionhosting.com\/support\/"},{"@type":"ListItem","position":2,"name":"Manage the Exim mail queue via SSH"}]},{"@type":"WebSite","@id":"https:\/\/www.inmotionhosting.com\/support\/#website","url":"https:\/\/www.inmotionhosting.com\/support\/","name":"InMotion Hosting Support Center","description":"Web Hosting Support &amp; Tutorials","publisher":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.inmotionhosting.com\/support\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.inmotionhosting.com\/support\/#organization","name":"InMotion Hosting","url":"https:\/\/www.inmotionhosting.com\/support\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/","url":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg","contentUrl":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg","width":696,"height":696,"caption":"InMotion Hosting"},"image":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/inmotionhosting\/","https:\/\/x.com\/InMotionHosting"]},{"@type":"Person","@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/f9a4fc454cd1df128ee8e898d30d4644","name":"InMotion Hosting Contributor","description":"InMotion Hosting contributors are highly knowledgeable individuals who create relevant content on new trends and troubleshooting techniques to help you achieve your online goals!","sameAs":["https:\/\/www.linkedin.com\/company\/inmotion-hosting\/","https:\/\/x.com\/https:\/\/twitter.com\/InMotionHosting"],"url":"https:\/\/www.inmotionhosting.com\/support\/author\/inmotion-hosting-contributor\/"}]}},"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"primary_category":{"id":4,"name":"Email","slug":"email","link":"https:\/\/www.inmotionhosting.com\/support\/email\/"},"_links":{"self":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts\/808","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/users\/57014"}],"replies":[{"embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/comments?post=808"}],"version-history":[{"count":5,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts\/808\/revisions"}],"predecessor-version":[{"id":85053,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts\/808\/revisions\/85053"}],"wp:attachment":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/media?parent=808"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/categories?post=808"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/tags?post=808"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}