Skip to content

Commit 6bab124

Browse files
committed
docs(api): clarify accepted connection and snapshot behavior (#755, #704, #941, #733)
Explain managed AUTH outage failover, protected EML header boundaries, legacy DKIM exclusion ownership and provider-consistent probe ports. Architecture: ADR 0020, ADR 0029, ADR 0035, ADR 0036. Refs: bbottema/simple-java-mail#755, bbottema/simple-java-mail#704, bbottema/simple-java-mail#941, bbottema/simple-java-mail#733.
1 parent 5e076a5 commit 6bab124

5 files changed

Lines changed: 23 additions & 0 deletions

File tree

‎src/pages/debugging.hbs‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -311,6 +311,11 @@ Elapsed: 138ms</code></pre>
311311
Read the configured transport strategy from <code>mailer.getTransportStrategy()</code>. The probe reports what happened
312312
during connection setup; it does not repeat that configuration setting.
313313
</p>
314+
<p>
315+
For supported Angus connections, the reported port follows the provider's effective port setting. A supplied Session using
316+
<code>mail.smtp.port=0x9db</code>, for example, connects to and reports port <code>2523</code>. Missing or unusable port values retain
317+
the provider's protocol default; the probe does not rewrite the supplied properties.
318+
</p>
314319
<p>
315320
<code>getTlsDetails()</code> exposes the negotiated TLS protocol, cipher and public certificate identities when Angus's supported hooks
316321
allow it. The identity-check flag is configured policy, not a new trust verdict. A custom hostname verifier's result is separate,

‎src/pages/features.hbs‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2837,6 +2837,9 @@ CompletableFuture&lt;Void&gt; test = mailer.async().testConnection();
28372837
the restored email retains the configuration needed to sign and encrypt when sent. Java serialization does not itself apply cryptography.
28382838
For <a href="#section-exact-eml">exact protected EML</a>, restoration retains the authoritative bytes and does not sign or encrypt them again.
28392839
</p>
2840+
<p class="wide">Restoring a supported older DKIM configuration also gives it detached, immutable header exclusions. The original entries
2841+
remain selected, but changing a returned or separately retained collection cannot change the restored signing configuration.
2842+
Build a replacement <code>DkimConfig</code> when those choices need to change.</p>
28402843
<pre class="wide"><code class="language-java">byte[] snapshot;
28412844
try (ByteArrayOutputStream bytes = new ByteArrayOutputStream();
28422845
ObjectOutputStream output = new ObjectOutputStream(bytes)) {

‎src/pages/migration-notes-10.0.0.hbs‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1219,6 +1219,9 @@ boolean positiveReply = receipt.getSmtpResponse()
12191219
attachment/image input is copied.</p>
12201220
<p>If your code used a returned collection or retained input array to change an existing message, make the change through a builder and build
12211221
a replacement instead. A collection change can now throw <code>UnsupportedOperationException</code>, or affect only your detached copy.</p>
1222+
<p>This also applies to DKIM header exclusions restored from supported older snapshots, including 9.1.8. Their existing entries are retained
1223+
in a detached immutable Set. Code that changed <code>getExcludedHeadersFromDkimDefaultSigningList()</code> must instead build a replacement
1224+
<code>DkimConfig</code> and supply it to a new Email. No signing-key, exclusion-policy or serialized-format migration is required.</p>
12221225
<p>This does not freeze arbitrary attachment sources or forwarded <code>MimeMessage</code> objects. Keep those borrowed resources available
12231226
and stable while sending, converting or serializing the Email.</p>
12241227
<p>A failed required automatic-image resolution pass also leaves the builder's previous HTML and images intact. You can correct the HTML

‎src/pages/security.hbs‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -704,6 +704,9 @@ currentMailerBuilder
704704
<code>clearCipherAlgorithm()</code>. Clearing restores the downstream library's choice rather than selecting another algorithm.
705705
Keep these objects and their serialized forms private even though automatic rendering hides known key material.
706706
</p>
707+
<p>Completed DKIM header exclusions are immutable, including after restoring a supported older serialized configuration.
708+
A collection returned by the getter cannot change an Email's signing choices. Build a replacement <code>DkimConfig</code>
709+
when selecting different exclusions; older stored entries keep their meaning.</p>
707710
<p>In the unreleased 10.0.0 line, <code>dkimSigningDomain(null)</code> and <code>dkimSelector(null)</code> reject the
708711
missing argument before replacing an earlier choice. Handle a missing domain or selector before calling the setter;
709712
leave it uncalled when you intend to keep the current choice. Builder inspection stays passive, and optional algorithm
@@ -1455,6 +1458,10 @@ OriginalOpenPgpDetails details =
14551458
defaults/overrides completion carries outgoing OpenPGP settings without copying historical results or original protected bytes.
14561459
Protection is applied during later MIME preparation, and fresh plain/unsigned metadata on a completed Email does not verify that output.
14571460
Keep the original converted Email for inspection.</p>
1461+
<p class="wide">Ordinary EML import recognizes tolerated LF and mixed outer header endings before interpreting the protected MIME
1462+
parts. The first supported header separator ends those outer headers; an inner part's CRLF separator does not replace it.
1463+
The original protected bytes remain available unchanged. This does not relax the canonical CRLF requirement for
1464+
<a href="features.html#section-exact-eml">exact EML submission</a>.</p>
14581465
<div class="wide full-width-example">
14591466
<pre><code class="language-java">OriginalOpenPgpDetails details = received.getOriginalOpenPgpDetails();
14601467

‎src/pages/smtp-connection-failover.hbs‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,11 @@ try (Mailer alternative = mail.mailerBuilder()
116116
<p>By default, eligible failures include DNS lookup failure, connection refusal, unreachable endpoints, setup timeouts/disconnects and
117117
temporary service-unavailable setup replies. Invalid local configuration, message validation, lock conflicts and unmet required capabilities
118118
stop the send. So do unknown setup failures, ordinary pool-capacity timeouts, cancellation, shutdown and the overall deadline.</p>
119+
<p>On managed Angus connections, reliably identified outages during AUTH are setup failures too. A timeout, disconnect or
120+
<code>421</code> while authenticating can select the alternative without enabling credential-rejection failover. An actual rejection,
121+
such as <code>535</code>, still requires <code>withFailoverOnAuthenticationFailure(true)</code>; certificate permissions stay separate.</p>
122+
<p>A caller-supplied plain Angus Session is left unchanged. When its authentication exception does not distinguish an outage from rejected
123+
credentials, failover keeps the conservative authentication-failure handling and its existing opt-in.</p>
119124
<p>With the default one-attempt policy, A fails and B is considered immediately. Working B continues under its own sending limits while A waits
120125
for reconsideration. When A is due, one operation tries it; other eligible operations can continue through B. A successful setup restores its
121126
preference. Background pool replenishment does not keep opening new connections to A during that interval, and no health-probe executor is added.</p>

0 commit comments

Comments
 (0)