Closed macosforgebot closed 13 years ago
mail@… originally submitted this as comment:1:ticket:416
My patch in the initial comment does not solve this issue entirely as somewhere empty lines are inserted -- as can be seen in the output above.
But it at least allows one to read the mail.
@m0rgen originally submitted this as comment:2:ticket:416
I am not able to reproduce this using OS X Server. I tested by having Calendar Server send an iMIP invite to a gmail account, and then instead of using the iMIP mechanism within gmail to respond, I hit the Reply button and typed in some text without including the .ics attachment. This caused Calendar Server to forward that message to the original organizer of the event (with no header duplication).
mail@… originally submitted this as attachment:issue416.py:ticket:416
test case to see duplicating headers
mail@… originally submitted this as attachment:calendarserver-mailforwarding.patch:ticket:416
patch to fix all mail forwarding issues for me
mail@… originally submitted this as attachment:mail.tar.gz:ticket:416
here you see the diffrent mailstrings dumped into text files
mail@… originally submitted this as attachment:fixlines.patch:ticket:416
the attached dumps have been generated by the following patch
mail@… originally submitted this as comment:3:ticket:416
I spend a long time debugging this issue.
This issue is caused by different linebreaks: It was caused by somehow incorrect lineending handling.
Read from my IMAP, I have message containing \r\n when they get read by message_from_string() They are delimited by \n in the header and still \r\n in the content.
Sending the mail via ESMTPSenderFactory() now creates two \n into \r\n as of RFC2822, but does so for the content too, therefore too many line breaks are in there.
One MUST NOT use str(msg) as this contains the unix header (envelope) and therefore the headers will be added twice ...
My issue416.py is useless and wrong. But calendarserver-mailforwarding.patch solves all my problems.
mail@… originally submitted this as comment:4:ticket:416
@sagen: thanks alot for testing this! I hope with the info attached you see my issue.
For the double spaced lines one has to send a plain/text message, otherwise the linebreaks will not be seen...
mail@… originally submitted this as comment:5:ticket:416
Could somebody look at calendarserver-mailforwarding.patch, I still need it.
@m0rgen originally submitted this as comment:6:ticket:416
Sorry for the delay, how's this: https://trac.calendarserver.org/changeset/7819/CalendarServer/trunk
mail@… originally submitted this as ticket:416
Hi,
when replying to a tokenized mail, the message should be forwared. This does not work with r6910.
The header is included twice in the mail send to the organizer:
With the following patch, to strip out the envelope header:
One gets the following: