Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix undefined variable exception when no MX is found and add spf_reco…
…rd_include_match property (haraka#32) Changes proposed in this pull request: - Fix crash in mech_mx code, caused by undefined variable if no valid MXs are found: ````` SPF error: domain sampark.gov.in Cannot read properties of undefined (reading 'join') TypeError: Cannot read properties of undefined (reading 'join') at SPF.mech_mx (/app/node_modules/haraka-plugin-spf/lib/spf.js:523:59) at async SPF.check_host (/app/node_modules/haraka-plugin-spf/lib/spf.js:307:22) at async cachedSPFLookup (/app/processors/dblack/index.js:26:27) at async Processor.process (/app/processors/dblack/index.js:122:20) at async /app/processors/lib/lib.js:813:11 at async #process (/app/processors/lib/lib.js:808:12) ````` - Add new `spf_record_include_match` property to allow for additional filtering e.g. find includes that allow larges swathes of IPv4 space: ````` source_ip=95.79.45.75 domain="moduineffectua.com" spfRecord="v=spf1 include:_so.moduineffectua.com include:_vz.moduineffectua.com include:_v.moduineffectua.com ~all" match_include="v=spf1 ip4:0.0.0.0/5 ip4:8.0.0.0/7 ip4:11.0.0.0/8 ip4:12.0.0.0/6 ip4:16.0.0.0/4 ip4:32.0.0.0/3 ip4:64.0.0.0/2 ip4:128.0.0.0/3 ip4:160.0.0.0/5 ip4:168.0.0.0/6 ~all" include_domain="_so.moduineffectua.com" ````` Checklist: - [X] docs updated - [X] tests updated - [X] Changes.md updated
- Loading branch information