Skip to content

Commit

Permalink
make header configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
NickOvt committed Nov 25, 2024
1 parent 547b4ed commit 51f313a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions config/wildduck.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -100,3 +100,5 @@ auth:

# If a public key has fewer bits than required, then DKIM and ARC keys are considered failing by policy
minBitLength: 1024

originalRcptHeader: 'X-Zone-Original-Rcpt'
3 changes: 2 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -792,7 +792,8 @@ exports.real_rcpt_handler = function (next, connection, params) {

if (addressData.address.includes('*')) {
// wildcard/catchall address received email
txn.add_header('X-Zone-Original-Rcpt', address);
const originalRcpHeaderName = plugin.cfg?.originalRcptHeader || 'X-Original-Rcpt';
txn.add_header(originalRcpHeaderName, address);
}

if (addressData && addressData.targets) {
Expand Down

0 comments on commit 51f313a

Please sign in to comment.