{"id":3927,"date":"2014-08-05T10:55:32","date_gmt":"2014-08-05T15:55:32","guid":{"rendered":"https:\/\/secure.rosehosting.com\/blog\/?p=3927"},"modified":"2022-12-19T07:19:44","modified_gmt":"2022-12-19T13:19:44","slug":"useful-exim-commands","status":"publish","type":"post","link":"https:\/\/www.rosehosting.com\/blog\/useful-exim-commands\/","title":{"rendered":"Useful Exim Commands"},"content":{"rendered":"
<\/div>

\"eximExim is a popular,\u00a0powerful and easily configurable mail transfer agent (MTA) included on most Linux operating systems.<\/p>\n

If you want to install Exim on a CentOS VPS<\/a>, all you have to do is install the EPEL repository:<\/p>\n

rpm -Uvh http:\/\/fedora-epel.mirror.lstn.net\/6\/x86_64\/epel-release-6-8.noarch.rpm<\/pre>\n

then, install Exim via yum:<\/p>\n

yum install exim\r\n\r\n<\/pre>\n

<\/p>\n

Installing Exim on a Debian VPS<\/a> or an Ubuntu VPS<\/a> is quite easy as it is distributed with default system package manager:<\/p>\n

apt-get update\r\napt-get install exim4<\/pre>\n

 <\/p>\n

Listed below are some commonly used useful Exim commands.<\/p>\n

 <\/p>\n

Display the version of\u00a0Exim and the location of Exim configuration file:<\/p>\n

exim -bV<\/pre>\n

Display the current configurations of Exim:<\/p>\n

exim -bP<\/pre>\n

Count the number of email messages in the queue, and display the total number of messages to the standard output:<\/p>\n

exim -bpc<\/pre>\n

Display the email messages in the queue (time queued, message size, message id, sender and recipient):<\/p>\n

exim -bp<\/pre>\n

Dispaly a summary of email messages in the queue (count, volume, oldest, newest, domain, and totals):<\/p>\n

exim -bp | exiqsumm<\/pre>\n

View the log for the email message:<\/p>\n

exim -Mvl <messageID><\/pre>\n

View the body of the email message:<\/p>\n

exim -Mvb <messageID><\/pre>\n

View the header of the email message:<\/p>\n

exim -Mvh <messageID><\/pre>\n

Search the queue for email messages from a specific email address:<\/p>\n

exiqgrep -f user@domain.tld<\/pre>\n

Search the queue for email messages to a specific email address:<\/p>\n

exiqgrep -r l user@domain.tld<\/pre>\n

Freeze all queued mail from a specific sender:<\/p>\n

exiqgrep -i -f l user@domain.tld | xargs exim -Mf<\/pre>\n

Remove a single email message with <messageID> from the queue:<\/p>\n

exim -Mrm <messageID><\/pre>\n

Delete all frozen email messages:<\/p>\n

exiqgrep -z -i | xargs exim -Mrm\r\n\r\nor:\r\n\r\nexim -bpr | grep frozen | awk {'print $3'} | xargs exim -Mrm<\/pre>\n

Try to deliver the email message with <messageID> from email queue:<\/p>\n

exim -M <messageID><\/pre>\n

Delete all email messages in the queue:<\/p>\n

exim -bpru|awk {.print $3'}|xargs exim -Mrm<\/pre>\n

Process the entire queue again:<\/p>\n

exim -qf<\/pre>\n

Force another queue run and attempt to flush the frozen messages:<\/p>\n

exim -qff<\/pre>\n

Test how Exim will route to a given email address:<\/p>\n

exim -bt user@domain.tld<\/pre>\n

Of course you don’t have to do any of this if you use one of our Linux VPS Hosting<\/a> services, in which case you can simply ask our expert Linux admins to install Exim for you. They are available 24×7 and will take care of your request immediately.<\/p>\n

PS<\/span>.<\/strong> If you liked this post please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.<\/p>\n

 <\/p>\n","protected":false},"excerpt":{"rendered":"

Exim is a popular,\u00a0powerful and easily configurable mail transfer agent (MTA) included on most Linux operating systems. If you want … <\/p>\n

Read More<\/a><\/p>\n","protected":false},"author":4,"featured_media":3931,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[21],"tags":[487,488],"yoast_head":"\nUseful Exim Commands - RoseHosting<\/title>\n<meta name=\"description\" content=\"Useful Exim Commands - RoseHosting\" \/>\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.rosehosting.com\/blog\/useful-exim-commands\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Useful Exim Commands - RoseHosting\" \/>\n<meta property=\"og:description\" content=\"Useful Exim Commands - RoseHosting\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.rosehosting.com\/blog\/useful-exim-commands\/\" \/>\n<meta property=\"og:site_name\" content=\"RoseHosting\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/RoseHosting\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/rosehosting.helpdesk\" \/>\n<meta property=\"article:published_time\" content=\"2014-08-05T15:55:32+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-12-19T13:19:44+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2014\/07\/exim-vps.png\" \/>\n\t<meta property=\"og:image:width\" content=\"302\" \/>\n\t<meta property=\"og:image:height\" content=\"224\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Jeff Wilson\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@rosehosting\" \/>\n<meta name=\"twitter:site\" content=\"@rosehosting\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Jeff Wilson\" \/>\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.rosehosting.com\/blog\/useful-exim-commands\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.rosehosting.com\/blog\/useful-exim-commands\/\"},\"author\":{\"name\":\"Jeff Wilson\",\"@id\":\"https:\/\/www.rosehosting.com\/blog\/#\/schema\/person\/7ce77a842fa6a9a7f8efa186f2353713\"},\"headline\":\"Useful Exim Commands\",\"datePublished\":\"2014-08-05T15:55:32+00:00\",\"dateModified\":\"2022-12-19T13:19:44+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.rosehosting.com\/blog\/useful-exim-commands\/\"},\"wordCount\":342,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.rosehosting.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.rosehosting.com\/blog\/useful-exim-commands\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2014\/07\/exim-vps.png\",\"keywords\":[\"exim\",\"exim commands\"],\"articleSection\":[\"Tips and Tricks\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.rosehosting.com\/blog\/useful-exim-commands\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.rosehosting.com\/blog\/useful-exim-commands\/\",\"url\":\"https:\/\/www.rosehosting.com\/blog\/useful-exim-commands\/\",\"name\":\"Useful Exim Commands - RoseHosting\",\"isPartOf\":{\"@id\":\"https:\/\/www.rosehosting.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.rosehosting.com\/blog\/useful-exim-commands\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.rosehosting.com\/blog\/useful-exim-commands\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2014\/07\/exim-vps.png\",\"datePublished\":\"2014-08-05T15:55:32+00:00\",\"dateModified\":\"2022-12-19T13:19:44+00:00\",\"description\":\"Useful Exim Commands - RoseHosting\",\"breadcrumb\":{\"@id\":\"https:\/\/www.rosehosting.com\/blog\/useful-exim-commands\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.rosehosting.com\/blog\/useful-exim-commands\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.rosehosting.com\/blog\/useful-exim-commands\/#primaryimage\",\"url\":\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2014\/07\/exim-vps.png\",\"contentUrl\":\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2014\/07\/exim-vps.png\",\"width\":302,\"height\":224,\"caption\":\"exim vps\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.rosehosting.com\/blog\/useful-exim-commands\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.rosehosting.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Useful Exim Commands\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.rosehosting.com\/blog\/#website\",\"url\":\"https:\/\/www.rosehosting.com\/blog\/\",\"name\":\"RoseHosting\",\"description\":\"Premium Linux Tutorials Since 2001\",\"publisher\":{\"@id\":\"https:\/\/www.rosehosting.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.rosehosting.com\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.rosehosting.com\/blog\/#organization\",\"name\":\"RoseHosting\",\"url\":\"https:\/\/www.rosehosting.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.rosehosting.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/03\/android-chrome-192x192-1.png\",\"contentUrl\":\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/03\/android-chrome-192x192-1.png\",\"width\":192,\"height\":192,\"caption\":\"RoseHosting\"},\"image\":{\"@id\":\"https:\/\/www.rosehosting.com\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/RoseHosting\",\"https:\/\/x.com\/rosehosting\",\"https:\/\/www.linkedin.com\/in\/rosehosting\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.rosehosting.com\/blog\/#\/schema\/person\/7ce77a842fa6a9a7f8efa186f2353713\",\"name\":\"Jeff Wilson\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.rosehosting.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/09271207587f897ab46faaed9b355252?s=96&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/09271207587f897ab46faaed9b355252?s=96&r=g\",\"caption\":\"Jeff Wilson\"},\"description\":\"An experienced Linux veteran with many years of experience. Helping other Linux admins with frequent Linux and business-related blog posts on the RoseHosting blog. Techie by choice. Loving nature and travel. Happily married and father of two lovely children.\",\"sameAs\":[\"https:\/\/www.rosehosting.com\",\"https:\/\/www.facebook.com\/rosehosting.helpdesk\"],\"url\":\"https:\/\/www.rosehosting.com\/blog\/author\/jwilson\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Useful Exim Commands - RoseHosting","description":"Useful Exim Commands - RoseHosting","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.rosehosting.com\/blog\/useful-exim-commands\/","og_locale":"en_US","og_type":"article","og_title":"Useful Exim Commands - RoseHosting","og_description":"Useful Exim Commands - RoseHosting","og_url":"https:\/\/www.rosehosting.com\/blog\/useful-exim-commands\/","og_site_name":"RoseHosting","article_publisher":"https:\/\/www.facebook.com\/RoseHosting","article_author":"https:\/\/www.facebook.com\/rosehosting.helpdesk","article_published_time":"2014-08-05T15:55:32+00:00","article_modified_time":"2022-12-19T13:19:44+00:00","og_image":[{"width":302,"height":224,"url":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2014\/07\/exim-vps.png","type":"image\/png"}],"author":"Jeff Wilson","twitter_card":"summary_large_image","twitter_creator":"@rosehosting","twitter_site":"@rosehosting","twitter_misc":{"Written by":"Jeff Wilson","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.rosehosting.com\/blog\/useful-exim-commands\/#article","isPartOf":{"@id":"https:\/\/www.rosehosting.com\/blog\/useful-exim-commands\/"},"author":{"name":"Jeff Wilson","@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/person\/7ce77a842fa6a9a7f8efa186f2353713"},"headline":"Useful Exim Commands","datePublished":"2014-08-05T15:55:32+00:00","dateModified":"2022-12-19T13:19:44+00:00","mainEntityOfPage":{"@id":"https:\/\/www.rosehosting.com\/blog\/useful-exim-commands\/"},"wordCount":342,"commentCount":0,"publisher":{"@id":"https:\/\/www.rosehosting.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.rosehosting.com\/blog\/useful-exim-commands\/#primaryimage"},"thumbnailUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2014\/07\/exim-vps.png","keywords":["exim","exim commands"],"articleSection":["Tips and Tricks"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.rosehosting.com\/blog\/useful-exim-commands\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.rosehosting.com\/blog\/useful-exim-commands\/","url":"https:\/\/www.rosehosting.com\/blog\/useful-exim-commands\/","name":"Useful Exim Commands - RoseHosting","isPartOf":{"@id":"https:\/\/www.rosehosting.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.rosehosting.com\/blog\/useful-exim-commands\/#primaryimage"},"image":{"@id":"https:\/\/www.rosehosting.com\/blog\/useful-exim-commands\/#primaryimage"},"thumbnailUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2014\/07\/exim-vps.png","datePublished":"2014-08-05T15:55:32+00:00","dateModified":"2022-12-19T13:19:44+00:00","description":"Useful Exim Commands - RoseHosting","breadcrumb":{"@id":"https:\/\/www.rosehosting.com\/blog\/useful-exim-commands\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.rosehosting.com\/blog\/useful-exim-commands\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.rosehosting.com\/blog\/useful-exim-commands\/#primaryimage","url":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2014\/07\/exim-vps.png","contentUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2014\/07\/exim-vps.png","width":302,"height":224,"caption":"exim vps"},{"@type":"BreadcrumbList","@id":"https:\/\/www.rosehosting.com\/blog\/useful-exim-commands\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.rosehosting.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Useful Exim Commands"}]},{"@type":"WebSite","@id":"https:\/\/www.rosehosting.com\/blog\/#website","url":"https:\/\/www.rosehosting.com\/blog\/","name":"RoseHosting","description":"Premium Linux Tutorials Since 2001","publisher":{"@id":"https:\/\/www.rosehosting.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.rosehosting.com\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.rosehosting.com\/blog\/#organization","name":"RoseHosting","url":"https:\/\/www.rosehosting.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/03\/android-chrome-192x192-1.png","contentUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/03\/android-chrome-192x192-1.png","width":192,"height":192,"caption":"RoseHosting"},"image":{"@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/RoseHosting","https:\/\/x.com\/rosehosting","https:\/\/www.linkedin.com\/in\/rosehosting\/"]},{"@type":"Person","@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/person\/7ce77a842fa6a9a7f8efa186f2353713","name":"Jeff Wilson","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/09271207587f897ab46faaed9b355252?s=96&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/09271207587f897ab46faaed9b355252?s=96&r=g","caption":"Jeff Wilson"},"description":"An experienced Linux veteran with many years of experience. Helping other Linux admins with frequent Linux and business-related blog posts on the RoseHosting blog. Techie by choice. Loving nature and travel. Happily married and father of two lovely children.","sameAs":["https:\/\/www.rosehosting.com","https:\/\/www.facebook.com\/rosehosting.helpdesk"],"url":"https:\/\/www.rosehosting.com\/blog\/author\/jwilson\/"}]}},"_links":{"self":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts\/3927"}],"collection":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/comments?post=3927"}],"version-history":[{"count":3,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts\/3927\/revisions"}],"predecessor-version":[{"id":44419,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts\/3927\/revisions\/44419"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/media\/3931"}],"wp:attachment":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/media?parent=3927"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/categories?post=3927"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/tags?post=3927"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}