Scripting problem

Paul Schmehl pschmehl_lists at
Sun Oct 8 17:01:42 UTC 2017

--On October 8, 2017 at 10:00:17 AM +0200 Polytropon <freebsd at> 

> 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

More information about the freebsd-questions mailing list