Skip to content

Commit dd52fc1

Browse files
authored
Merge pull request #4 from DoobleD/master
Fix CRIT error
2 parents 5480195 + f950d86 commit dd52fc1

2 files changed

Lines changed: 12 additions & 8 deletions

File tree

CHANGELOG.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
# Changelog
22

3-
## [1.2.0](https://github.com/haraka/haraka-plugin-mailauth/compare/v1.1.1...v1.2.0) (2024-10-02)
3+
## [Unreleased]
44

5+
### Bug Fixes
56

6-
### Features
7+
* **hook_mail:** call `params[0].address` as a property instead of a method
8+
* **hook_data_post:** guard against missing `txn.notes.mailauth` when `hook_mail` was not called
79

8-
* **autopublish:** Use release-please to publish packages to npm from now on ([77bf575](https://github.com/haraka/haraka-plugin-mailauth/commit/77bf575a32dbb35d6a4cdf4938838ea1aa7d3d3a))
10+
## [1.2.0](https://github.com/haraka/haraka-plugin-mailauth/compare/v1.1.1...v1.2.0) (2024-10-02)
911

12+
### Features
1013

11-
### Bug Fixes
14+
* **autopublish:** Use release-please to publish packages to npm from now on ([77bf575](https://github.com/haraka/haraka-plugin-mailauth/commit/77bf575a32dbb35d6a4cdf4938838ea1aa7d3d3a))
1215

13-
* **checkSpf:** Merge pull request [#3](https://github.com/haraka/haraka-plugin-mailauth/issues/3) from haraka/release-1.1.1 ([5b92485](https://github.com/haraka/haraka-plugin-mailauth/commit/5b92485fa3592645b854333c9b6a6cb7ef35449d))
14-
* **checkSpf:** use modern paths to connection attributes ([5b92485](https://github.com/haraka/haraka-plugin-mailauth/commit/5b92485fa3592645b854333c9b6a6cb7ef35449d))
15-
* **checkSpf:** use modern paths to connection attributes ([3cdff3d](https://github.com/haraka/haraka-plugin-mailauth/commit/3cdff3df09ff457f411d772b4447e846d6753f9d))
1616

1717
## [1.1.1](https://github.com/postalsys/haraka-plugin-mailauth/compare/v1.1.0...v1.1.1) (2024-10-02)
1818

index.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ exports.hook_mail = function (next, connection, params) {
6262

6363
// Step 1. SPF
6464

65-
const sender = params[0].address();
65+
const sender = params[0].address;
6666
txn.notes.mailauth = {
6767
sender
6868
};
@@ -100,6 +100,10 @@ exports.hook_mail = function (next, connection, params) {
100100
async function hookDataPostAsync(stream, plugin, connection) {
101101
const txn = connection.transaction;
102102

103+
if (!txn.notes.mailauth) {
104+
txn.notes.mailauth = {};
105+
}
106+
103107
// Step 2. DKIM
104108
let dkimResult;
105109
try {

0 commit comments

Comments
 (0)