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
. Assuming no errors, you’re now ready to send
test emails to simulate the delivery events.
Simulation Addresses
Once you’ve updated the configuration for GreenArrow Engine, you’re now ready to inject messages that will produce the simulated events. These are the addresses (note that anyString in any of the listed addresses means any random string of printable characters you wish to use for your testing purposes):
Email Address | Purpose |
---|---|
[email protected] |
Simulate a synchronous bounce |
[email protected] |
Simulate an asynchronous bounce |
[email protected] |
Simulate a delivery after deferral |
[email protected] |
Simulate a message falling to deliver and then expiring from the queue |
Inject messages into your GreenArrow Engine using SimpleMH, the HTTP Submission API, or even GreenArrow Studio with these addresses as the destinations for them, and you’ll generate the necessary events to let you move forward with testing your event notification handling processes.