User Tools

Site Tools


exim4:searching_the_queue

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
exim4:searching_the_queue [2016/11/03 16:38] – created peterexim4:searching_the_queue [2020/07/15 09:30] (current) – external edit 127.0.0.1
Line 3: Line 3:
 Searching the queue with **exiqgrep**. Searching the queue with **exiqgrep**.
  
-Exim includes a utility that is quite nice for grepping through the queue, called exiqgrepLearn itKnow itLive itIf you're not using this, and if you're not familiar with the various flags it uses, you're probably doing things the hard way, like piping `exim -bp` into awk, grep, cut, or `wc -l`. Don't make life harder than it already is.+Exim includes a utility that is quite nice for grepping through the queue, called [[http://www.exim.org/exim-html-4.50/doc/html/spec_49.html#IX2895|exiqgrep]].  This is much better than doing things the hard way, like piping `exim -bp` into awk, grep, cut, or `wc -l`.  Don't make life harder than it already is. 
 + 
 +First, various flags that control what messages are matched.  These can be combined to come up with a very particular search. 
  
-First, various flags that control what messages are matched. These can be combined to come up with a very particular search. 
 Use -f to search the queue for messages from a specific sender: Use -f to search the queue for messages from a specific sender:
-root@localhost# exiqgrep -f [luser]@domain+ 
 +<code bash> 
 +exiqgrep -f [luser]@domain 
 +</code> 
 + 
 Use -r to search the queue for messages for a specific recipient/domain: Use -r to search the queue for messages for a specific recipient/domain:
 +
 +<code bash>
 root@localhost# exiqgrep -r [luser]@domain root@localhost# exiqgrep -r [luser]@domain
 +</code>
 +
 +
 Use -o to print messages older than the specified number of seconds. For example, messages older than 1 day: Use -o to print messages older than the specified number of seconds. For example, messages older than 1 day:
 +
 +<code bash>
 root@localhost# exiqgrep -o 86400 [...] root@localhost# exiqgrep -o 86400 [...]
 +</code>
 +
 +
 Use -y to print messages that are younger than the specified number of seconds. For example, messages less than an hour old: Use -y to print messages that are younger than the specified number of seconds. For example, messages less than an hour old:
 +
 +<code bash>
 root@localhost# exiqgrep -y 3600 [...] root@localhost# exiqgrep -y 3600 [...]
 +</code>
 +
 +
 Use -s to match the size of a message with a regex. For example, 700-799 bytes: Use -s to match the size of a message with a regex. For example, 700-799 bytes:
 +
 +<code bash>
 root@localhost# exiqgrep -s '^7..$' [...] root@localhost# exiqgrep -s '^7..$' [...]
 +</code>
 +
 +
 Use -z to match only frozen messages, or -x to match only unfrozen messages. Use -z to match only frozen messages, or -x to match only unfrozen messages.
 There are also a few flags that control the display of the output. There are also a few flags that control the display of the output.
 Use -i to print just the message-id as a result of one of the above two searches: Use -i to print just the message-id as a result of one of the above two searches:
 +
 +<code bash>
 root@localhost# exiqgrep -i [ -r | -f ] ... root@localhost# exiqgrep -i [ -r | -f ] ...
 +</code>
 +
 +
 Use -c to print a count of messages matching one of the above searches: Use -c to print a count of messages matching one of the above searches:
 +
 +<code bash>
 root@localhost# exiqgrep -c ... root@localhost# exiqgrep -c ...
 +</code>
 +
 +
 Print just the message-id of the entire queue: Print just the message-id of the entire queue:
 +
 +<code bash>
 root@localhost# exiqgrep -i root@localhost# exiqgrep -i
 +</code>
  
  
Line 29: Line 69:
  
 http://www.exim.org/exim-html-4.50/doc/html/spec_49.html#IX2895 http://www.exim.org/exim-html-4.50/doc/html/spec_49.html#IX2895
 +
exim4/searching_the_queue.1478191097.txt.gz · Last modified: 2020/07/15 09:30 (external edit)

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki