Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:54364 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 34995 invoked from network); 4 Aug 2011 16:07:48 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 4 Aug 2011 16:07:48 -0000 Authentication-Results: pb1.pair.com header.from=ava3ar@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=ava3ar@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.220.170 as permitted sender) X-PHP-List-Original-Sender: ava3ar@gmail.com X-Host-Fingerprint: 209.85.220.170 mail-vx0-f170.google.com Received: from [209.85.220.170] ([209.85.220.170:52805] helo=mail-vx0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 91/B0-31835-3D3CA3E4 for ; Thu, 04 Aug 2011 12:07:48 -0400 Received: by vxh24 with SMTP id 24so497870vxh.29 for ; Thu, 04 Aug 2011 09:07:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=gLixEyNDupD0kawypz0mnfxArmB+wYgDnxbICeRBcLE=; b=nIehIAdQybrcq3Xw7I3rn2p3rvmZSazOwoKuZ7OCn2G1e7y/EzKF+9Cs1AVVxmgUCR U5sL6+478lWj1+ae1eOxwnV+yl2dCkjtEKzDgwYZMfaV1BC1ZKnrk/NF5aQBi0O18K5o p+qk7SgWY0oNKk+R2TagzV6DVKLsTgDBsiZBI= Received: by 10.52.27.36 with SMTP id q4mr1047674vdg.296.1312474065172; Thu, 04 Aug 2011 09:07:45 -0700 (PDT) MIME-Version: 1.0 Received: by 10.220.164.16 with HTTP; Thu, 4 Aug 2011 09:07:25 -0700 (PDT) In-Reply-To: References: Date: Thu, 4 Aug 2011 17:07:25 +0100 Message-ID: To: Pierre Joye Cc: PHP Internals Content-Type: multipart/mixed; boundary=bcaec5015e396e7a6904a9b02e49 Subject: Re: [PHP-DEV] [PATCH] fix imap_mail actually use the rpath option From: ava3ar@gmail.com (Keloran) --bcaec5015e396e7a6904a9b02e49 Content-Type: multipart/alternative; boundary=bcaec5015e396e7a6604a9b02e47 --bcaec5015e396e7a6604a9b02e47 Content-Type: text/plain; charset=ISO-8859-1 patch attached On Thu, Aug 4, 2011 at 4:39 PM, Pierre Joye 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 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 > --bcaec5015e396e7a6604a9b02e47 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable patch attached

On Thu, Aug 4, 2011 at 4:3= 9 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
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> --- ext/imap/php_imap.c (revision 314217)
> +++ ext/imap/php_imap.c (working copy)
> @@ -4016,7 +4016,27 @@
> =A0 =A0 =A0 =A0if (!INI_STR("sendmail_path")) {
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0return 0;
> =A0 =A0 =A0 =A0}
> - =A0 =A0 =A0 sendmail =3D popen(INI_STR("sendmail_path"), &= quot;w");
> +
> + =A0 =A0 =A0 /** Used to make return-path work **/
> + =A0 =A0 =A0 =A0char *sendmail_path =3D INI_STR("sendmail_path&q= uot;);
> + =A0 =A0 =A0 =A0char *appended_sendmail_path =3D NULL;
> +
> + =A0 =A0 =A0 =A0/** Return Path or not **/
> + =A0 =A0 =A0 =A0if (rpath && rpath[0]) {
> + =A0 =A0 =A0 =A0 =A0 =A0appended_sendmail_path =3D emalloc(
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0strlen(sendmail_path) + 3 + strlen(rp= ath) + 1);
> + =A0 =A0 =A0 =A0 =A0 =A0strcpy(appended_sendmail_path, sendmail_path)= ;
> + =A0 =A0 =A0 =A0 =A0 =A0strcat(appended_sendmail_path, " -f"= ;);
> + =A0 =A0 =A0 =A0 =A0 =A0strcat(appended_sendmail_path, rpath);
> + =A0 =A0 =A0 =A0 =A0 =A0sendmail_path =3D appended_sendmail_path;
> + =A0 =A0 =A0 =A0}
> +
> + =A0 =A0 =A0 =A0/** open the sendmail pointer **/
> + =A0 =A0 =A0 =A0sendmail =3D popen(sendmail_path, "w"); /* = New Code */
> +
> + =A0 =A0 =A0 if (appended_sendmail_path)
> + =A0 =A0 =A0 =A0 =A0 =A0efree(appended_sendmail_path);
> +
> =A0 =A0 =A0 =A0if (sendmail) {
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0if (rpath && rpath[0]) fprintf(= sendmail, "From: %s\n",
> rpath);
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0fprintf(sendmail, "To: %s\n",= to);
>
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
>
> hopefully that will work to fix the rpath option, and finally close th= is
> bug http://bugs.php.net/bug.php?id=3D30688
>



--
Pierre

@pierrejoye | http://= blog.thepimp.net | h= ttp://www.libgd.org

--bcaec5015e396e7a6604a9b02e47-- --bcaec5015e396e7a6904a9b02e49--