From owner-freebsd-questions@FreeBSD.ORG Wed Feb 16 10:10:23 2005 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 4172B16A4CE for ; Wed, 16 Feb 2005 10:10:23 +0000 (GMT) Received: from smtp.ade.swiftdsl.com.au (smtp.ade.swiftdsl.com.au [218.214.228.98]) by mx1.FreeBSD.org (Postfix) with SMTP id 0B72643D31 for ; Wed, 16 Feb 2005 10:10:22 +0000 (GMT) (envelope-from no-spam@swiftdsl.com.au) Received: (qmail 22965 invoked from network); 16 Feb 2005 10:10:22 -0000 Received: from unknown (HELO daemon.foo.lan) (218.214.176.70) by smtp.ade.swiftdsl.com.au with SMTP; 16 Feb 2005 10:10:22 -0000 From: Ian Moore To: "Ted Mittelstaedt" Date: Wed, 16 Feb 2005 20:40:10 +1030 User-Agent: KMail/1.7.2 References: In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart3432906.b3CQVZvxKy"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200502162040.18799.no-spam@swiftdsl.com.au> cc: Ruben de Groot cc: freebsd-questions@freebsd.org Subject: Re: Sendmail masquerading configuration 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: Wed, 16 Feb 2005 10:10:23 -0000 --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--