diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml
index 816e8c3..791723d 100644
--- a/.github/workflows/codeql.yml
+++ b/.github/workflows/codeql.yml
@@ -5,8 +5,6 @@ on:
branches: [master]
pull_request:
branches: [master]
- schedule:
- - cron: '18 7 * * 4'
jobs:
codeql:
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 489baf1..1478be9 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -4,8 +4,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/).
### Unreleased
-- fix: undefined variable in mech_mx if no valid MX found
+### [1.2.9] - 2024-11-19
+
+- fix: undefined variable exception when no MX is found, #32
- add: new spf_record_include_match property to allow for additional filtering
+- deps: bump versions to latest
### [1.2.8] - 2024-10-07
@@ -95,3 +98,4 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/).
[1.2.4]: https://github.com/haraka/haraka-plugin-spf/releases/tag/v1.2.4
[1.2.5]: https://github.com/haraka/haraka-plugin-spf/releases/tag/v1.2.5
[1.2.7]: https://github.com/haraka/haraka-plugin-spf/releases/tag/v1.2.7
+[1.2.9]: https://github.com/haraka/haraka-plugin-spf/releases/tag/v1.2.9
diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md
index b63b5df..fbdff49 100644
--- a/CONTRIBUTORS.md
+++ b/CONTRIBUTORS.md
@@ -2,7 +2,7 @@
This handcrafted artisinal software is brought to you by:
-|
msimerson (14) |
smfreegard (3) |
gramakri (1) |
DoobleD (1) |
ne4t0 (1) |
-| :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: |
+|
msimerson (15) |
smfreegard (4) |
DoobleD (2) |
gramakri (1) |
ne4t0 (1) |
+| :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: |
this file is maintained by [.release](https://github.com/msimerson/.release)
diff --git a/lib/spf.js b/lib/spf.js
index db0f3a2..58e8c35 100644
--- a/lib/spf.js
+++ b/lib/spf.js
@@ -362,7 +362,10 @@ class SPF {
switch (result) {
case this.SPF_PASS:
// Store matching "include" mechanisms
- this.spf_record_include_match = { ...this.spf_record_include_match, ...recurse.spf_record_include_match }
+ this.spf_record_include_match = {
+ ...this.spf_record_include_match,
+ ...recurse.spf_record_include_match,
+ }
this.spf_record_include_match[domain] = recurse.spf_record
return this.SPF_PASS
case this.SPF_FAIL:
@@ -512,7 +515,7 @@ class SPF {
resolve_method = 'resolve6'
}
- let addrs = [];
+ let addrs = []
try {
addrs = await dns[resolve_method](mx)
} catch (err) {
@@ -527,7 +530,7 @@ class SPF {
}
this.log_debug(`mech_mx: mx=${mx} addresses=${addrs?.join(',')}`)
- addresses = addrs ? addrs.concat(addresses) : [];
+ addresses = addrs ? addrs.concat(addresses) : []
}
if (!addresses.length) return this.SPF_NONE
diff --git a/package.json b/package.json
index 07639ad..7472c6d 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "haraka-plugin-spf",
- "version": "1.2.8",
+ "version": "1.2.9",
"description": "Sender Policy Framework (SPF) plugin for Haraka",
"main": "index.js",
"files": [
@@ -40,12 +40,12 @@
},
"dependencies": {
"haraka-dsn": "^1.1.0",
- "haraka-net-utils": "^1.7.0",
+ "haraka-net-utils": "^1.7.1",
"ipaddr.js": "^2.2.0",
- "nopt": "^7.2.1"
+ "nopt": "^8.0.0"
},
"devDependencies": {
"@haraka/eslint-config": "^1.1.5",
- "haraka-test-fixtures": "^1.3.7"
+ "haraka-test-fixtures": "^1.3.8"
}
}
diff --git a/test/spf.js b/test/spf.js
index f79241f..3709f18 100644
--- a/test/spf.js
+++ b/test/spf.js
@@ -112,6 +112,9 @@ describe('SPF', function () {
this.timeout = 3000
this.SPF.count = 0
await this.SPF.check_host('130.211.0.1', 'google.com')
- assert.ok(this.SPF.spf_record_include_match?.['_netblocks3.google.com'], 'expected include not found')
+ assert.ok(
+ this.SPF.spf_record_include_match?.['_netblocks3.google.com'],
+ 'expected include not found',
+ )
})
})