I sent this to the dev list last week but it never got moderated so I
guessed I'd send it here to get it visible. Then that mail and another reply
never hit the list either so I guess some spam filter is blocking me. So
I'm copy & pasting this into gmail and hopefully this time it'll make it.
I think I've found a bug. My system is:
IlohaMail: IlohaMail-0.8.14-rc3 from tarball on website, using file
backend.
System: Linux dubmail.gcd.ie 2.6.3-31mdksmp #1 SMP Thu Apr 13 10:14:42 MDT
2006 i686 unknown unknown GNU/Linux
Distro: Mandrake Corporate Server 3
Mail Server: postfix-2.1.1-0.3.C30mdk
Mail scanner: amavisd-new-0.20030616-18mdk, spamassassin-2.63-3mdk,
clamav-0.88.2-0.1.C30mdk
Web Server: apache2-2.0.48-6.11.C30mdk
PHP: apache2-mod_php-2.0.48_4.3.4-1mdk
When we send mail, a newline character appears within the headers in the
middle of the received from line, eg:
========================================================================
Received: from 172.16.152.10 (auth. user [EMAIL PROTECTED])
by dubmail.gcd.ie with HTTP; Thu, 08 Jun 2006 10:18:41 +0000
========================================================================
this newline is not part of the mail as constructed in PHP. When we send
mail, it uses the PHP mail() function which sends using the postfix
instance on localhost.
An old bug on the PHP docs describes how PHP once recommended (incorrectly)
the use of "\r\n" on the line of every header passed to mail(). What
apparently should be done is to use "\r\n" on Windows and just "\n" on
UNIX.
http://bugs.php.net/bug.php?id=15841
The IlohaMail source code uses "\r\n" in this way. Interestingly, we didn't
see this problem for a long time using Postfix. Then we moved to a new
server (identical software versions) and this time set up Amavis as our
mail scanner. It seems that this may be the difference that revealed the
problem. I don't totally understand how the newline comes about, but the
diff below works around the problem effectively by converting all newlines
back to UNIX style "\n".
Can you copy me on replies as I'm not on-list,
Gavin
[EMAIL PROTECTED] source> diff compose2.php compose2.php~
681,686d680
< # Gavin Mc writ this bit
< if (substr(PHP_OS, 0, 3) != 'WIN') {
< $headerx = str_replace("\r\n", "\n", $headerx);
< $body = str_replace("\r\n", "\n", $body);
< }
< # end Gavin
_______________________________________________ Ilohamail-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ilohamail-users
