[pmwiki-users] possible bug in notify.php
Neil Herber (nospam)
nospam at eton.ca
Sat Feb 3 16:32:18 CST 2007
Patrick R. Michaud wrote:
> On Sat, Feb 03, 2007 at 01:13:34AM -0500, Neil Herber (nospam) wrote:
>> I am running pmwiki-2.1.26 and last Sunday I switched servers. Since
>> then, I haven't received any emails from notify.php.
>>
>> The only change that I can think of that would trigger this is that I
>> switched from PHP 4 to PHP 5.
>>
>> I upgraded Apache too, but I can't see it being the problem.
>>
>> By looking at the detailed transaction logs on the mail server, I
>> isolated the problem. During the SMTP handshake the MAIL FROM: is being
>> filled with a bad address:
>>
>> < nospam at eton.ca>
>>
>> instead of the correct:
>>
>> <nospam at eton.ca>
>>
>> I am not sure who puts on the angle brackets (PmWiki, PHP, or the mail
>> server) but I cured it by changing the following line in notify.php:
>>
>> if (@$NotifyFrom)
>> $NotifyHeaders = "From:$NotifyFrom\r\n$NotifyHeaders";
>>
>> In the original version there was a space after the From:
>>
>> That's it. Has anyone else had this problem? It would be murder to try
>> and debug without access to mail transaction logs.
>
> What was/is the setting of $NotifyFrom ?
>
> IIRC, the SMTP protocol requires a space after "From:" in the
> headers, so the original would seem to be correct. My guess
> is that there's an extra space showing up in the $NotifyFrom
> variable somehow.
>
> Pm
>
$NotifyFrom = 'x-wiki at eton.ca';
Changing this made no difference, but changing the notify.php line did.
I suspect it is some oddity in PHP 5 versus 4.
--
Neil Herber
Corporate info at http://www.eton.ca/
More information about the pmwiki-users
mailing list