Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 16 Feb 2005 20:40:10 +1030
From:      Ian Moore <no-spam@swiftdsl.com.au>
To:        "Ted Mittelstaedt" <tedm@toybox.placo.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Sendmail masquerading configuration
Message-ID:  <200502162040.18799.no-spam@swiftdsl.com.au>
In-Reply-To: <LOBBIFDAGNMAMLGJJCKNGEFIFAAA.tedm@toybox.placo.com>
References:  <LOBBIFDAGNMAMLGJJCKNGEFIFAAA.tedm@toybox.placo.com>

next in thread | previous in thread | raw e-mail | index | archive | help
--nextPart3432906.b3CQVZvxKy
Content-Type: text/plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

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.
> > BTW, using C{E} instead if C{E}root plus the MASQUERADE_AS
> > macro doesn't seem
> > to work.  I didn't try the MASQUERADE_ENVELOPE macro with it though.
> > Actually, even sending mail as my own local user on the system
> > ends up with
> > the hostname added in. Perhaps I'm doing something wrong.
> > Anyway, from what you've both said, rebuilding cron sounds
> > like a better
> > solution. Once I've modified the source, do I just do a make install
> > from the /usr/src/usr.sbin/cron directory?
>
> It would be better to mv the existing cron binary to cron.backup, then
> copy the cron binary from the build directory.  No point in changing
> anything else, the binary is the only thing that changes.

Hi,
Sorry, I'm still having trouble with this - my changes don't seem to=20
have had any effect, cron is still sending mail as=20
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?)

then I did:
/usr/src/usr.sbin/cron/cron# cd ..
/usr/src/usr.sbin/cron# make
=3D=3D=3D> lib
Warning: Object directory not changed from original=20
/usr/src/usr.sbin/cron/lib
cc -O -pipe  -I/usr/src/usr.sbin/cron/lib/../cron -DLOGIN_CAP  -c entry.c
cc -O -pipe  -I/usr/src/usr.sbin/cron/lib/../cron -DLOGIN_CAP  -c env.c
cc -O -pipe  -I/usr/src/usr.sbin/cron/lib/../cron -DLOGIN_CAP  -c misc.c
building static cron library
ranlib libcron.a
=3D=3D=3D> cron
Warning: Object directory not changed from original=20
/usr/src/usr.sbin/cron/cron
cc -O -pipe  -DLOGIN_CAP  -c cron.c
cc -O -pipe  -DLOGIN_CAP  -c database.c
cc -O -pipe  -DLOGIN_CAP  -c do_command.c
cc -O -pipe  -DLOGIN_CAP  -c job.c
cc -O -pipe  -DLOGIN_CAP  -c user.c
cc -O -pipe  -DLOGIN_CAP  -c popen.c
cc -O -pipe  -DLOGIN_CAP   -o cron cron.o database.o do_command.o job.o=20
user.o popen.o /usr/src/usr.sbin/cron/cron/../lib/libcron.a -lutil
gzip -cn cron.8 > cron.8.gz
=3D=3D=3D> crontab
Warning: Object directory not changed from original=20
/usr/src/usr.sbin/cron/crontab
cc -O -pipe  -I/usr/src/usr.sbin/cron/crontab/../cron  -c crontab.c
cc -O -pipe  -I/usr/src/usr.sbin/cron/crontab/../cron   -o crontab=20
crontab.o /usr/src/usr.sbin/cron/crontab/../lib/libcron.a -lutil
gzip -cn crontab.1 > crontab.1.gz
gzip -cn crontab.5 > crontab.5.gz

(Are the warnings are harmless?)
Then:
# /etc/rc.d/cron stop
# cp /usr/src/usr.sbin/cron/cron/cron /usr/sbin
# chmod 555 /usr/sbin/cron
# /etc/rc.d/cron start

Cheers,
=2D-=20
Ian

GPG Key: http://home.swiftdsl.com.au/~imoore/no-spam.asc

--nextPart3432906.b3CQVZvxKy
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (FreeBSD)

iD8DBQBCExwKPUlnmbKkJ6ARAqX9AKCXplmNP0llVqGwb9p8lStXNPHlmgCfYjFq
tVZ8+5jRqDBxHzwmKc1mUsE=
=asWK
-----END PGP SIGNATURE-----

--nextPart3432906.b3CQVZvxKy--



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