const NO_MATCH = /^$/;  // Use this to turn off matches for a given category.

const mailServers = {
  kattare: {
    access: {
      protocol: 'pop3',
      fqDomain: 'mail.kattare.com',
      port: 110,
      username: 'treelogic_admin',
      pwd: 'thundercl0uD1',
    },
    extractTasks: {
      billing: {  // Object properties (keys) are 'and'd, and Array elements inside the properties are 'or'd.
        subject: [ /^Kattare:\s+Payment\s+Received\s*$/, /^[Ff]w[d]?:\s+Kattare:\s+Payment\s+Received\s*$/ ],
        from: [ /.*/ ], // Uses the 'address' field only, not name.
        to: [ /.*/ ],  // Uses the 'address' field only, not name.
        text: { fixed_amount_bill: /Amount:\s*\$\s*(\d+)/gm, network_usage_bill: NO_MATCH },  // This is the e-mail body text.
      }
    }
  },
  localTest: {
      access: {
      protocol: 'pop3',
      fqDomain: 'localhost',
      port: 1110,
      username: 'treelogic_admin',
      pwd: '12345',
    },
    extractTasks: {
      billing: {  // Object properties (keys) are 'and'd, and Array elements inside the properties are 'or'd.
        subject: [ /^Kattare:\s+Payment\s+Received\s*$/, /^[Ff]w[d]?:\s+Kattare:\s+Payment\s+Received\s*$/ ],
        from: [ /.*/ ], // Uses the 'address' field only, not name.
        to: [ /.*/ ],  // Uses the 'address' field only, not name.
        text: { fixed_amount_bill: /Amount:\s*\$\s*(\d+)/gm, network_usage_bill: NO_MATCH },  // This is the e-mail body text.
      }
    }
  }
};

exports.mailServers = mailServers;

@@ -249,96 +249,397 @@
 d: '
-thundercl0uD1',%0A    %7D,%0A    extractTasks: %7B%0A      billing: %7B  // Object properties (
+', // @to-do: Get this from db in a salted form.%0A    %7D,%0A    extractTasks: %7B%0A      billing: %7B%0A        /*-%0A         * Config Doc:%0A         *%0A         * Object keys (keys: 'subject', 'from', 'to', 'text', and so forth) are either 'and'd or 'or'd depending%0A         * on the 'conditional' object specified below (see the 'localTest' config).%0A         * If it is left unspecified, then all 
 keys
-)
  are
@@ -649,61 +649,270 @@
 nd'd
-, and Array elements inside the properties are 'or'd.
+.%0A         * Also, if the 'conditional' object is specified, then only the relationships specified there are applied.%0A         *%0A         * Array elements inside the properties are 'or'd.  To use 'and' in that case, put the cases into a single regex.%0A         */
 %0A   
@@ -1957,32 +1957,105 @@
 mail body text.%0A
+        conditional: %5B %7B terms: %5B'subject', 'text'%5D, operator: 'or' %7D %5D,%0A
       %7D%0A    %7D%0A  

Remove username, pwd values from conf file (but maintain option to specify in conf).