From owner-freebsd-questions@freebsd.org Tue Oct 10 16:19:21 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 1A54CE3651C for ; Tue, 10 Oct 2017 16:19:21 +0000 (UTC) (envelope-from markham@ssimicro.com) Received: from barracuda.ssimicro.com (barracuda.ssimicro.com [96.46.39.196]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.ssimicro.com", Issuer "RapidSSL SHA256 CA - G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DD1763647 for ; Tue, 10 Oct 2017 16:19:20 +0000 (UTC) (envelope-from markham@ssimicro.com) X-ASG-Debug-ID: 1507652351-08e7172d0bd8ccf0001-jLrpzn Received: from mail.ssimicro.com (mail.ssimicro.com [64.247.129.10]) by barracuda.ssimicro.com with ESMTP id ByKsl4jZ0naPUdIz (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Tue, 10 Oct 2017 12:19:12 -0400 (EDT) X-Barracuda-Envelope-From: markham@ssimicro.com X-Barracuda-Effective-Source-IP: mail.ssimicro.com[64.247.129.10] X-Barracuda-Apparent-Source-IP: 64.247.129.10 Received: from markham.ssimicro.com (markham.ssimicro.com [64.247.130.99]) (authenticated bits=0) by mail.ssimicro.com (8.15.2/8.15.2) with ESMTPSA id v9AGJBvn033411 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Tue, 10 Oct 2017 10:19:11 -0600 (MDT) (envelope-from markham@ssimicro.com) Subject: Re: Scripting problem To: freebsd-questions@freebsd.org X-ASG-Orig-Subj: Re: Scripting problem References: <7AB396F429EEB6890100F082@Pauls-MacBook-Pro.local> <8C8E7D66788801594EC0FC4C@Pauls-MacBook-Pro.local> From: markham breitbach Message-ID: Date: Tue, 10 Oct 2017 10:19:11 -0600 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: <8C8E7D66788801594EC0FC4C@Pauls-MacBook-Pro.local> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Content-Language: en-US X-Barracuda-Connect: mail.ssimicro.com[64.247.129.10] X-Barracuda-Start-Time: 1507652352 X-Barracuda-Encrypted: ECDHE-RSA-AES256-GCM-SHA384 X-Barracuda-URL: https://barracuda.ssimicro.com:443/cgi-mod/mark.cgi X-Barracuda-Scan-Msg-Size: 1985 X-Virus-Scanned: by bsmtpd at ssimicro.com X-Barracuda-BRTS-Status: 1 X-Barracuda-Spam-Score: 0.00 X-Barracuda-Spam-Status: No, SCORE=0.00 using per-user scores of TAG_LEVEL=1000.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=5.0 tests= X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.3.43769 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 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: Tue, 10 Oct 2017 16:19:21 -0000 The easiest way to attach files in mailx is to use uuencode. something like this: dbdump.sh | uuencode dbdump.sql=A0 | mail -s "DB backup for today" myemail@example.com -M On 2017-10-08 12:14 AM, Paul Schmehl wrote: > --On October 8, 2017 at 6:08:51 AM +0000 Manish Jain > wrote: > >> >> I do not use mutt (one of the most unfriendly Unix apps) so I cannot >> comment on what is the problem here. But I would to suggest one thing = to >> you for CLI mail : use the port/pkg smtp-cli >> >> Here is a working sample for mail with attachment (bundled into the ba= sh >> shell array att) : >> >> smtp-cli \ >> =A0=A0=A0=A0--ipv4 \ >> =A0=A0=A0=A0--auth \ >> =A0=A0=A0=A0--server=3D"$SMTP" \ >> =A0=A0=A0=A0--port=3D$PORT \ >> =A0=A0=A0=A0--user=3D"$fromaddr" \ >> =A0=A0=A0=A0--pass=3D"$password" \ >> =A0=A0=A0=A0--from=3D"$fromname <$fromaddr>" \ >> =A0=A0=A0=A0--to=3D"$sendto" \ >> =A0=A0=A0=A0--subject=3D"$subject" \ >> =A0=A0=A0=A0"${att[@]}" >> >> If this solves your problem, good luck=A0 : - ) >> > 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. > > 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 recipient= s. > > 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 > > _______________________________________________ > freebsd-questions@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to > "freebsd-questions-unsubscribe@freebsd.org"