baudehlo/Haraka — pull request #509 by msimerson (2014-03-20 20:35:19+00:00)
Title: Helo

### New tests:
1. forward_dns
2. rdns_match
3. mismatch (hostname differs between invocations)

### Changed tests:
1. no_dot and valid_tld were folded into valid_hostname

### New behavior
* skip: Added a [skip] section to the config. Defaults are to skips connections from RFC 1918 and connections with relaying=true.
* reject: Added a [reject] section to the config with a boolean toggle for each check.
* renamed legacy check_test* into [check] section with toggles for each check.

### Tests

% ./run_tests tests/plugins/helo.checks.js
Running tests: [ 'tests/plugins/helo.checks.js' ]

helo.checks.js
✔ mismatch - disabled
✔ mismatch - enabled=true, mismatch, reject=false
✔ mismatch - enabled=true, mismatch, reject=true
✔ rdns_match - disabled
✔ rdns_match - enabled, pass
✔ rdns_match - enabled, pass (org dom match)
✔ rdns_match - enabled, fail
✔ rdns_match - enabled, fail, reject
✔ bare_ip - disabled
✔ bare_ip - enabled, pass
✔ bare_ip - enabled, fail
✔ bare_ip - enabled, fail, reject
✔ dynamic - disabled
✔ dynamic - enabled, pass
✔ dynamic - enabled, fail
✔ dynamic - enabled, fail, reject
✔ big_company - disabled
✔ big_company - pass, reject=false
✔ big_company - fail, reject=false
✔ big_company - fail, reject=true
✔ literal_mismatch - disabled
✔ literal_mismatch - pass
✔ literal_mismatch - pass, network
✔ literal_mismatch - fail, reject=false
✔ literal_mismatch - fail, reject=true
✔ valid_hostname - disabled
✔ valid_hostname - pass
✔ valid_hostname - fail, reject=false
✔ valid_hostname - fail, reject=true
✔ is_ipv4_literal - 3 ways
✔ forward_dns - disabled
✔ forward_dns - enabled, pass
✔ forward_dns - enabled, fail, reject=false
✔ forward_dns - enabled, fail, reject=true

OK: 69 assertions (248ms)