GreenArrow Documentation

Delivery Event Processed Logfile Format

This document defines the “processed logfile format” which contains log entries of each delivery attempt event.

You get access to this by running the hvmail_report command with the --processed-logfile option.

Logfile format

The processed logfile format contains a single line for each delivery attempt event.

Each line contains a tab-separated set of columns. Each column’s data is guaranteed to not to contain any tabs. There is no escape character or line continuation character.

Columns of the processed logfile format

The columns are as follows:

(1) timestamp

Time of delivery attempt in seconds since the Unix epoch.

(2) channel

Value Meaning
local delivery to locally handled email address (i.e. local mailbox)
remote delivery to remote email address via SMTP

(3) status

Result of this delivery attempt.

Value Meaning
success successful delivery
failure delivery failed due to explicit rejection
failure_toolong delivery failed due to being in the queue longer than the allowed time (due to deferrals or connmaxout errors)
deferral delivery deferred for later retry
connmaxout delivery attempt prevented by throttle (this attempt would have put us over the throttle limits)

(4) is_retry

Value Meaning
1 this is a retry delivery attempt (i.e. this message was already tried before but the attempt resulted in a deferral or a connmaxout)
0 this is the first delivery attempt for this message

There are rare occurrences of where this value is 1 for a delivery attempt that is not a retry, due to the internal bouncer queue being full and overflowing messages to a different queue. THis will only happen for internally created messages (which always have a SendID ending in -ic). This should only happen if your system is under extreme pressure to process a large number of bounce messages or forwarded messages, which are also bouncing or forwarding.

(5) msguid

Internal unique ID of message. These are not repeated unless the system clock goes backwards.

Even through this looks like a floating point number, it is a string. To compare values you must use a string comparison. For example the message ID 12.34 is NOT the same as 12.340 since these are different strings.

(6) recipient

Recipient email address of message.

(7) sender

Return-Path of email message (also called envelope sender, MFROM address, or bounce address.)

(8) MTAid

MTAid / VirtualMTA / Mail Route of message. This determines what IP address the message is delivered from.

(9) SendID

Internal send identifier of message. This determines which group this message belongs to.

(10) ListID

Mailing list identifier of this message.

(11) injected time

Time in seconds past the Unix epoch that this message was created.

(12) message

Success, failure, or deferral message for this delivery attempt.

Newlines in the message are replaced with the / character, null and backspace characters (hex 1e) are replaced with an underscore (_), and tabs are replaced with spaces.

(13) outmtaid

If this delivery attempt was through SMTP (channel=remote), this is the primary key of the IP Address or Relay Server that was used to deliver this message.

You can see the primary keys by looking at the number at the end of the URL for the View page of each VirtualMTA in the GreenArrow Engine web interface, or by looking at the id columns of the mr_ipaddr or mr_relay tables in PostgreSQL.

(14) SendSliceID

Not yet documented.

(15) throttleid

This field is blank if the delivery attempt took place using an SMTP Relay Server or the default throttling rule.

Otherwise this field contains the ID of the Throttling Rule that was used when making the delivery attempt.

(16) clicktrackingid

This field contains the value of the X-GreenArrow-Click-Tracking-ID header, if present. Otherwise it is left blank.

Example Data

Here is an example delivery attempt event:

Column number Column name Example Data
1 timestamp 1317299024.20073
2 channel remote
3 status success
4 is_retry 0
5 msguid 1317299024.4669464
6 recipient [email protected]
7 sender [email protected]
8 MTAid smtp1-1
9 SendID 1234
10 ListID 5678
11 injected_time 1317299024
12 message accepted message./Remote host said: 250 ok 1317299024 qp 4973
13 outmtaid 2
14 SendSliceID 298602
15 throttleid 35
16 clicktrackingid 1234

Other Considerations

Messages with multiple recipients

If a message is injected to multiple recipients, there will be one msguid for that message. (The msguid is unique to the message.) Since each delivery attempt for each recipient will be logged, you can have multiple log entries for each msguid. In this case, you would want to use the recipient field to differentiate between these different results.

Note: we may add a field to this logfile format that will track the number of the recipient for the message, so it would be easier to differentiate between results for different recipients. or we may change the msguid field to be specific to the recipient and not the

For example:

# date | /var/hvmail/bin/mailsubj test1 [email protected] [email protected]

# hvmail_report -q ram –last ‘1 min’ –processed-logfile

1317240923.22286 remote success 0 1317240923.67920340 [email protected] [email protected] 1317240923 accepted message./Remote host said: 250 ok 1317240923 qp 25956/ 2 35 1234

1317240924.03923 remote success 0 1317240923.67920340 [email protected] [email protected] 1317240923 accepted message./Remote host said: 250 ok 1317240924 qp 25962/ 2 35 1235

You can see how each line has the same msguid.

Human-readable output

The --processed-logfile option is useful for scripting, but isn’t easily read by humans. The --human option can be added in combination with --processed-logfile to make it a bit more human-friendly.

Here is an example of both covering the same data:

  • Sample Email:

    date | /var/hvmail/bin/mailsubj test1 [email protected]

  • --processed-logfile:

    # hvmail_report -q ram --last '1 min' --processed-logfile
    1428427817.05678	remote	success	0	1428427816.76031064	[email protected]	[email protected]				1428427816 accepted message./Remote host said: 250 ok 1428427817 qp 15219/	2        

  • --processed-logfile --human

    # hvmail_report -q ram --last '1 min' --processed-logfile --human
    timestamp=<1428427817.05678> channel=<remote> status=<success> is_retry=<0> msguid=<1428427816.76031064> recipient=<[email protected]> sender=<[email protected]> MTAid=<> SendID=<> ListID=<> injected_time=<1428427816> message=< accepted message./Remote host said: 250 ok 1428427817 qp 15219/> outmtaid=<2> SendSliceID=<> throttleid=<> clicktrackingid=<>