Page MenuHomePhabricator

Add some delivery diagnostic headers to outbound mail
ClosedPublic

Authored by epriestley on Feb 22 2018, 6:35 PM.
Tags
None
Referenced Files
F14076845: D19124.diff
Thu, Nov 21, 7:55 PM
Unknown Object (File)
Sun, Nov 17, 6:01 PM
Unknown Object (File)
Thu, Nov 14, 10:58 AM
Unknown Object (File)
Sun, Nov 10, 2:30 PM
Unknown Object (File)
Tue, Nov 5, 8:54 PM
Unknown Object (File)
Fri, Nov 1, 8:38 PM
Unknown Object (File)
Oct 20 2024, 12:06 AM
Unknown Object (File)
Oct 15 2024, 2:45 AM
Subscribers
None

Details

Summary

Fixes T13087. Ref T13090. An install ran into a situation where mail was being double-delivered, and it wasn't immediately clear where in the pipeline the issue lay.

This change adds some headers which should rule out (or, at least, render very unlikely) some possible causes if we encounter similar issues in the future.

The X-Phabricator-Mail-ID header stores the ID of the MetaMTAMail storage object so we can distinguish between two messages sent to two different targets and one message which may have been split or re-sent. It also makes it easier to know what to bin/mail show-outbound --id <id> and where to find the message in the web UI for additional information.

The X-Phabricator-Send-Attempt is a unique value per attempt. If two mail messages are delivered with the same attempt value, the split is probably downstream from Phabricator. If they have different attempt values, the split is probably in Phabricator.

(In this case, the split was somewhere downstream from us, since sending mail with /usr/bin/mail also resulted in duplicates.)

Test Plan

Send some mail, inspected it with bin/mail show-outbound --id <id>, saw new headers with sensible/expected values.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

This revision was not accepted when it landed; it landed in state Needs Review.Feb 22 2018, 8:47 PM
This revision was automatically updated to reflect the committed changes.