From owner-freebsd-questions@FreeBSD.ORG Tue Jul 15 01:49:34 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 107E2106564A for ; Tue, 15 Jul 2008 01:49:34 +0000 (UTC) (envelope-from bill@ayn.mi.celestial.com) Received: from ayn.mi.celestial.com (hayek.celestial.com [192.136.111.12]) by mx1.freebsd.org (Postfix) with ESMTP id EDCD88FC0A for ; Tue, 15 Jul 2008 01:49:33 +0000 (UTC) (envelope-from bill@ayn.mi.celestial.com) Received: from localhost (localhost [127.0.0.1]) by ayn.mi.celestial.com (Postfix) with ESMTP id 795B368C87388; Mon, 14 Jul 2008 18:49:32 -0700 (PDT) X-Virus-Scanned: amavisd-new at mi.celestial.com Received: from ayn.mi.celestial.com ([127.0.0.1]) by localhost (ayn.mi.celestial.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id KgyQVDKVNpTj; Mon, 14 Jul 2008 18:49:32 -0700 (PDT) Received: by ayn.mi.celestial.com (Postfix, from userid 203) id 5C9D26861470B; Mon, 14 Jul 2008 18:49:32 -0700 (PDT) Date: Mon, 14 Jul 2008 18:49:32 -0700 From: Bill Campbell To: freebsd-questions@freebsd.org Message-ID: <20080715014932.GA8268@ayn.mi.celestial.com> Mail-Followup-To: freebsd-questions@freebsd.org References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.18 OpenPKG/% (2008-05-17) Subject: Re: Change email header ..... X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: freebsd@celestial.com List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jul 2008 01:49:34 -0000 On Mon, Jul 14, 2008, Agus wrote: >Hi guys, > >All i wanna do this time is change the mail from: header to another >address...As my system is named after an internal network name and doesnt >resolv from outside my LAN..when i send an email, for instance when a user >registers, they received it with the systems internal address and they cant >reply it cause of course it will get bounced....So i wanna change the from >header to an address where i have a mail redirection account....I know how >to do it from telnet for instance..its simple..but as i send emails from a >script using the mail program.. > >I basically do cat welcome_msg|mail -s "Welcome..." user@mail > >So i was wondering if there is a way to send this automated emails changing >the header from: >Perhaps theres another program or way...Im open to suggestions... Mutt allows one to specify any headers you like, even being able to tailor them to the recipient. One could also contruct your own headers, and feed it through sendmail: cat << DONE From: foo@example.com Subject: anything you like Reply-To: foo1@exmple.com There is a blank line separating this message body from the headers above. Bill DONE || /usr/lib/sendmail recipient@example.com Substitute the appropriate path for sendmail if necessary. Bill -- INTERNET: bill@celestial.com Bill Campbell; Celestial Software LLC URL: http://www.celestial.com/ PO Box 820; 6641 E. Mercer Way Voice: (206) 236-1676 Mercer Island, WA 98040-0820 Fax: (206) 232-9186 Government spending? I don't know what it's all about. I don't know any more about this thing than an economist does, and, God knows, he doesn't know much. -- Will Rogers