Permalink
Browse files

Make sure init runs before any other checks

  • Loading branch information...
1 parent e16a830 commit f9b85e2301d8512f208e561bfca9b5ae380cafa3 @smfreegard smfreegard committed Jul 2, 2014
Showing with 4 additions and 1 deletion.
  1. +4 −1 plugins/helo.checks.js
View
5 plugins/helo.checks.js
@@ -4,7 +4,6 @@ var net_utils = require('./net_utils');
var utils = require('./utils');
var checks = [
- 'init', // config loading, multiplicity detection
'match_re', // List of regexps
'bare_ip', // HELO is bare IP (vs required Address Literal)
'dynamic', // HELO hostname looks dynamic (dsl|dialup|etc...)
@@ -20,6 +19,10 @@ var checks = [
exports.register = function () {
var plugin = this;
+ // init must always run first
+ plugin.register_hook('helo', 'init');
+ plugin.register_hook('ehlo', 'init');
+
plugin.register_hook('helo', 'proto_mismatch_smtp');
plugin.register_hook('ehlo', 'proto_mismatch_esmtp');

0 comments on commit f9b85e2

Please sign in to comment.