Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:54361 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 26276 invoked from network); 4 Aug 2011 15:37:50 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 4 Aug 2011 15:37:50 -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.212.42 as permitted sender) X-PHP-List-Original-Sender: ava3ar@gmail.com X-Host-Fingerprint: 209.85.212.42 mail-vw0-f42.google.com Received: from [209.85.212.42] ([209.85.212.42:50553] helo=mail-vw0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 4A/00-25862-BCCBA3E4 for ; Thu, 04 Aug 2011 11:37:48 -0400 Received: by vwl1 with SMTP id 1so1306659vwl.29 for ; Thu, 04 Aug 2011 08:37:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:from:date:message-id:subject:to:content-type; bh=2Mtat2Pw5j7ug8YYu4UexSWvra705YWivhpxDGwvpy0=; b=bVNEWuBF0SjaVtDUZ2uI/PnZQoGxSFc04huCaan50aZhTIZCvdO88JoRfCTZXI+ylN ws0kuhrteQA2mTsUYA5QJRziGDu4+NTHuxnHolqhqZAGR4wd3dCX8cyeGwWROSq6kzUN W69vx48sAhY6GjZMi+g/Fo88Fqx6UbO87cam0= Received: by 10.52.26.236 with SMTP id o12mr919627vdg.497.1312471868160; Thu, 04 Aug 2011 08:31:08 -0700 (PDT) MIME-Version: 1.0 Received: by 10.220.164.16 with HTTP; Thu, 4 Aug 2011 08:30:48 -0700 (PDT) Date: Thu, 4 Aug 2011 16:30:48 +0100 Message-ID: To: PHP Internals Content-Type: multipart/alternative; boundary=20cf307811707abb3304a9afab8c Subject: [PATCH] fix imap_mail actually use the rpath option From: ava3ar@gmail.com (Keloran) --20cf307811707abb3304a9afab8c Content-Type: text/plain; charset=ISO-8859-1 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 --20cf307811707abb3304a9afab8c--