Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Objective

Stop Precedence: bulk header from triggering rejection for specific sender.

Approach

Its not yet possible to do this in configuration, a scripted PreProc Task is possible to vary the value, removal of the header entirely is JEMHC-3329 - Getting issue details... STATUS . Ability to see ‘print’ output at edit time is JEMHC-3328 - Getting issue details... STATUS .

Example Mail

MIME-Version: 1.0
Received: by 10.223.112.12 with HTTP; Sat, 18 Jun 2011 22:42:26 -0700 (PDT)
Date: Sun, 19 Jun 2011 17:42:26 +1200
Subject: Testing
From: "Mr Andy" <andy@localhost.com>
To: support@localhost.com
Precedence: bulk
Content-Type: text/plain; charset=UTF-8

CHANGE BODY!!!

Script

if (message.getHeader('from')!=null && message.getHeader('from').toLowerCase().indexOf('andy@localhost.com')!=-1) {
message.setHeader('Precedence','ignore');
}

Test Script

assert.equal(message.getHeader('Precedence'), 'ignore');

Outcome:

Test Case passed

  • No labels