baudehlo/Haraka — pull request #512 by msimerson (2014-03-20 22:17:24+00:00)
Title: Headers

renamed invalid -> invalid_return_path

### added functions
* user_agent
* direct_to_mx
* from_match
* mailing_list

Some of those should look familiar. :-)

### Tests

% ./run_tests tests/plugins/data.headers.js
Running tests: [ 'tests/plugins/data.headers.js' ]

data.headers.js
✔ invalid_date - none
✔ user_agent - none
✔ user_agent - user-agent
✔ user_agent - X-mailer
✔ direct_to_mx - auth user
✔ direct_to_mx - received 0
✔ direct_to_mx - received 1
✔ direct_to_mx - received 2
✔ from_match - match bare
✔ from_match - match typical
✔ from_match - match unquoted
✔ from_match - mismatch
✔ mailing_list - ezmlm true
✔ mailing_list - ezmlm false
✔ mailing_list - yahoogroups
✔ mailing_list - majordomo
✔ mailing_list - mailman
✔ mailing_list - majordomo v
✔ mailing_list - google groups

OK: 29 assertions (177ms)