Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:97817 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 9078 invoked from network); 17 Jan 2017 16:26:08 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 17 Jan 2017 16:26:08 -0000 Authentication-Results: pb1.pair.com header.from=smalyshev@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=smalyshev@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.192.170 as permitted sender) X-PHP-List-Original-Sender: smalyshev@gmail.com X-Host-Fingerprint: 209.85.192.170 mail-pf0-f170.google.com Received: from [209.85.192.170] ([209.85.192.170:36070] helo=mail-pf0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id F9/07-00729-0A54E785 for ; Tue, 17 Jan 2017 11:26:08 -0500 Received: by mail-pf0-f170.google.com with SMTP id 189so63242212pfu.3 for ; Tue, 17 Jan 2017 08:26:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=j2VUgaESLRrr+KXQdxJZcO8rewUhKW2ULh4vOyquYQg=; b=rQfHPoR12gYoCBNpgO/i3Q6fa+DpYNreZVz9z2dwqt4hSdApgVSJ2k9+mhWBm3BLxH 0oFFqvrwk55ucaBhaWJwjxNekLOs+JbB3pq9M3wIVkq1ZSUCM6TyccDyeTahqvHD3MPR ydBW4mi6Kb3vHKtk8pt2sy6wP8MVa09CheYedO8/WVOaI2oGoaadcnkG9YhjgIYYmucb 4601FKTCm7UnNKtfw1/eP+TQ9Yu9ej/pru53j7dC6hXI2Vn9LX5St5D3wM5DUpG4V3Vw MnM0WR/2wZ1V/55ZU4ryGWUz/jIxpF2czG4XGcx08C68DqRCHTobekpRORLE/AdLVGbc Vanw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=j2VUgaESLRrr+KXQdxJZcO8rewUhKW2ULh4vOyquYQg=; b=c1DWFCEE6qyetfFyivEFalpu5wCW/nar3uaKU0QRrDFXrwe4isSuo266Yk5oP6G0ND i+59ea2vM9/HbQpbm0JDglshA7bWiOMksAe3+GZs/KUyo6fl/fD3rlcm+lKVgCAUH8F5 IcOao2N2uIQk0XBZJA9nvvt/R6q/yD5QyAGAxTsjmTB2g00hcPdRJC/Qz4ma663nBrcG CjP4ii563mCsaL7G9tLOiRQ4XU4lCzTB/3tUhZdKyFvQaGEgfc9+QzrPlGamzd5ZSZ8V /AuwcKqUHH1bX0RIgwPOyyMYIHoLEe6zLnCRBn6UFaK7mYFQ43Ej/6GB946cRLGqimTJ I2dA== X-Gm-Message-State: AIkVDXL1ZjYa9wKs/MEAwPTHQEZPoKFwNzrlp2VmWwKMFrTClS9PS2tVGWdTO3N2Bgk7Vg== X-Received: by 10.99.211.21 with SMTP id b21mr47757643pgg.120.1484670365371; Tue, 17 Jan 2017 08:26:05 -0800 (PST) Received: from Stas-Air.corp.wikimedia.org ([198.73.209.2]) by smtp.gmail.com with ESMTPSA id 66sm56967078pfx.29.2017.01.17.08.26.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 17 Jan 2017 08:26:04 -0800 (PST) To: Yasuo Ohgaki References: Cc: "internals@lists.php.net" Message-ID: Date: Tue, 17 Jan 2017 08:26:03 -0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Improving mail() 5th parameter handling From: smalyshev@gmail.com (Stanislav Malyshev) Hi! > I'm planning to use extra_parameters array like > > $opts = [ > '-f' => 'some@example.com ', // Envelope sender > '-4' => null, // Force IPv4 > '-au' => 'user@example.com ', // SMTP auth user > '-ap' => 'secret', // SMTP auth password > '-am' => 'CRAM-MD5', // SMTP auth method > ]; I don't think it is a good idea. Starting options with "-" is indeed a tradition, but only a tradition, and nothing prevents a tool from having different way of accepting options, including long format (--option) or Windows format (/option) or any other way. Hard-coupling it with specific sendmail options does not seem a good idea to me. It's better to tread each option as a full string than trying to parse it and introduce hard dependencies on specific binary's internals. > I cannot reseach all kinds of sendmail binaries. If there are exotic > sendmail binaries, > I would like to know the reference for them. Thank you. I don't think it is a good idea to specialize for specific binaries. -- Stas Malyshev smalyshev@gmail.com