From owner-freebsd-questions@freebsd.org Sun Oct 8 08:00:31 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 BD63FE2C4E7 for ; Sun, 8 Oct 2017 08:00:31 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mailrelay12.qsc.de (mailrelay12.qsc.de [212.99.163.153]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.antispameurope.com", Issuer "TeleSec ServerPass DE-2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 035216CC for ; Sun, 8 Oct 2017 08:00:30 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mx01.qsc.de ([213.148.129.14]) by mailrelay12.qsc.de; Sun, 08 Oct 2017 10:00:21 +0200 Received: from r56.edvax.de (port-92-195-127-141.dynamic.qsc.de [92.195.127.141]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx01.qsc.de (Postfix) with ESMTPS id 7D1FC3CC3F; Sun, 8 Oct 2017 10:00:18 +0200 (CEST) Received: from r56.edvax.de (localhost [127.0.0.1]) by r56.edvax.de (8.14.5/8.14.5) with SMTP id v9880Hql002396; Sun, 8 Oct 2017 10:00:17 +0200 (CEST) (envelope-from freebsd@edvax.de) Date: Sun, 8 Oct 2017 10:00:17 +0200 From: Polytropon To: Paul Schmehl Cc: freebsd-questions@freebsd.org Subject: Re: Scripting problem Message-Id: <20171008100017.30ab5987.freebsd@edvax.de> In-Reply-To: <8C8E7D66788801594EC0FC4C@Pauls-MacBook-Pro.local> References: <7AB396F429EEB6890100F082@Pauls-MacBook-Pro.local> <8C8E7D66788801594EC0FC4C@Pauls-MacBook-Pro.local> Reply-To: Polytropon Organization: EDVAX X-Mailer: Sylpheed 3.1.1 (GTK+ 2.24.5; i386-portbld-freebsd8.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-cloud-security-sender: freebsd@edvax.de X-cloud-security-recipient: freebsd-questions@freebsd.org X-cloud-security-Virusscan: CLEAN X-cloud-security-disclaimer: This E-Mail was scanned by E-Mailservice on mailrelay12.qsc.de with 0FD016AB096 X-cloud-security-connect: mx01.qsc.de[213.148.129.14], TLS=1, IP=213.148.129.14 X-cloud-security: scantime:.9029 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 08:00:31 -0000 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. :-) -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...