From owner-freebsd-questions@FreeBSD.ORG Sat Oct 24 11:08:45 2009 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 CD8F0106568B for ; Sat, 24 Oct 2009 11:08:45 +0000 (UTC) (envelope-from fbsdq@peterk.org) Received: from poshta.pknet.net (poshta.pknet.net [216.241.167.213]) by mx1.freebsd.org (Postfix) with SMTP id 6EFF48FC13 for ; Sat, 24 Oct 2009 11:08:45 +0000 (UTC) Received: (qmail 85626 invoked from network); 24 Oct 2009 11:08:44 -0000 Received: from poshta.pknet.net (HELO pop.pknet.net) (216.241.167.213) by poshta.pknet.net with SMTP; 24 Oct 2009 11:08:44 -0000 Received: from 216.241.167.212 (SquirrelMail authenticated user fbsdq@peterk.org) by webmail.pknet.net with HTTP; Sat, 24 Oct 2009 05:08:44 -0600 (MDT) Message-ID: <8b76dbb87253b769509a46ef66b2f01f.squirrel@webmail.pknet.net> Date: Sat, 24 Oct 2009 05:08:44 -0600 (MDT) From: "Peter" To: "Kelly Martin" User-Agent: SquirrelMail/1.4.17 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal Cc: FreeBSD Questions Subject: RE: changing cron's From: address in emails 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: Sat, 24 Oct 2009 11:08:45 -0000 iH, Would this do it? server:$pwd /usr/src/usr.sbin/cron server:$grep -Ri "Cron Daemon" * cron/do_command.c: fprintf(mail, "From: %s (Cron Daemon)\n", usernm); Recompile cron? ]Peter[ **************************************************************** Greetings, here's a simple question for the FreeBSD gurus out there. I have several servers running cron scripts daily for me, and they all send me e-mail with their output. Regardless of which server it is, each of these e-mails have the From: address looking exactly the same. They all say they are from the "Cron Daemon". Fine, but I'd like to know more clearly which server the cron output is from. How can I change the From: address of these emails to "Myserver Cron Daemon" instead? I know cron runs as the user, so it's not immediately obvious to me how to change the From: field. Already the subject line says something like "Cron ..." but this doesn't stand out enough for my tired eyes. thanks, Kelly