I'm running Cyrus IMAP on RedHat 7.0 with sendmail 8.11.0.  For a
long time I ran Cyrus 1.5.24 but a few days ago I converted to 2.0.12,
at the same time changing the sendmail configuration as described in
the installation instructions, incorporating the changes in the supplied
cyrusv2.mc sendmail prototype file for Cyrus V2.

Since then some of my incoming mail messages (retrieved from a POP server
via fetchmail and delivered locally, as I've been doing without problem
for years) are being corrupted in the following way: a spurious newline
appears at the end of a "Received" header, and the headers which follow
become part of the message body.

I've tracked it down this far: whenever this occurs, it turns out that
the problematic header, as retrieved from the POP server and before
local processing, contains TWO carriage-returns followed by a single LF,
i.e. that header line, and all the lines that follow in the message,
are terminated with "\r\r\n" instead of "\r\n".  Only that first header,
and none of the following lines, have an extra blank line appended after
local processing.

I never saw this problem before I upgraded Cyrus and changed the sendmail
configuration.  Furthermore, if I pass the messages to another SMTP host
instead of my own, they're correctly delivered into that other host's mail
store (a more conventional mbox format).  So I'm reasonably sure that my
new configuration, and probably the sendmail configuration, is to blame.

Sendmail subtleties of this sort are definitely not my area of expertise.
I would greatly appreciate it if anyone has seen this problem or
something similar, and can suggest how I might go about fixing it.
The presumably relevant pieces of the sendmail config, lifted straight
out of the cyrusv2.mc file, are:

        define(`confBIND_OPTS',`-DNSRCH -DEFNAMES')dnl
        define(`confTO_IDENT',`0')dnl

        define(`confLOCAL_MAILER',`cyrus')dnl

        FEATURE(nocanonify)dnl
        FEATURE(always_add_domain)dnl
        MAILER(local)dnl
        MAILER(smtp)dnl
        
        MAILER_DEFINITIONS
        Mcyrus,         P=[IPC], F=lsDFMnqA@/:|SmXz, E=\r\n,
                        S=EnvFromL, R=EnvToL/HdrToL, T=DNS/RFC822/X-Unix, 
                        A=FILE /var/imap/socket/lmtp

        LOCAL_RULE_0
        Rbb + $+ < @ $=w . >    $#cyrus $: + $1

Reply via email to