Nigel Metheringham edited this page Nov 29, 2012 · 2 revisions
Clone this wiki locally



I'm using tmail to do local deliveries, but when I turned on the use_crlf option on the pipe transport (tmail prefers \r\n terminations) message bodies started to vanish.


You need to unset the mesage_prefix option, or change it so that its default \n terminator becomes \r\n. For example, the transport could be:

r = pipe
nd = /usr/local/bin/tmail $local_part
= exim
nt_directory = /
  message_prefix =

The reason for this is as follows: tmail uses the line terminator on the first line it sees to determine whether lines are terminated by \r\n or \n. If the latter, it moans to stderr and changes subsequent \n terminators to \r\n. The default setting of the message_prefix option is From ...\n, and this is unaffected by the use_crlf option. If you don't change this, tmail sees the first line terminated by \n and prepends \r to the \n terminator on all subsequent lines. However, if use_crlf is set, Exim makes all other lines \r\n terminated, leading to doubled \r\r\n lines and corrupt mbx mailboxes.