Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upsmtp forward dest split routing #1847
Conversation
msimerson
changed the title from
Smtp forward dest split
to
Smtp forward dest split routing
Mar 6, 2017
msimerson
changed the title from
Smtp forward dest split routing
to
smtp forward dest split routing
Mar 6, 2017
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment
Hide comment
codecov-io
Mar 6, 2017
Codecov Report
Merging #1847 into master will not change coverage.
The diff coverage isn/a.
@@ Coverage Diff @@
## master #1847 +/- ##
=======================================
Coverage 46.23% 46.23%
=======================================
Files 22 22
Lines 5864 5864
Branches 1474 1474
=======================================
Hits 2711 2711
Misses 3153 3153| Impacted Files | Coverage Δ | |
|---|---|---|
| outbound.js | 13.45% <ø> (ø) |
|
| smtp_client.js | 6.8% <0%> (-0.03%) |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing data
Powered by Codecov. Last update 51589b3...d6dcf10. Read the comment docs.
codecov-io
commented
Mar 6, 2017
•
Codecov Report
@@ Coverage Diff @@
## master #1847 +/- ##
=======================================
Coverage 46.23% 46.23%
=======================================
Files 22 22
Lines 5864 5864
Branches 1474 1474
=======================================
Hits 2711 2711
Misses 3153 3153
Continue to review full report at Codecov.
|
msimerson
added some commits
Mar 6, 2017
msimerson
referenced this pull request
Mar 6, 2017
Open
smtp_forward and proxy have `enable_outbound` as default true #1472
msimerson
added
Discuss
Wants Review
labels
Mar 6, 2017
msimerson
merged commit 016a83d
into
haraka:master
Mar 8, 2017
msimerson
deleted the
msimerson:smtp-forward-dest-split
branch
Mar 8, 2017
added a commit
that referenced
this pull request
Mar 28, 2017
added a commit
that referenced
this pull request
Mar 28, 2017
added a commit
that referenced
this pull request
Jul 29, 2017
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
msimerson commentedMar 6, 2017
•
edited
This is progress on #1472 and it improves upon a longstanding mail routing issue that affects users of per-domain mail forwarding.
I have a bunch of
[domain.com]blocks in smtp_forward.ini and most domains have differing forward hosts. When a transaction has recipients in domains with different forward hosts, then those subsequent recipients are sent to the wrong destination host. Theone_message_per_rcptoption in smtp_forward just does anRSETbetween transactions to the forward host of the first recipient.The previous workaround was to forward transactions with multiple destination hosts to the default forward host and let the smart host sort it out. See #573 and #671. That works reasonably well the vast majority of the time. The edge case is split transactions with undeliverable recipients. They end up being queued and some of those recipients are ultimately undeliverable and bounce.
This PR removes the "forward multiple destination transactions to smarthost and let it sort it out" behavior and adds recipient validation to smtp_forward. Example:
Within a transaction, it defers subsequent recipients if they have a different forward host than the first recipient. This is possible because
smtp_forward.inialready has the forward host information. Other recipient/queue plugins can cooperate by settingtxn.notes.queue.Changes proposed in this pull request:
check_sender()&check_recipient()smtp_forward.ini:txn.notes.queue:outboundtxn.notes.queue=smtp_forward:hostnametxn.notes.queueis defined but doesn't start withsmtp_forward, then smtp_forward doesn't queue.hook_queueto its own functionget_mxhook, so that recipients in connections whererelaying=truethat are destined to a local domain (defined in smtp_forward.ini and for which we are the MX for) can be queued to outbound and still be deliverable.Checklist: