Topic: [exim4] & PunBB mails

Hi all,

Yesterday we released v2 of a Dutch community site called zaanzone.nl
As some of you might know, we run a punbb forum at forum.zaanzone.nl

Since  v2 of the site is running on a brand new server we ran into some problems with the smtp-server (exim4) and punbb.
Everytime punBB wants to send a message, I get an error in my mail log like this (changed .nl to invalid...)

2005-02-06 10:36:48 1CxiqW-0006bR-Pm H=localhost [127.0.0.1] F=<beheer@zaanzone.invalid> rejected after DATA: syntax error in 'From:' header when scanning for send
er: malformed address: Date: Sun may not follow ZaanZone Mailer <beheer@zaanzone.invalid>
Envelope-from: <beheer@zaanzone.nl>
Envelope-to: <xxxx@crazyplace.invalid>
P Received: from localhost ([127.0.0.1])
        by klinkhamer.zaanzone.nl with smtp (Exim 4.34)
        id 1CxiqW-0006bR-Pm
        for xavier@crazyplace.nl; Sun, 06 Feb 2005 10:36:48 +0100
  Subject: p: Antwoord op bericht: 'MSN-naam'
T To: <xxxx@crazyplace.invalid>,
F From: ZaanZone Mailer <beheer@zaanzone.nl>
Date: Sun,  6 Feb 2005 10:36:43 +0100
MIME-Version: 1.0
Content-transfer-encoding: 8bit
Content-type: text/plain; charset=iso-8859-1
X-Mailer: PunBB Mailer
  Message-ID: <E1CxiqW-0006bR-Pm@klinkhamer.zaanzone.nl>

So there is some syntax error I gues. I checked the mailscript but that looks ok:

$headers = 'From: '.$from."\n".'Date: '.date('r')."\n".'MIM

Anyone else experienced this and maybe know a fix?

Greetings,

Klaas Schaafsma

Re: [exim4] & PunBB mails

To me it looks just fine. There doesn't appear to be anything wrong with those headers apart from the single letters at the beginning of the lines (e.g. "T To:"), but I'm guessing that's something Exim has added.

Try replacing \n with \r\n on the line you pasted from email.php. You seem to be running an earlier version of PunBB. In 1.2 and later, PunBB tries to detect what kind of linebreaks it should use in the headers, but I don't think that would have helped in your case.

"Programming is like sex: one mistake and you have to support it for the rest of your life."

Re: [exim4] & PunBB mails

Rickard, I just went through this problem myself and the detection implemented in >=1.2 does NOT properly detect Exim, and so this error is still here. It is checking for WIN and MAC and not the MTA itself. Exim must have \r\n, not \n, and I had to manually add in that code to support it. Hopefully this will help out anyone like me who spent a bunch of time pulling their hair out.

Re: [exim4] & PunBB mails

putnam: Unfortunately, there is nothing PunBB can do about that. It can't possibly detect what MTA is used.

"Programming is like sex: one mistake and you have to support it for the rest of your life."