From owner-freebsd-stable@freebsd.org Tue Apr 9 21:40:11 2019 Return-Path: Delivered-To: freebsd-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 84D46156EDAC for ; Tue, 9 Apr 2019 21:40:11 +0000 (UTC) (envelope-from SRS0=cKrl=SL=quip.cz=000.fbsd@elsa.codelab.cz) Received: from elsa.codelab.cz (elsa.codelab.cz [94.124.105.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 02D4C837C8 for ; Tue, 9 Apr 2019 21:40:11 +0000 (UTC) (envelope-from SRS0=cKrl=SL=quip.cz=000.fbsd@elsa.codelab.cz) Received: from elsa.codelab.cz (localhost [127.0.0.1]) by elsa.codelab.cz (Postfix) with ESMTP id 4EC2928426; Tue, 9 Apr 2019 23:40:00 +0200 (CEST) Received: from illbsd.quip.test (ip-62-24-76-131.net.upcbroadband.cz [62.24.76.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by elsa.codelab.cz (Postfix) with ESMTPSA id 3922F28423; Tue, 9 Apr 2019 23:39:59 +0200 (CEST) Subject: Re: Mailx Question To: Software Info , "freebsd-stable@freebsd.org" References: <5cad0a1f.1c69fb81.c5304.4f33@mx.google.com> From: Miroslav Lachman <000.fbsd@quip.cz> Message-ID: <0d44d441-3120-c140-40da-7a32baff0cae@quip.cz> Date: Tue, 9 Apr 2019 23:39:59 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Firefox/52.0 SeaMonkey/2.49.3 MIME-Version: 1.0 In-Reply-To: <5cad0a1f.1c69fb81.c5304.4f33@mx.google.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 02D4C837C8 X-Spamd-Bar: +++++ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [5.07 / 15.00]; TO_DN_EQ_ADDR_SOME(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; MX_GOOD(-0.01)[cached: elsa.codelab.cz]; RCPT_COUNT_TWO(0.00)[2]; FORGED_SENDER(0.30)[000.fbsd@quip.cz,SRS0=cKrl=SL=quip.cz=000.fbsd@elsa.codelab.cz]; FREEMAIL_TO(0.00)[gmail.com]; IP_SCORE(0.92)[ip: (0.43), ipnet: 94.124.104.0/21(0.22), asn: 42000(3.89), country: CZ(0.08)]; R_DKIM_NA(0.00)[]; ASN(0.00)[asn:42000, ipnet:94.124.104.0/21, country:CZ]; MIME_TRACE(0.00)[0:+]; FROM_NEQ_ENVFROM(0.00)[000.fbsd@quip.cz,SRS0=cKrl=SL=quip.cz=000.fbsd@elsa.codelab.cz]; ARC_NA(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; NEURAL_SPAM_SHORT(0.97)[0.967,0]; MIME_GOOD(-0.10)[text/plain]; RCVD_TLS_LAST(0.00)[]; DMARC_NA(0.00)[quip.cz]; AUTH_NA(1.00)[]; NEURAL_SPAM_MEDIUM(0.99)[0.989,0]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_SPAM_LONG(1.00)[0.999,0]; RCVD_IN_DNSWL_NONE(0.00)[4.105.124.94.list.dnswl.org : 127.0.10.0]; R_SPF_NA(0.00)[] X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Apr 2019 21:40:11 -0000 Software Info wrote on 2019/04/09 23:09: > Hi All > Since mailx is built into FreeBSD I decided to try asking this question here. I have a text file with about 30 email addresses. The file will change every day. I want an easy commandline way to read the file and blind copy send an email to the addresses in the file. So far, I have this working with just a plain send using the command below. > mailx -s "Test Emails" -b `cat mylist.txt` < body.txt -r "No-Reply" > > Of course, when I use a plain send, everybody sees everybody’s email address so I would love to be able to do a blind copy send. Would anyone be able to assist me with this? It may depend on your MTA (Sendmail, Postfix, Exim etc.) "You must specify direct recipients with -s, -c, or -b." -b bcc-addr Send blind carbon copies to bcc-addr list of users. The bcc-addr argument should be a comma-separated list of names. You should replace newlines with comma: cat mylist.txt | tr "\n" "," Maybe something like this will work for you: mail -s "Test E-mails" -b `cat mylist.txt | tr "\n" ","` my-generic@example.com < body.txt Miroslav Lachman