{"id":1650,"date":"2021-09-24T09:59:43","date_gmt":"2021-09-24T04:29:43","guid":{"rendered":"https:\/\/www.webhostingchennai.co.in\/blog\/?p=1650"},"modified":"2021-10-06T14:48:14","modified_gmt":"2021-10-06T09:18:14","slug":"20-exim-mail-queue-commands","status":"publish","type":"post","link":"https:\/\/chennaiwebhosting.in\/blog\/20-exim-mail-queue-commands\/","title":{"rendered":"Top 20 Exim Mail Queue Commands"},"content":{"rendered":"<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_80 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/chennaiwebhosting.in\/blog\/20-exim-mail-queue-commands\/#Top_20_Exim_Mail_Queue_Commands\" >Top 20 Exim Mail Queue Commands<\/a><ul class='ez-toc-list-level-4' ><li class='ez-toc-heading-level-4'><ul class='ez-toc-list-level-4' ><li class='ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/chennaiwebhosting.in\/blog\/20-exim-mail-queue-commands\/#To_send_one_message_forcefully_in_Exim\" >To send one message forcefully in Exim<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/chennaiwebhosting.in\/blog\/20-exim-mail-queue-commands\/#To_force_another_queue_run\" >To force another queue run<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/chennaiwebhosting.in\/blog\/20-exim-mail-queue-commands\/#To_flush_the_frozen_message\" >To flush the frozen message<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/chennaiwebhosting.in\/blog\/20-exim-mail-queue-commands\/#To_see_the_logs_of_a_message\" >To see the logs of a message<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/chennaiwebhosting.in\/blog\/20-exim-mail-queue-commands\/#To_view_the_body_of_the_message\" >To view the body of the message<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/chennaiwebhosting.in\/blog\/20-exim-mail-queue-commands\/#To_view_the_header_part_of_the_message\" >To view the header part of the message<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/chennaiwebhosting.in\/blog\/20-exim-mail-queue-commands\/#To_remove_message_without_sending_any_error_message\" >To remove message without sending any error message<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/chennaiwebhosting.in\/blog\/20-exim-mail-queue-commands\/#To_giveup_and_fail_message_to_bounce_the_message_to_the_sender\" >To giveup and fail message to bounce the message to the sender<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/chennaiwebhosting.in\/blog\/20-exim-mail-queue-commands\/#To_know_the_number_of_emails_in_a_queue\" >To know the number of emails in a queue<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-11\" href=\"https:\/\/chennaiwebhosting.in\/blog\/20-exim-mail-queue-commands\/#To_know_the_number_of_frozen_emails_in_a_queue\" >To know the number of frozen emails in a queue<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-12\" href=\"https:\/\/chennaiwebhosting.in\/blog\/20-exim-mail-queue-commands\/#To_delete_the_frozen_mails_from_the_queue\" >To delete the frozen mails from the queue<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-13\" href=\"https:\/\/chennaiwebhosting.in\/blog\/20-exim-mail-queue-commands\/#To_print_summary_of_the_messages_in_the_queue\" >To print summary of the messages in the queue<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-14\" href=\"https:\/\/chennaiwebhosting.in\/blog\/20-exim-mail-queue-commands\/#To_show_what_exim_is_doing_right_now\" >To show what exim is doing right now<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-15\" href=\"https:\/\/chennaiwebhosting.in\/blog\/20-exim-mail-queue-commands\/#To_show_number_of_messages_in_the_queue\" >To show number of messages in the queue<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-16\" href=\"https:\/\/chennaiwebhosting.in\/blog\/20-exim-mail-queue-commands\/#To_quickly_flush_your_Exim_queue\" >To quickly flush your Exim queue<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-17\" href=\"https:\/\/chennaiwebhosting.in\/blog\/20-exim-mail-queue-commands\/#To_remove_7_days_old_emails\" >To remove 7 days old emails<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-18\" href=\"https:\/\/chennaiwebhosting.in\/blog\/20-exim-mail-queue-commands\/#To_view_number_of_mails_in_queue_for_each_domain\" >To view number of mails in queue for each domain<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-19\" href=\"https:\/\/chennaiwebhosting.in\/blog\/20-exim-mail-queue-commands\/#Run_the_following_command_to_pull_the_most_used_mailing_scripts_location_from_the_Exim_mail_log\" >Run the following command to pull the most used mailing script\u2019s location from the Exim mail log:<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-20\" href=\"https:\/\/chennaiwebhosting.in\/blog\/20-exim-mail-queue-commands\/#To_search_for_a_specific_email_user\" >To search for a specific email user<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-21\" href=\"https:\/\/chennaiwebhosting.in\/blog\/20-exim-mail-queue-commands\/#To_search_the_queue_for_a_specific_destiny_user\" >To search the queue for a specific destiny user<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-22\" href=\"https:\/\/chennaiwebhosting.in\/blog\/20-exim-mail-queue-commands\/#To_run_a_traceroute_against_an_email_address\" >To run a traceroute against an email address<\/a><\/li><\/ul><\/li><\/ul><\/li><\/ul><\/nav><\/div>\n<h2><span class=\"ez-toc-section\" id=\"Top_20_Exim_Mail_Queue_Commands\"><\/span>Top 20 Exim Mail Queue Commands<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>In this post, we are going to see about some of the email queue commands. These commands are normally used by the root users to know about the email queues and why the mails are in queue.<\/p>\n<p>&nbsp;<\/p>\n<p>To proceed further, Lets see what is Exim.<\/p>\n<p><a href=\"https:\/\/www.exim.org\/\" rel=\"nofollow noopener\" target=\"_blank\">Exim<\/a> is a mail transfer agent used on Unix-like operating systems. Exim is free software distributed under the terms of the GNU General Public License, and it aims to be a general and flexible mailer with extensive facilities for checking incoming e-mail.<\/p>\n<p>The first version of Exim was written in 1995 by Philip Hazel for use in the University of Cambridge Computing Service\u2019s e-mail systems.<\/p>\n<h4><span class=\"ez-toc-section\" id=\"To_send_one_message_forcefully_in_Exim\"><\/span>To send one message forcefully in Exim<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<pre>exim -M email-id<\/pre>\n<p>This command is used to forcefully delivery of one message in a queue. This situation arrives when an urgent message want to be send but due to long queue is takes time then with this exim command we can send one message forcefully in exim server.<\/p>\n<h4><span class=\"ez-toc-section\" id=\"To_force_another_queue_run\"><\/span>To force another queue run<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<pre>exim -qf<\/pre>\n<p>This command in exim is used to force another queue run.<\/p>\n<h4><span class=\"ez-toc-section\" id=\"To_flush_the_frozen_message\"><\/span>To flush the frozen message<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<pre>exim -qff<\/pre>\n<p>This command is used to force another queue run and attempts to flush the frozen message in exim server.<\/p>\n<h4><span class=\"ez-toc-section\" id=\"To_see_the_logs_of_a_message\"><\/span>To see the logs of a message<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<pre>exim -Mvl messageID<\/pre>\n<p>This command is used to see the logs of a message in exim server. Message ID is the id of the message of which we want to see the log.<\/p>\n<h4><span class=\"ez-toc-section\" id=\"To_view_the_body_of_the_message\"><\/span>To view the body of the message<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<pre>exim -Mvb messageID<\/pre>\n<p>This command is used to view the body of the message. Message ID is the id given by the exim to that message.<\/p>\n<h4><span class=\"ez-toc-section\" id=\"To_view_the_header_part_of_the_message\"><\/span>To view the header part of the message<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<pre>exim -Mvh messageID<\/pre>\n<p>This command is used to view the header part of the message. Message ID is the id given by the exim to that message.<\/p>\n<h4><span class=\"ez-toc-section\" id=\"To_remove_message_without_sending_any_error_message\"><\/span>To remove message without sending any error message<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<pre>exim -Mrm messageID<\/pre>\n<p>This command is used to remove message without sending any error message. Message ID is the id given by the exim to that message.<\/p>\n<h4><span class=\"ez-toc-section\" id=\"To_giveup_and_fail_message_to_bounce_the_message_to_the_sender\"><\/span>To giveup and fail message to bounce the message to the sender<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<pre>exim -Mg messageID<\/pre>\n<p>This command is used to giveup and fail message to bounce the message to the sender. Message ID is the id given by the exim to that message.<\/p>\n<h4><span class=\"ez-toc-section\" id=\"To_know_the_number_of_emails_in_a_queue\"><\/span>To know the number of emails in a queue<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<pre>exim -bpr | grep \u201c&lt;\u201d | wc -l<\/pre>\n<h4><span class=\"ez-toc-section\" id=\"To_know_the_number_of_frozen_emails_in_a_queue\"><\/span>To know the number of frozen emails in a queue<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<pre>exim -bpr | grep frozen | wc -l\r\n\r\n<\/pre>\n<h4><span class=\"ez-toc-section\" id=\"To_delete_the_frozen_mails_from_the_queue\"><\/span>To delete the frozen mails from the queue<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<pre>exim -bpr | grep frozen | awk {\u2018print $3\u2019} | xargs exim -Mrm\r\n\r\n<\/pre>\n<h4><span class=\"ez-toc-section\" id=\"To_print_summary_of_the_messages_in_the_queue\"><\/span>To print summary of the messages in the queue<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<pre>exim -bp | exiqsumm<\/pre>\n<h4><span class=\"ez-toc-section\" id=\"To_show_what_exim_is_doing_right_now\"><\/span>To show what exim is doing right now<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<pre>exiwhat<\/pre>\n<h4><span class=\"ez-toc-section\" id=\"To_show_number_of_messages_in_the_queue\"><\/span>To show number of messages in the queue<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<pre>exim -bpc<\/pre>\n<h4><span class=\"ez-toc-section\" id=\"To_quickly_flush_your_Exim_queue\"><\/span>To quickly flush your Exim queue<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<pre>exim -bp | exiqgrep -i | xargs exim -Mrm<\/pre>\n<h4><span class=\"ez-toc-section\" id=\"To_remove_7_days_old_emails\"><\/span>To remove 7 days old emails<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<pre>exim -bpr | grep 7d | awk {&#039;print $3&#039;} | xargs exim -Mrm;<\/pre>\n<h4><span class=\"ez-toc-section\" id=\"To_view_number_of_mails_in_queue_for_each_domain\"><\/span>To view number of mails in queue for each domain<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<pre>exim -bp | exiqsumm | grep -v \u2018\\-\\-\u2018 | grep -v \u2018Volume\u2019 | grep -v \u2018^$\u2019 | sort -bg | awk \u2018{print \u201cVolume: \u201d $1 \u201d \\t Domain: \u201d $5}\u2019A<\/pre>\n<h4><span class=\"ez-toc-section\" id=\"Run_the_following_command_to_pull_the_most_used_mailing_scripts_location_from_the_Exim_mail_log\"><\/span>Run the following command to pull the most used mailing script\u2019s location from the Exim mail log:<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<pre>grep cwd \/var\/log\/exim_mainlog | grep -v \/var\/spool | awk -F\u201dcwd=\u201d \u2018{print $2}\u2019 | awk \u2018{print $1}\u2019 | sort | uniq -c | sort -n<\/pre>\n<h4><span class=\"ez-toc-section\" id=\"To_search_for_a_specific_email_user\"><\/span>To search for a specific email user<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<pre>exiqgrep -f [user]@domain.com<\/pre>\n<h4><span class=\"ez-toc-section\" id=\"To_search_the_queue_for_a_specific_destiny_user\"><\/span>To search the queue for a specific destiny user<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<pre>exiqgrep -r [user]@domain.com<\/pre>\n<h4><span class=\"ez-toc-section\" id=\"To_run_a_traceroute_against_an_email_address\"><\/span>To run a traceroute against an email address<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<pre>exim -bt &#039;&lt;mail id&gt;&#039;\r\n\r\n<\/pre>\n<p>That&#8217;s it for now, Hope you liked this blog. If know any other commands kindly share it with the details so that we can publish it with your name.<\/p>\n<p>Kindly share your comments \/ Feedback to improve us.<\/p>\n<p>To know about <strong>RSYNC COMMANDS, <\/strong><a href=\"https:\/\/chennaiwebhosting.in\/blog\/15-useful-rsync-commands-in-linux\/\">Click Here<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Top 20 Exim Mail Queue Commands In this post, we are going to see about some of the email queue commands. These commands are normally used by the root users to know about the email queues and why the mails are in queue. &nbsp; To proceed further, Lets see what is Exim. Exim is a [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":1674,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"footnotes":""},"categories":[57,14,13,99,11,74,87],"tags":[98,100,101,102],"class_list":["post-1650","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-centos-redhat","category-centos-6-rhel-6","category-centos-7-rhel-7","category-exim","category-linux","category-vps","category-whm","tag-commands-for-exim","tag-exim-commands","tag-imptorant-exim-commants","tag-most-used-exim-commands"],"_links":{"self":[{"href":"https:\/\/chennaiwebhosting.in\/blog\/wp-json\/wp\/v2\/posts\/1650","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/chennaiwebhosting.in\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/chennaiwebhosting.in\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/chennaiwebhosting.in\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/chennaiwebhosting.in\/blog\/wp-json\/wp\/v2\/comments?post=1650"}],"version-history":[{"count":2,"href":"https:\/\/chennaiwebhosting.in\/blog\/wp-json\/wp\/v2\/posts\/1650\/revisions"}],"predecessor-version":[{"id":1676,"href":"https:\/\/chennaiwebhosting.in\/blog\/wp-json\/wp\/v2\/posts\/1650\/revisions\/1676"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/chennaiwebhosting.in\/blog\/wp-json\/wp\/v2\/media\/1674"}],"wp:attachment":[{"href":"https:\/\/chennaiwebhosting.in\/blog\/wp-json\/wp\/v2\/media?parent=1650"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/chennaiwebhosting.in\/blog\/wp-json\/wp\/v2\/categories?post=1650"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/chennaiwebhosting.in\/blog\/wp-json\/wp\/v2\/tags?post=1650"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}