[pmwiki-users] possible bug in notify.php

Patrick R. Michaud pmichaud at pobox.com
Sat Feb 3 14:33:50 CST 2007


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



More information about the pmwiki-users mailing list