Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 23 Feb 2005 03:32:50 -0800
From:      "Ted Mittelstaedt" <tedm@toybox.placo.com>
To:        "Ian Moore" <no-spam@swiftdsl.com.au>, <freebsd-questions@freebsd.org>
Cc:        Ruben de Groot <mail25@bzerk.org>
Subject:   RE: Sendmail masquerading configuration
Message-ID:  <LOBBIFDAGNMAMLGJJCKNAEHOFAAA.tedm@toybox.placo.com>
In-Reply-To: <200502231957.32345.no-spam@swiftdsl.com.au>

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


> -----Original Message-----
> From: Ian Moore [mailto:no-spam@swiftdsl.com.au]
> Sent: Wednesday, February 23, 2005 1:27 AM
> To: freebsd-questions@freebsd.org
> Cc: Ted Mittelstaedt; Ruben de Groot
> Subject: Re: Sendmail masquerading configuration
>
>
> On Sat, 19 Feb 2005 18:01, Ted Mittelstaedt wrote:
> > > -----Original Message-----
> > > From: owner-freebsd-questions@freebsd.org
> > > [mailto:owner-freebsd-questions@freebsd.org]On Behalf Of Ian Moore
> > > Sent: Wednesday, February 16, 2005 2:10 AM
> > > To: Ted Mittelstaedt
> > > Cc: Ruben de Groot; freebsd-questions@freebsd.org
> > > Subject: Re: Sendmail masquerading configuration
> > >
> > > On Thu, 10 Feb 2005 22:14, Ted Mittelstaedt wrote:
> > > > Ian Moore wrote:
> > > > > On Wed, 9 Feb 2005 17:21, Ted Mittelstaedt wrote:
> > > > >> I would probably install src/usr.sbin/ and recompile
> cron to use
> > > > >> the -f flag.  The flags are settible in cron/config.h in
> > >
> > > the source,
> > >
> > > > >> FreeBSD uses
> > > > >>
> > > > >> #define MAILARGS "%s -FCronDaemon -odi -oem -oi -t"
> > >
> > >       /*-*/
> > >
> > > > >> just change this to
> > > > >>
> > > > >> #define MAILARGS "%s -FCronDaemon -froot@verizon.net
> -odi -oem -oi
> > > > >> -t" /*-*/
> > > > >>
> > > > >> Ted
> > > > >
> > > > > Thanks, I'll give that a go.
> > >
> > > Hi,
> > > Sorry, I'm still having trouble with this - my changes
> don't seem to
> > > have had any effect, cron is still sending mail as
> > > root@internal.hamcoll.sa.edu.au (Cron Daemon)
> > > I think I've done something wrong!
> > >
> > > What I did was:
> > >
> > > #cd /usr/src/usr.sbin/cron/cron
> > > #ee config.h:
> > > and I changed the line
> > >   #define MAILARGS "%s -FCronDaemon -odi -oem -oi -t"
> > >     /*-*/
> > >   to
> > >   #define MAILARGS "%s -Froot@hamcoll.sa.edu.au -odi -oem -oi
> > > -t"  /*-*/
> > >
> > > (I assume the # at the beginning is correct?)
> >
> > Yes.  But, the line is incorrect - it needs to be the following:
> >
> > #define MAILARGS "%s -FCronDaemon -froot@hamcoll.sa.edu.au
> -odi -oem -oi
> >
> > See my earlier posting for this.   "man sendmail" also will
> explain the
> > flags a bit as well.
> >
> > The rest of the stuff is fine.
> >
> > Ted
>
> Thanks Ted, - I should have read more carefully.
>
> Well that sort of works - cron jobs get sent from
> root@hamcoll.sa.edu.au
> except for the periodic jobs, which are still sent from
> root@<hostname>.hamcoll.sa.edu.au.

That might be nothing more than the

From:

line in the e-mail.  Does the actual received address show:

root@<hostname>.hamcoll.sa.edu.au <root@hamcoll.sa.edu.au>

or

root@<hostname>.hamcoll.sa.edu.au <root@<hostname>.hamcoll.sa.edu.au>

If it's the first, then your fine, it is because the periodic
script is generating the From: line in the body of the e-mail
message.

> Perhaps periodic sends the
> emails itself
> instead of cron, though looking at it's source I can't see how.
>
> Also, I still need to adjust my sendmail config on the server
> that is our
> local smtp server. It seems to be putting the hostname back in
> cron's emails.
>

Some masquerading option must be set on it.  Once again, check the
received message to see if the real senders envelope address is getting
munged, not
just the From: address.

Ted



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