Skip to content

Commit

Permalink
remove_ip -> remove.ip. Otherwise shows undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
NickOvt committed Aug 2, 2024
1 parent abbf94f commit 49f0d0e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ exports.register = function () {
};

exports.load_wildduck_cfg = function () {

this.cfg = this.config.get(
'wildduck.yaml',
{
Expand Down Expand Up @@ -588,7 +587,7 @@ exports.hook_rcpt = function (next, connection, params) {
exports.real_rcpt_handler = function (next, connection, params) {
const plugin = this;
const txn = connection.transaction;
const remoteIp = connection.remote_ip;
const remoteIp = connection.remote.ip;

const { recipients, forwards, users } = txn.notes.targets;

Expand Down
2 changes: 1 addition & 1 deletion lib/auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ async function hookMail(plugin, connection, params) {
try {
spfResult = await checkSpf({
resolver: plugin.resolver,
ip: connection.remote_ip, // SMTP client IP
ip: connection.remote.ip, // SMTP client IP
helo: connection.hello?.host, // EHLO/HELO hostname
sender: txn.notes.sender, // MAIL FROM address
mta: connection.local?.host, // MX hostname
Expand Down
2 changes: 1 addition & 1 deletion lib/hooks.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ async function mail(plugin, connection, params) {
_mail_action: 'mail_from',
_from: txn.notes.sender,
_queue_id: txn.uuid,
_ip: connection.remote_ip,
_ip: connection.remote.ip,
_proto: txn.notes.transmissionType
});

Expand Down

0 comments on commit 49f0d0e

Please sign in to comment.