GreenArrow Email Software Documentation

Testing The Event Notification System

With the release of version 4.356.0 of GreenArrow Engine, we now include the ability to simulate certain delivery outcomes to allow you to test your ability to handle event notifications for these outcomes prior to going live. These simulations are done by sending mail to internal addresses or addresses managed by GreenArrow, and thus you can send as many simulated messages as you need with no worries about endangering your domain’s reputation.

The delivery outcomes we support simulation for are:

  • Synchronous bounces, where the message is rejected by the receiving domain during the SMTP transaction;
  • Asynchronous bounces, where the message is first accepted by the receiving domain and then returned to the sender, specifically the bounce address for that message (i.e., the address in the message’s Return-Path header field);
  • Delivery after deferral, where the message is initially deferred by the receiving domain and then accepted during a later delivery attempt;
  • Expiration from queue, where the message is queued for periodic retry after failing on its first attempt, and then continually fails to deliver until the time allotted for its time in queue expires.

Configuration

In order to make use of this feature, you’ll first need to add some directives to your greenarrow.conf file.

Edit the file /var/hvmail/control/greenarrow.conf and add the following stanzas to the end of the file:

ip_address * {
  domain event-simulator.local {
    smtp_route 127.0.0.1:226
    retry_time 5s
  }
  domain failure-toolong.event-simulator.local {
    delivery_override temp_failure
    queue_lifetime 8s
    retry_time 5s
  }
}

The above stanzas are in addition to any event_delivery_destination stanzas needed to define your process(es) for event handling.

Save the file, and then run the command greenarrow config reload.

Test Email Addresses and Generated Events

Once you’ve updated the configuration for GreenArrow Engine, you’re now ready to inject messages that will produce the simulated events so that you can test your event handling processes. The following sections go into detail about each address and the events produced.

The text anyString in any of the listed addresses means any random string of printable characters you wish to use for your testing purposes.

Synchronous Bounce Test

To simulate a synchronous bounce, send an email to [email protected].

A synchronous bounce will produce two or three events:

  • There will be a failed delivery_attempt event with an SMTP message indicating why the message failed.
  • There will be a bounce_all event that tells you that the delivery of this message failed, and why.
  • If the email address is also identified as a bad address based on the failure reason, a bounce_bad_address event will be created.

Asynchronous Bounce Test

To simulate an asynchronous bounce, send an email to [email protected].

Like a synchronous bounce, an asynchronous bounce will produce two or three events:

  • There will be a successful delivery_attempt event, because the message will be accepted by the remote domain and then bounced later.
  • There will be a bounce_all event that tells you that the message bounced after acceptance, and why.
  • If the email address is also identified as a bad address based on the failure reason, a bounce_bad_address event will be created.

Delivery After Deferral Test

To simulate a delivery after deferral, send an email to [email protected].

A delivery after deferral test will produce two events:

  • There will be a delivery_attempt event, that indicates that the message was refused, but queued by GreenArrow for future possible delivery.
  • There will be a successful delivery_attempt event, showing the message as having been accepted for delivery by the remote domain.

In a real-life scenario, a delivery after deferral may produce many more than one delivery_attempt events with a deferral status before successful delivery occurs.

Message Expiring From Queue Test

To simulate a message expiring from the queue, send an email to [email protected].

This simulation will produce three events:

  • There will be a delivery_attempt event, that indicates that the message was refused, but queued by GreenArrow for future possible delivery.
  • There will be a second delivery_attempt event showing an unsuccessful try at delivery, after which the message is bounced. This will be distinguished by text in the message field of the event that includes the phrase “I’m not going to try again; this message has been in the queue too long.”
  • There will be a bounce_all event event that tells you that the delivery of this message failed, and why.

As with Delivery After Deferral, in a real-life scenario, there may be many more than one delivery_attempt events with a deferral status before the message is expired from the queue and bounced.


Copyright © 2012–2026 GreenArrow Email