From owner-freebsd-questions@FreeBSD.ORG Tue Jan 8 10:26:05 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 0FA0016A419 for ; Tue, 8 Jan 2008 10:26:05 +0000 (UTC) (envelope-from jimbow@darq.net) Received: from farnborough.darq.net (fab.darq.net [82.136.41.2]) by mx1.freebsd.org (Postfix) with ESMTP id E472513C455 for ; Tue, 8 Jan 2008 10:26:04 +0000 (UTC) (envelope-from jimbow@darq.net) Received: from localhost (localhost [127.0.0.1]) by farnborough.darq.net (Postfix) with ESMTP id 18FCB1D05F for ; Tue, 8 Jan 2008 10:26:25 +0000 (GMT) X-Virus-Scanned: amavisd-new at darq.net Received: from farnborough.darq.net ([127.0.0.1]) by localhost (farnborough.darq.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id bA91xP7Dr18k for ; Tue, 8 Jan 2008 10:26:19 +0000 (GMT) Received: from troop.darq.net (hackney.darq.net [78.86.112.102]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: zygis@darq.net) by farnborough.darq.net (Postfix) with ESMTP id 831E61D05C for ; Tue, 8 Jan 2008 10:26:16 +0000 (GMT) Message-ID: <47834FB2.9010907@darq.net> Date: Tue, 08 Jan 2008 10:25:54 +0000 From: Jim Bow User-Agent: Thunderbird 2.0.0.6 (X11/20071004) MIME-Version: 1.0 To: freebsd-questions@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: mail from: field question X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Jan 2008 10:26:05 -0000 Hi all, I have a small shell script that does a backup to a usb drive and emails the results to a set of people. The script is triggered from devd (upon drive attachment) and runs as root. The problem is that the mail report is sent from an active system user and not user root. The user the mail is sent from is not referenced in the script. The mail line looks like this: cat $LOGFILE | mail -s "backuptousb report" recipient@one.net I find this rather confusing since I was expecting the email to be sent by the user running the script. How can this be? A little research told me that this may be because of something called envelope-from, but I found little explanation of what that actually means. Anyone have any suggestions? Thanks, JimBow