Cola manipulate the post of Exim 4
Lately I've been working more on mail servers based in Exim Courier, so I have to look for documentation and howto's of the operation and administration of the tail of the Exim 4. And because all this here is my cheat sheet of the MTA Exim 4.
Message-IDs and Spool File
Identifiers of messages or message-IDs using Exim 4 to refer in his queue (tail) are alpha-numeric and case sensitive and have the form of: XXXXXX-YYYYYY-ZZ. Most of the commands associated with the tail and classes make use of these message-ids.
Each e-mail message on the spool has three files. If you are working with these files by hand instead of using the appropriate command Exim sure to have all three.
/ var / spool / exim / msglog
The files in this directory containing the data logger for each message and are named like the message-id.
/ var / spool / exim / input
These files are named according to the message-id, plus a suffix denoting whether the envelope header (-H) or the message data (D-).
These directories contain subfolders to handle large mail queues, so not everything will be in / var / spool / exim / input or / var / spool / exim / msglog. Any search or greps have to be recursive.
Basic Commands
Because these commands are administrative and Exim own, must be implemented with the root.
exim-bpc: Displays the account of the messages in the queue.
exim-bp: Displays a list of messages in the queue (time in queue, size, message-id, sender, recipient).
exim-bp | exiqsumm: Displays a summary of the messages in the queue (account, volume, old, new, mastery and total).
exiwhat: Displays what Exim is doing at the time.
Exim routed as an address or routing
root @ localhost # exim-bt alias@localdomain.com user@thishost.com <- Alias@localdomain.com router = localuser, transport = local_delivery root @ localhost # exim-bt user@thishost.com user@thishost.com router = localuser, transport = local_delivery root @ localhost # exim-bt user@remotehost.com router = lookuphost, transport = remote_smtp Host mail.remotehost.com [1.2.3.4] MX = 0
exim-bh 10.0.10.157: Execute a transaction SMTP test from the command line, as if coming from the IP address given. This displays the cheks, ACLs and filters are implemented as Exim. This message is not delivered.
exim-BP: Displays the configuration of Exim.
Looking at the bottom with Exiqgrep
Exim comes with a tool called exiqgrep, very good for you grep the queue. Instead of using a series of commands such as exim-bp, awk, grep, cut or wc-l.
Now we see a number of flags to find messages that match to make our searches.
exiqgrep-f [luser] @ domain: Con-f to search the queue messages from a sender.
exiqgrep-r [luser] @ domain: The flag-r helps us to look inside a container of glue / domain specific.
exiqgrep-or 86,400 [...]: We used to print messages or older that the number of seconds specified. In this example, messages prior to 1 day.
Wear-and to print messages that are younger than the specified number of seconds. For example, messages less than an hour old:
exiqgrep-[...] and 3600: Adding the flag-and command, Exim displays the most recent messages that the number of seconds. In our example, messages less than an hour.
Use-s to match the size of a message with a regex. For example, 700-799 bytes:
exiqgrep-s' ^ 7 .. $ '[...]: Using-s search for messages with a size according to the regular expressions used (regex). From 700 to 799 bytes, according to our example.
With z-messages are frozen (frozen), or for those x-thawed (unfrozen).
There are also flags to control the display.
exiqgrep-i [-r |-f] ...: Adding-i displays only the ID of message searches.
exiqgrep-c ...: With c-print account of the messages encontrandos with previous searches.
exiqgrep-i: The flag-i displays the message id of the entire tail.
Popularity: 1% [?]
Trackback URI | Comments RSS






