exiqgrep | to obtain a queue listing, and then greps the output to select messages that match given criteria. The following selection options are available: -f Match the sender address using a case-insensitive search. The field that is tested is enclosed in angle brackets, so you can test for bounce messages with exiqgrep -f '^<>$' -r Match a recipient address using a case-insensitve search. The field that is tested is not enclosed in angle brackets. -s Match against the size field. -y Match messages that are younger than the given time. -o Match messages that are older than the given time. -z Match only frozen messages. -x Match only non-frozen messages. The following options control the format of the output: ############################################# -c Display only the count of matching messages. -l Long format – display the full message information as output by Exim. This is the default. -i Display message ids only. -b Brief format – one line per message. -R Display messages in reverse order. -a Include delivered recipients in queue listing. -h, which outputs a list of options. |
<= | Indicates the arrival of a message for incoming mail |
=> | Shows a normal message delivery for outgoing mail |
-> | Additional address for the same delivery, i.e. an Email forwarder. |
>> | cutthrough is a router precondition This option requests delivery be attempted while the item is being received. It is usable in the RCPT ACL and valid only for single-recipient mails forwarded from one SMTP connection to another. If a recipient-verify callout connection is requested in the same ACL it is held open and used for the data, otherwise one is made after the ACL completes. |
*> | delivery suppressed by -N |
** | delivery failed; address bounced |
== | delivery deferred; temporary problem |
<> | For "<>" from the exim manual; Additionally, you will often find A bounce message is shown with the sender address “<>”, and if it is locally generated, this is followed by an item of the form R= |
You will also find entries like the below table in the main log such as:
R= | The address immediately following “<=” is the envelope sender address. A bounce message is shown with the sender address “<>”, and if it is locally generated, this is followed by an item of the form R= |
T= | The relay used to transmit the message. Example: T=remote_smtp T=local_delivery |
H= | Represents the host: H=localhost (10.5.40.204) [127.0.0.1]:39753 5.1) H=mail.fictional.example [192.168.123.123] U=exim 6) I=[127.0.0.1]:25 |
U= | The MTA used. |
I= | Followed by a colon and the port number, the I= is the local interface on which the mail was received. |
P= | This is the return_path_on_delivery: The return path that is being transmitted with the message is included in delivery and bounce lines, using the tag P=. This is omitted if no delivery actually happens, for example, if routing fails, or if delivery is to /dev/null or to :blackhole:. |
A= | If A= is present, then SMTP AUTH was used for the delivery. |
S= | Is the delivery size of the message |
M8S= | 8bitmime: This causes Exim to log any 8BITMIME status of received messages, which may help in tracking down interoperability issues with ancient MTAs that are not 8bit clean. This is added to the “<=” line, tagged with M8S= and a value of 0, 7 or 8, corresponding to "not given", 7BIT and 8BITMIME respectively. |
ID= | Represents the incoming message ID |
T= | Topic |
from | From whom the mail was received |
for | Who the email is for |
We can also use a few other commands from the exim command line to help read some of the messages. The next set of commands we will look at will be built into exim directly:
exim -bpc | Print a total count of messages in the queue |
exim -bp | Print a listing of the messages including time queue, size, message-ID, sender, and recipient |
exim -bp |exiqsum | Prints a summary of the exim mail queue. -bash-4.1# exim -bp | exiqsumm Count Volume Oldest Newest Domain ----- ------ ------ ------ ------ 7 39KB 71h 71h nt10598.os.cpanel.vm 3 19KB 14h 78m nt12664.product.cpanel.vm --------------------------------------------------------------- 10 58KB 71h 78m TOTAL |
exim -bt user@domain.com | This will test how an email is routed through exim |
exim -bh | Run a pretend SMPT transaction from the CLI. The purpose of this is to check exims ACLs and filters. |
exim -q -v | Start a queue run |
exim -ql -v | Start a queue run for local mail only |
exim -Mrm | Remove a message from the queue |
exim -Mvb | View the body of a message |
exim -Mvh | View the header of a message |
exim -Mvc | Provides the whole email and body |
Other exim configuration files and folder structure:
/etc/mailhelo | This file is the configuration file for Exim's HELO command. Records should be represented as: addonor.subdomain.com: maindomain.com |
/etc/mailips | This file specifies the IP addresses from which Exim should send email. |
/etc/mail_reverse_dns | This file specifies the domains that are associated with the IP addresses from which Exim should send email. |
/etc/remotedomains | Sends out an email to an internet address. |
/etc/localdomains | Sends out an email to a local address. |
dig mx | Dig a domain and pull MX records only |
Comments