GreenArrow Email Software Documentation

Creating a Drop Route

Sometimes it is necessary to discard messages from the queue, or discard traffic to a domain or group of domains. While it is preferable to use the built-in methods for that, sometimes this is not possible.

This document explains a way to create a Drop Route that will silently drop messages sent to it. This route can then be used to drop messages from your campaigns by using Engine’s routing rules or by redirecting existing VirtualMTAs to the Drop Route.

Use only if absolutely necessary

Before using the methods described in this page, you should exhaust other alternatives. See a list of alternatives below

If you are not familiar with GreenArrow Engine routing rules, relay servers or VirtualMTAs then don’t try any of these methods.

Alternatives Available to Discard Messages

If you want to discard all messages from a campaign try dumping the queue first.

If you want to filter a domain or group of domains, try filtering them from the source. For example, GreenArrow Studio has a segmentation option to filter out subscribers that belong to certain domains. Other applications may have similar options.

In GreenArrow Studio Special Sending Rules can be used to skip individual messages based on criteria define in the SSR code.

To drop or defer messages use the delivery_override directive. The delivery_override directive has more options than the drop route method described in this document, it can discard, defer, or bounce messages; meanwhile the drop route that can only discard messages.

Finally, run custom code during delivery attempts if you need to bounce messages. This method requires programming skills: you would have to create the code that checks the destination domain and returns a dump action for messages that match.

Adding the Drop Route

The Drop Route is a relay server that delivers messages to the internal SMTP Sink service.

SMTP Sink Service

The SMTP Sink is a service installed on all GreenArrow systems, it is an SMTP server that listens on localhost TCP port 226, accepts any messages sent to it and silently discards those messages. From the point of view of the server that is sending messages to this service, the messages are delivered, therefore, if GreenArrow delivers to the SMTP Sink, the messages will be marked as accepted, i.e. they won’t generate a bounce.

Follow the instructions to add a relay server with the following settings:

  • Name: dev-null
  • IP address: 127.0.0.1
  • Hostname: localhost.localdomain.net
  • Relay server: 127.0.0.1
  • Port: 226
  • Use SMTP AUTH: No (unchecked)
  • Concurrent Connections: 20
  • Messages per Hour: 0

Screenshot

IMPORTANT: Messages sent through this relay server will be silently discarded. This means that the email will show as a Successful delivery in the stats but will actually be deleted, and this will happen without a corresponding bounce message.

Using the Drop Route to Discard Messages

There will be times when you need to discard messages that are coming into the MTA or that are already in the queue, but you don’t want to affect other messages in the same campaign or you want to apply this to multiple campaigns. If the instructions to dump the campaign’s queue do not apply to this case then perhaps the Drop Route can be used to discard those messages.

Example 1:

Let’s assume that you are sending a campaign that uses the routing rule all_ips, which has 3 IP addresses. Since BIG ISP is deferring your delivery attempts, you decide to drop all messages to those domains: blocked-domain1.com, blocked-domain2.com, blocked-domain3.com.

To do this, update the routing rule all_ips and add a rule that delivers messages for those domains through the dev-null Drop Route. This screenshot shows the configuration:

big-isps-dev-null

NOTE: This rule will immediately affect new messages that use the VirtualMTA all_ips and any messages that are in the queue with that routing rule. And it will apply to all campaigns.

Example 2:

You are using an external relay server named external-relay, and you decide that all messages to that relay server should be discarded.

To do this, edit the relay server, scroll down to the Override section, check Redirect mail through another Virtual MTA and select dev-null from the dropdown box. Save the relay server and messages to that relay server will be discarded.

Override relay

Don’t forget to disable the override once all the messages have been discarded.

NOTE: this method can also be used on IP address VirtualMTAs too.


Copyright © 2012–2024 GreenArrow Email