Skip to main content

Sample Custom Configurations

Last updated March 2020

New Response Codes

You may come across response codes that haven't yet been integrated into the Message Systems adaptive rules file. In such cases you can customize the existing rules by adding a file. For example:

1require('msys.adaptive')
2local rules =
3{
4  ["hotmail.com"] =
5  {
6    responses =
7    {
8      {
9        code = "421 PR\\((dt1|ct1)\\)",
10        trigger = "1",
11        action =  {"throttle", "down"},
12        phase = "connect",
13      },
14      {
15        code = "421 RP-00[123]",
16        trigger = "1",
17        action = {"throttle", "down"},
18        phase = "connect",
19      }
20    }
21  }
22}
23
24msys.adaptive.registerRules(rules, "augment")

For detailed instructions on customization see Custom Rules .

Throttle Down to Avoid Suspension

You may discover codes that result in suspensions because they are not covered by existing rules. For example, the following bounce codes eventually result in suspension of delivery:

1421 #4.4.5 Too many connections from your host
2421 #4.x.2 Too many messages for this session

When these error codes are left unaltered by the system, they generate excessive bounces and then execute the "High Action"—suspension. By adding the following custom code you can throttle delivery and avoid suspension:

1require('msys.adaptive')
2local rules =
3{
4  ["example.ca <http://example.ca/>"] =
5  {
6    responses =
7    {
8      {
9        code = "421 #4.4.5 Too many connections from your host",
10        trigger = "1",
11        action =  {"throttle", "down"},
12      },
13      {
14        code = "421 #4.x.2 Too many messages for this session",
15        trigger = "1",
16        action = {"throttle", "down"},
17      }
18    }
19  }
20}
21msys.adaptive.registerRules(rules, "augment")
Was this page helpful?