Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 13 May 2004 13:30:50 +0200
From:      "Ian Barnes" <ian@cerebellum.za.net>
To:        "Matthew Seaman" <m.seaman@infracaninophile.co.uk>
Cc:        questions@freebsd.org
Subject:   RE: Cron Mailing
Message-ID:  <DGEOIPPIAJBPINGMKMGKEEBNFJAA.ian@cerebellum.za.net>
In-Reply-To: <20040513111545.GB39379@happy-idiot-talk.infracaninophile.co.uk>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi,

Thanks for the reply. Yes we want cron to be run as root. Okay, we are
running exim, so I will see what i can do.

Thanks

Ian

> -----Original Message-----
> From: Matthew Seaman [mailto:m.seaman@infracaninophile.co.uk]
> Sent: 13 May 2004 01:16 PM
> To: Ian Barnes
> Cc: questions@freebsd.org
> Subject: Re: Cron Mailing
>
>
> On Thu, May 13, 2004 at 12:51:34PM +0200, Ian Barnes wrote:
> > Hi,
> >
> > 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.
>
> > 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.
>
> --
> 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
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?DGEOIPPIAJBPINGMKMGKEEBNFJAA.ian>