From owner-freebsd-questions@FreeBSD.ORG Thu May 13 04:16:02 2004 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 E452C16A4CE for ; Thu, 13 May 2004 04:16:01 -0700 (PDT) Received: from smtp.infracaninophile.co.uk (smtp.infracaninophile.co.uk [81.2.69.218]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2E64243D54 for ; Thu, 13 May 2004 04:16:00 -0700 (PDT) (envelope-from m.seaman@infracaninophile.co.uk) Received: from happy-idiot-talk.infracaninophile.co.uk (localhost.infracaninophile.co.uk [IPv6:::1])i4DBFjNL040190 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 13 May 2004 12:15:45 +0100 (BST) (envelope-from matthew@happy-idiot-talk.infracaninophile.co.uk) Received: (from matthew@localhost)id i4DBFjd1040189; Thu, 13 May 2004 12:15:45 +0100 (BST) (envelope-from matthew) Date: Thu, 13 May 2004 12:15:45 +0100 From: Matthew Seaman To: Ian Barnes Message-ID: <20040513111545.GB39379@happy-idiot-talk.infracaninophile.co.uk> Mail-Followup-To: Matthew Seaman , Ian Barnes , questions@freebsd.org References: Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="rJwd6BRFiFCcLxzm" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.6i X-Virus-Scanned: clamd / ClamAV version devel-20040504, clamav-milter version 0.70u X-Virus-Status: Clean X-Spam-Status: No, hits=-4.8 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=2.63 X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on happy-idiot-talk.infracaninophile.co.uk cc: questions@freebsd.org Subject: Re: Cron Mailing 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: Thu, 13 May 2004 11:16:02 -0000 --rJwd6BRFiFCcLxzm Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, May 13, 2004 at 12:51:34PM +0200, Ian Barnes wrote: > Hi, >=20 > I am trying to find out if something is possible. On our servers we would > like all mail from cron not to come from root@boxname but rather from say > ian@boxname. I assume you still want the jobs to be run by root though, otherwise you could just use the 'ian' account's crontab file. =20 > Is this possible? Am i making sense :P ?? Sure. 'root' always used to be special cased so that emails from there don't go through address rewriting. But since sendmail-8.10 that's no longer the case. Just use the normal genericstable mechanisms to rewrite the sender address. Read through the bits of /usr/share/sendmail/cf/README that deal with genericstable first, but essentially what you need is: i) Make sure your /etc/mail/`hostname`.mc file contains: FEATURE(genericstable, `hash -o /etc/mail/genericstable')dnl if not, add it to the .mc file and rebuild sendmail.cf and restart sendmail in the usual way: # cd /etc/mail # vi `hostname`.mc # make all install restart-mta ii) Edit the /etc/mail/genericstable file to set up the e-mail address mappings you need. That will be, minimally: root ian and then process that into the .db hash format sendmail will read: # make iii) That's all you need to do. Send some e-mails as root to test. Nb. this rewrites all e-mail from root@box.name, not just the stuff emitted by cron. If you want to do that, it's going to be much harder to achieve. --=20 Dr Matthew J Seaman MA, D.Phil. 26 The Paddocks Savill Way PGP: http://www.infracaninophile.co.uk/pgpkey Marlow Tel: +44 1628 476614 Bucks., SL7 1TH UK --rJwd6BRFiFCcLxzm Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFAo1jhiD657aJF7eIRAhNiAJ46Ul6uzMx2yXBoLf1QSj0wYOOm1ACfWQr/ uJQ8JMgpzIEUB8gBIFwzmKo= =79nI -----END PGP SIGNATURE----- --rJwd6BRFiFCcLxzm--