From owner-freebsd-questions@freebsd.org Sun Oct 8 17:01:42 2017 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 72CD9E3A894 for ; Sun, 8 Oct 2017 17:01:42 +0000 (UTC) (envelope-from pschmehl_lists@tx.rr.com) Received: from dnvrco-cmomta01.email.rr.com (dnvrco-outbound-snat.email.rr.com [107.14.73.228]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 32B177643E for ; Sun, 8 Oct 2017 17:01:41 +0000 (UTC) (envelope-from pschmehl_lists@tx.rr.com) Received: from [192.168.0.2] ([76.183.153.52]) by cmsmtp with ESMTPA id 1Eume4Iy9DCdC1EupeUXg2; Sun, 08 Oct 2017 16:59:00 +0000 Date: Sun, 08 Oct 2017 11:58:57 -0500 From: Paul Schmehl Reply-To: Paul Schmehl To: Polytropon cc: freebsd-questions@freebsd.org Subject: Re: Scripting problem Message-ID: <88D321A2CCD516AEF39DE8C3@Pauls-MacBook-Pro.local> In-Reply-To: <20171008100017.30ab5987.freebsd@edvax.de> References: <7AB396F429EEB6890100F082@Pauls-MacBook-Pro.local> <8C8E7D66788801594EC0FC4C@Pauls-MacBook-Pro.local> <20171008100017.30ab5987.freebsd@edvax.de> X-Mailer: Mulberry/4.0.8 (Mac OS X) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-CMAE-Envelope: MS4wfEGD61d4gvtLzjZD+CYkTso513YgVQpluRnp5GUJpf9MjwEeHnaD1MVw0GBrpIV9qgrsrWPv9GQU/KAU8EHnRyMhIPgKePXXhgX0FhErSdRckr5AgDdF ZCgpAGIiFip1FTVlGAAO4DI85nK3xLHDPHr6zrTjBrVpjaYXHCPOts1lpZ6I9kv2yaaiCDy6RSVtpQhjKOXqxwXf//IUh3OsSihaNW5SQv2vEq+EWLczkicR X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Oct 2017 17:01:42 -0000 --On October 8, 2017 at 10:00:17 AM +0200 Polytropon wrote: > On Sun, 08 Oct 2017 01:14:04 -0500, Paul Schmehl wrote: >> I guess I should have pointed out that I'm sending mail on localhost, so >> there's no auth involved. I'm using mutt because mailx doesn't appear to >> have the ability to attach files. > > You can attach files with classic mail / mailx, but you'd have > to create the headers yourself and maybe use b64encode, so your > solution really looks more comfortable. > > > >> I solved the problem by using a one word subject. It's weird that Mutt >> is somehow parsing the words in the subject and using them as >> recipients. > > As I said, mutt doesn't do that. Always keep in mind that space > (or whitespace in general) is the option delimiter in sh and bash. > So when you issue > > mutt -s Foo Bar Baz [...] > > the -s parameter will be "Foo" only (without the quotes). Then > mutt will receive the parameters "Bar" and "Baz" which it treats > as addresses (because there is no option switch infront of them, > so they have to be addresses, see "man mutt" for synopsis). > > To deal with this problem, make the shell submit the whole string > as _one_ parameter: > > mutt -s "Foo Bar Baz" [...] > > Now -s will receive "Foo Bar Baz" (without the quotes). Use double > quotes because you want shell expansion / variable evaluation. > > It's not mutt's fault. :-) I've considered myself a journeyman in FreeBSD, having used it for about twenty years now. I guess I need to go back to being an apprentice. I obviously don't understand how the shell works yet. Oh well, you're never too old to learn. Paul Schmehl, Retired As if it wasn't already obvious, my opinions are my own and not those of my employer. ******************************************* "It is as useless to argue with those who have renounced the use of reason as to administer medication to the dead." Thomas Jefferson "There are some ideas so wrong that only a very intelligent person could believe in them." George Orwell