[ZendTo] Re: Revisiting the Return-Path change from Sept. 2010 archive

Jules Jules at Zend.To
Fri May 20 09:03:32 BST 2011



On 19/05/2011 17:20, Naz Snidanko wrote:
> Hi Jules,
>
> Unfortunately it doesn't work with Reply-To: header. We experimented with it before and bounce backs (in early versions of ZendTo) don't get bounced to the email address specified by this header.
But "Errors-To:" might do the trick.
>   The only working way, and I m currently using it in production, is to create additional function in NSSDropbox.php which properly generates Return-Path :
>
>   public function deliverEmail_fix(
>      $toAddr,
>      $fromAddr,
>      $subject,
>      $content
>    )
>    {
>          $tmp_msg_string = "To: $toAddr\nSubject:  $subject\n\n$content\n";
>          $tmp_handle = popen ("/usr/lib/sendmail -f$fromAddr $toAddr", "w");
>          fwrite ($tmp_handle, $tmp_msg_string);
>          $result = pclose ($tmp_handle);
>    }
These days sendmail lives in /usr/sbin on Linux, only Solaris still puts 
it into /usr/lib if I remember rightly.

I don't want to have to call the sendmail binary directly if I can 
possibly avoid it.
Also, make sure you do *really* thorough input validation on the $toAddr 
and $subject and $content. Can people give an email address of "no-one; 
rm -rf /;" ?

You need to be *very* careful calling sendmail like that, which is 
partly why I don't want to go down that route if at all possible.

Jules.
> We discussed that in Sept 2010. Editing php.ini is not practical, its easier to edit this code.
>
> Regards,
> Naz Snidanko
> Desktop&  Network Support
> Wajax Power Systems
> (p) (416) 201-7506
> nsnidanko at wajax.com
> ________________________________________
> From: zendto-bounces at zend.to [zendto-bounces at zend.to] On Behalf Of Jules [Jules at zend.to]
> Sent: May 18, 2011 4:52 PM
> To: ZendTo Users
> Subject: [ZendTo] Re: Revisiting the Return-Path change from Sept. 2010 archive
>
> Can it not be done by adding a "Reply-To" header to the outgoing emails?
>
> On 18/05/2011 16:36, Craig Chambers wrote:
>> Jules,
>>
>> I have not found any other way besides editing the php.ini file :(
>>
>> I am definitely not a code guru but I was wondering if the install script could prompt the installer for a return-path email address. Depending on how aggressive you wanted to be with the assumption that the return-path domain is the same, you could also pre-populate that email address and domain suffix in various places in the preferences file during installation as well.
>>
>> - Craig
>>
>> On May 17, 2011, at 1:40 AM, Jules<Jules at zend.to>   wrote:
>>
>>> Is there *any* way of achieving the same effect without having to
>>> manually edit php.ini? Currently I have scripted all the changes to that
>>> file, which makes it much easier to install.
>>>
>>> Thanks,
>>> Jules.
>>>
>>> On 17/05/2011 08:23, Craig Chambers wrote:
>>>> I know this is an old topic but I wanted to follow-up because I was
>>>> running into the same issue and have found a solution that appears to
>>>> work for me on Ubuntu 10.10.
>>>>
>>>> To summarize the problem, when ZendTo sends an automated message the
>>>> Return-Path becomes www-data at domain.com instead of the email address
>>>> you specified in the ZendTo configuration. According to what I
>>>> gathered from the thread, sendmail overrides any changes to the
>>>> configuration of NSSDropbox.php. I am not sure if this is a valid fix
>>>> for most people but I was able to fix the problem by adding the
>>>> following to the bottom of my PHP.ini file:
>>>>
>>>> sendmail_path =/usr/sbin/sendmail -t -i –f user at domain.com
>>>> (substituting your email address of course)
>>>>
>>>> This still mens you have to manually modify a file, but at least you
>>>> are not digging around your sendmail configuration files. As usual,
>>>> your results may differ but I wanted to add this to the discussion in
>>>> case it is useful for someone else.
>>>>
>>> Jules
>>>
>>> --
>>> Julian Field MEng CITP CEng
>>> www.Zend.To
>>>
>>> Follow me at twitter.com/JulesFM
>>> PGP footprint: EE81 D763 3DB0 0BFD E1DC 7222 11F6 5947 1415 B654
>>>
>>> 'All programs have a desire to be useful' - Tron, 1982
>>>
>>>
>>> _______________________________________________
>>> ZendTo mailing list
>>> ZendTo at zend.to
>>> http://mailman.ecs.soton.ac.uk/mailman/listinfo/zendto
>> _______________________________________________
>> ZendTo mailing list
>> ZendTo at zend.to
>> http://mailman.ecs.soton.ac.uk/mailman/listinfo/zendto
> Jules
>
> --
> Julian Field MEng CITP CEng
> www.Zend.To
>
> Follow me at twitter.com/JulesFM
> PGP footprint: EE81 D763 3DB0 0BFD E1DC 7222 11F6 5947 1415 B654
>
> 'Teach a man to reason, and he will think for a lifetime.' - Phil Plait                                       'All programs have a desire to be useful' - Tron, 1982
>
>
> _______________________________________________
> ZendTo mailing list
> ZendTo at zend.to
> http://mailman.ecs.soton.ac.uk/mailman/listinfo/zendto
> _______________________________________________
> ZendTo mailing list
> ZendTo at zend.to
> http://mailman.ecs.soton.ac.uk/mailman/listinfo/zendto

Jules

-- 
Julian Field MEng CITP CEng
www.Zend.To

Follow me at twitter.com/JulesFM
PGP footprint: EE81 D763 3DB0 0BFD E1DC 7222 11F6 5947 1415 B654

'All programs have a desire to be useful' - Tron, 1982




More information about the ZendTo mailing list