From owner-freebsd-questions@FreeBSD.ORG Sat Apr 5 18:37:31 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BFE6037B401 for ; Sat, 5 Apr 2003 18:37:31 -0800 (PST) Received: from thalia.otenet.gr (thalia.otenet.gr [195.170.0.8]) by mx1.FreeBSD.org (Postfix) with ESMTP id BC65F43FAF for ; Sat, 5 Apr 2003 18:37:29 -0800 (PST) (envelope-from keramida@ceid.upatras.gr) Received: from gothmog.gr (patr530-b149.otenet.gr [212.205.244.157]) by thalia.otenet.gr (8.12.9/8.12.9) with ESMTP id h362bPfe015373; Sun, 6 Apr 2003 05:37:26 +0300 (EEST) Received: from gothmog.gr (gothmog [127.0.0.1]) by gothmog.gr (8.12.9/8.12.9) with ESMTP id h362bPt3004065; Sun, 6 Apr 2003 05:37:25 +0300 (EEST) (envelope-from keramida@ceid.upatras.gr) Received: (from giorgos@localhost) by gothmog.gr (8.12.9/8.12.9/Submit) id h362bOiq004064; Sun, 6 Apr 2003 05:37:24 +0300 (EEST) (envelope-from keramida@ceid.upatras.gr) Date: Sun, 6 Apr 2003 05:37:24 +0300 From: Giorgos Keramidas To: David Banning Message-ID: <20030406023724.GB3863@gothmog.gr> References: <20030404234509.A91877@skytrackercanada.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030404234509.A91877@skytrackercanada.com> cc: questions@freebsd.org Subject: Re: sending mail with a script question X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Apr 2003 02:37:32 -0000 On 2003-04-04 23:45, David Banning wrote: > > I am running a php program in a browser which eventually compiles some > files and emails them to a person of their choosing. The problem is > that the system identifies the browser user as nobody. > > I send the mail using a line something like; > > cat textfile | mutt -s"Quote/Attachments" -afile1 -afile2 john@doe.com > > but the problem is that the recipient sees the sender address as from > "nobody@ourhost.com", when I want it seen as "david@ourhost.com". I > have the name of the user available in the script but I see no way of > running the mail script as that person since any browser viewing the > system is "nobody". Try this: cat textfile | \ mutt -s "Subject here" \ -x -e 'set envelope_from=yes' -e 'my_hdr From: sender@address.net' \ -a attachment1 -a attachment2 \ john@doe.com The change is the addition of the two -e options and -x. - Giorgos