a49093915 via Postfix-users:
> Hello,
> 
> Unfortunately I was unable to find this information myself, so I am now 
> asking here:
> 
> Does postfix forward the end of data characters from the client or does it 
> replace them?
> Is there any way to influence this behavior?

Line endings depends on context. UNIX files and commands use <LF>,
whereas SMTP and LMTP use <CR><LF>. Instead of picking a specific
line ending, Postfix uses none. Instead it stores a length and text.

When delivering mail, Postfix ADDS the line endings that are appropriate.

- The delivery agents for UNIX files and commands add <LF> line endings.
  The pipe daemon can also be configured to prepend "." and append
  <CR><LF>.

- The Postfix SMTP and LMTP clients add the SMTP encapsulation:
  they append <CR><LF> at the end of a line, and prepend "." to to
  lines that start with ".". This behavior is required by the
  protocol and is not configurable.

For completeness, when receiving mail, Postfix strips line endings.

- The Postfix SMTP server REMOVES the SMTP encapsulation: the
  <CR><LF> line endings and "." at the start of a line. 

  (for compatiility with poorly written apps, it may also permit
  bare <LF<> depending on "smtpd_forbid_bare_newline" configuration).

- The Postfix sendmail command REMOVES the UNIX-style <LF> line
  ending. 

  (for compatibility with poorly written apps, it may also remove
  <CRL><LF> depending on "sendmail_fix_line_endings" cxonfiguration)

Additionally, the latest Postfix 3.5..2.9 versions will replace
<LF> or <CR> in the middle of a line with the SPACE character.
This neutraslizes any attempts to inject false line endings.

        Wietse
_______________________________________________
Postfix-users mailing list -- postfix-users@postfix.org
To unsubscribe send an email to postfix-users-le...@postfix.org

Reply via email to