1

When sending mail to multiple recipients, the X-Recipient header repeats, one for each recipient. For instance, when looking at View Source in FogBugz, I see this:

X-Sender: "Foo" <foo@sample.com>
X-Receiver: "Bar" <bar@sample.com>, "Baz" <baz@sample.com>, "Qux" <qux@sample.com>
X-Receiver: "Bar" <bar@sample.com>, "Baz" <baz@sample.com>, "Qux" <qux@sample.com>
X-Receiver: "Bar" <bar@sample.com>, "Baz" <baz@sample.com>, "Qux" <qux@sample.com>
Date: Tue, 17 Aug 2010 17:32:34 -07:00
From: "Foo" <foo@sample.com>
To: "Bar" <bar@sample.com>, "Baz" <baz@sample.com>, "Qux" <qux@sample.com>

Looking at the raw source at the receiving end, I see this (note the missing comma between Qux and Bar--there are two spaces instead):

X-Receiver: "Bar" <bar@sample.com>, "Baz" <baz@sample.com>, "Qux" <qux@sample.com>  "Bar" <bar@sample.com>, "Baz" <baz@sample.com>, "Qux" <qux@sample.com>  "Bar" <bar@sample.com>, "Baz" <baz@sample.com>, "Qux" <qux@sample.com>

The repeating lines are grouped by recipient field: To and CC repeat their multiple lines separately (e.g. if I have 2 recipients in the To field, and 3 in the CC field, I get 2 lines each with the 2 To addressees, and 3 lines each with the 3 CC addressees, rather than 5 lines with 5 addressees each). This translates into a bunch of extra X-Recipients, which seems to be causing problems with our associated mail server, and doesn't seem like desired behavior in any case.

The specific incident that triggered my investigation was an email that failed to be sent to clients. There were 9 recipients CC'ed on the message, which resulted in 82 X-Receivers instead of 10.

It is occurring on FogBugz Version 7.3.3 (DB 745, Build 2047) on Windows.

Fog Creek Case FC1930793

flag
Verified as fixed in 8.0. – Douglas Telfer Oct 6 2010 at 16:03

1 Answer

0

Where are you copying your example email from?

If you're obtaining the email source by clicking on the small drop down arrow in the upper right-hand corner of an email event and selecting "View Source" you will not necessarily be seeing the headers that are actually being sent.

When an email is sent in FogBugz we first serialize it to the MailQueue table. Then, the FogBugz Maintenance Service will periodically trigger the actual mail sending process. At this stage, the email is read in from the MailQueue table and sent. During this step any X-Receiver headers in the email are ignored.

Can you check the raw email source on the receiving end to see if the same problem exists? In my tests, I've found that only a single X-Receiver header is being sent.

UPDATE: This has been fixed and will be released with FogBugz 8. The email source shown when selecting "View Source" will now more closely match what is actually sent (a single X-Receiver header with no duplicates).

link|flag
Thanks, I checked the headers at the receiving end. As you said, there was only a single X-Receiver header. However, that single header contains all of the recipients (including the duplicates). I've updated the description above. – Douglas Telfer Aug 18 2010 at 16:15
Actually, the main problem I'm having has to do with the duplicate X-Receivers rather than the mismatch between View Source and what is being sent out. – Douglas Telfer Aug 18 2010 at 17:22
I've tested this with my fix and I'm not seeing any duplicates in the X-Receiver header, but I'd like to test your specific repro case just to be sure. You're having problems with 2 addresses in the "To" field and 3 in the "CC" field? – db Aug 18 2010 at 17:27
I've seen duplicates as noted in the following situations: 1 in the TO, 4 in the CC 1 in the TO, 3 in the CC 2 in the TO, 4 in the CC I tested a few more with more recipients, but more than about 20 overall (including the duplicates), and the mail doesn't make it out and so I can't verify the headers on the receiving end (this is probably a problem with our mail server). All those cases exhibit the same repeated X-Receiver behavior within FogBugz, though. – Douglas Telfer Aug 18 2010 at 21:49
Thanks for all the additional info! I've tested my fix with various mixes of multiple address in the TO and CC fields and it looks ok in "View Source" in FogBugz as well as on the receiving end now. – db Aug 19 2010 at 15:33

Your Answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.