• Home

Feature Update: Advanced Routing Rules

Feature Update: Advanced Routing Rules

We’ve just added some big improvements to Mailinator’s Routing Rules.

There are new conditions!

You can flag emails based on To: , From: , Subject: , and the IP address from which it was sent.

Here we’re setting up a rule to automatically click the links in any one-time-password test emails.

(assuming your OTP tests include ‘otp’ in the subject line)

Set a condition to check the subject:

Routing Rules

Then set the type of test. In this case, we want the rule to trigger if the subject contains ‘otp’:

routing rules

Then we set the Action – Click All Links:

Routing Rules

After we add the rule, our Message Rules look like this:

Routing Rules

The Message Rules have priorities. Routing Rules are checked in order. We can add another rule that will Drop all these emails after the links are clicked.

Routing Rules

When we add this new routing rule, we see this:

Message Rules

The conditions are the same, so any email which triggers the first rule will also trigger the second. Any email to this private domain (team-norm.testinator.com) which matches these rules will get its links clicked, and then it will be Dropped – deleted before it ever gets to your Mailinator storage.

Routing Rules can have multiple conditions. Here we’re flagging any emails where the subject contains ‘error’ and the from contains devmail. We want these messages to be collected, so we’re sending them to an endpoint with a webhook (and http POST).

We want to webhook these messages only if both conditions match, so we select “Trigger if ALL Conditions match”. It’s like a logical AND.

Then we set the Action and tell the rule where to send the message that match:

Routing Rules

Multiple conditions can also be set such that the rule will Trigger if ANY Condition matches (a logical OR), and here’s an example:

Routing Rules

If any message has ‘foo’ or ‘bar’ anywhere in the To field, this rule will use a webhook to send that message to an alert dashboard.

Since we want to keep those messages in our Mailinator team’s storage, we won’t add another Drop rule. These messages will still be in your team’s inbox – and a copy of them will be on the alert dashboard.

We can also set a rule that specifically looks for things we don’t want to save. Here we’ve set up a rule to immediately Drop (to not save) any message that came from an IP address ending in 128.230

I don’t have a clever story about why we’d want to do that, I just wanted to demonstrate the “ENDS_WITH” option:

Routing Rules

After we add this rule, we’ll see all the rules, and their priorities, that are set in the team-norm.testinator.com domain.

Message Rules

If you have other ideas for helpful Routing Rules, please email us your ideas support@manybrain.com.

Leave a comment

Your email address will not be published. Required fields are marked *