Gaute Amundsen: > On Wednesday 15 October 2008 14:03:06 Wietse Venema wrote: > > Gaute Amundsen: > <snip> > > > The issue as I understand it : > > > Postfix expects EOL to be LF when picking up mail from sendmail on unix > > > and replaces that with CRLF when sending. When it gets CRLF it still > > > replaces the LF and we get CRCRLF. > > > > This understanding is too simplistic. > > Not unexpected :) > <snip> > > Specifically, Postfix accepts local submissions in UNIX format > > (LF) or MSDOS format (CRLF) format BUT YOU MIST NOT MIX FORMATS. > > So how does postfix determine what format you are using? > Is there a way to explicitly tell it what to expect?
Postfix looks at the first input line. There currently is no way to override this, so your best bet is to use the same line terminator consistently (having a first line with CRLF might work "best" for hybrid mail, but that behavior is not promised). The current behavior originates from the time when binary tranparency was considered a good thing. > <snip> > > It would be really good if PHP application programmers formatted > > email messages in a consistent manner. For example, they could use > > a variable that contains the END-OF-LINE terminator, instead of > > hard-coding LF or CRLF line terminators all over the place. > > > > That is basic software engineering practice. > > Well, fixing my own application was no problem, once I understood the problem > sufficiently. > > I suspect your are trying to make a point that most php developers don't know > basic software engineering, however I still think it a bit strong to expect > people that happen to develop on a box that uses sendmail to anticipate this > issue. At this point I could vent some hostile comments about banging away at the keyboard and declaring victory when the last error message disappears, but let's leave that for a different discussion. > But never mind. Yes. > If you are expecting me to fix the other odd hundred instances of mail() in > applications I had no hand in developing on the other hand, that is just over > the top. > And what about admins, that don't even know php, but just runs the stuff? The familiar complaint: it "works" with Sendmail, so it must be right. > As far as postfix is often the forward migration path for sendmail users, I am > under the impression that one good enginering practice is not to needlessly > break backward compatibility, and in cases where you do, provide a switch for > old-type behavior. The familiar reply: Postfix is not bug-compatible with Sendmail. > There are several config parameters with the word "workaround" in them so > there is no general policy against that I presume. > > Perhaps the only problem is that no one has offered a patch yet? That, too. After several years of deployment Postfix has some clout, and I am no longer bending over backwards in order to forgive every inconsistency in other mail handling software. Wietse