postal icon indicating copy to clipboard operation
postal copied to clipboard

/r/n

Open blakilox opened this issue 8 years ago • 4 comments

One of the first things I notice when moving to Postal as a relay agent is my scripts that use /r/n in the headers all break, and html messages don't render in Outlook so this used to work when using Mailgun/Sendgrid I guess they were nicely replacing my /r/n with /n they seem to do this as a Helper, and thus mask the classic windows/unix difference and improve reliability It would be good for Postal to do similar, or a Switch to do similar The consensus out there seems to be that /r/n is the correct standard though /n works reliably in every case.. Anyway if you are searching for a solution on this one, in your code/headers just replace /r/n with /n to make Postal behave (It's actually not Postal's fault it's probably doing the correct thing)

blakilox avatar Jul 28 '18 16:07 blakilox

The standard calls for CRLF (\r\n) so you shouldn't be encountering problems with this specifically.

Can you share some screenshots of what you're experiencing? Are the headers you're sending to Postal definitely using \r\n?

willpower232 avatar Jul 29 '18 10:07 willpower232

Sorry, yes I do mean replace \r\n with \n Ok perhaps its at my Postfix end, that's just what I had to do to all my mailout script before the HTML ones would render when going via Postal, whereas they would work earlier when going via Mailgun or Sendgrid and the only thing changed was the Relay Agent into postal, So I am just wondering if the likes of Mailgun are modifying incoming mail to account for differences that end users do

blakilox avatar Aug 20 '18 19:08 blakilox

Its possible they do but not sure.

If you can intercept messages between Postfix and Postal, you should be able to identify what the line endings are and correct as necessary.

willpower232 avatar Aug 21 '18 14:08 willpower232

\r\n is the correct line ending for emails (regardless of operating system). In its SMTP server, postal will convert all new lines to \r\n. If you are using the HTTP API, I'm not sure, it may pass through "\r" unchanged, in which case you would need to make sure you are sending the correct line endings. Would you be able to provide more information about how you are sending the emails, and exactly what problem you are seeing?

catphish avatar Aug 22 '18 11:08 catphish