Re: [PATCH] fix imap_mail actually use the rpath option
| From: | Keloran | Date: | Thu, 04 Aug 2011 16:07:25 +0000 |
| Subject: | Re: [PATCH] fix imap_mail actually use the rpath option | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-54364@lists.php.net to get a copy of this message | ||
patch attached
On Thu, Aug 4, 2011 at 4:39 PM, Pierre Joye <pierre.php@gmail.com> wrote:
> hi,
>
> Can you attach this patch to the bug please?
>
> Thanks for your work!
>
> On Thu, Aug 4, 2011 at 5:30 PM, Keloran <ava3ar@gmail.com> wrote:
> > Index: ext/imap/php_imap.c
> > ===================================================================
> > --- ext/imap/php_imap.c (revision 314217)
> > +++ ext/imap/php_imap.c (working copy)
> > @@ -4016,7 +4016,27 @@
> > if (!INI_STR("sendmail_path")) {
> > return 0;
> > }
> > - sendmail = popen(INI_STR("sendmail_path"), "w");
> > +
> > + /** Used to make return-path work **/
> > + char *sendmail_path = INI_STR("sendmail_path");
> > + char *appended_sendmail_path = NULL;
> > +
> > + /** Return Path or not **/
> > + if (rpath && rpath[0]) {
> > + appended_sendmail_path = emalloc(
> > + strlen(sendmail_path) + 3 + strlen(rpath) + 1);
> > + strcpy(appended_sendmail_path, sendmail_path);
> > + strcat(appended_sendmail_path, " -f");
> > + strcat(appended_sendmail_path, rpath);
> > + sendmail_path = appended_sendmail_path;
> > + }
> > +
> > + /** open the sendmail pointer **/
> > + sendmail = popen(sendmail_path, "w"); /* New Code */
> > +
> > + if (appended_sendmail_path)
> > + efree(appended_sendmail_path);
> > +
> > if (sendmail) {
> > if (rpath && rpath[0]) fprintf(sendmail, "From: %s\n",
> > rpath);
> > fprintf(sendmail, "To: %s\n", to);
> >
> > ================
> >
> > hopefully that will work to fix the rpath option, and finally close this
> > bug http://bugs.php.net/bug.php?id=30688
> >
>
>
>
> --
> Pierre
>
> @pierrejoye | http://blog.thepimp.net |
> http://www.libgd.org
>