*BSD News Article 94179


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!munnari.OZ.AU!uunet!in3.uu.net!128.230.129.106!news.maxwell.syr.edu!europa.clark.net!newsfeed2!swrinde!rill.news.pipex.net!pipex!tank.news.pipex.net!pipex!news.utell.co.uk!usenet
From: brian@shift.utell.net (Brian Somers)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: Quest? -- Adjust "From:" field in sendmail
Date: 22 Apr 1997 16:36:19 GMT
Organization: Awfulhak Ltd.
Lines: 57
Message-ID: <5jipe3$krf@ui-gate.utell.co.uk>
References: <5jbj58$4ld@goofy.snet.net>
Reply-To: brian@awfulhak.org, brian@utell.co.uk
NNTP-Posting-Host: shift.utell.net
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Newsreader: knews 0.9.8
Xref: euryale.cc.adfa.oz.au comp.unix.bsd.freebsd.misc:39533

In article <5jbj58$4ld@goofy.snet.net>,
	Sonya and Jeffrey Metcalf <metcalf@*snet.net> writes:
> Hello,
> 
> I would like to use the standard mail command under FreeBSD to send 
> mail and then use popclient to retrieve e-mail from my ISP's POP3
> server.  Popclient works great.  However, when I send mail from the
> command line, the return address is listed (as I understand it should)
> as the hostname I configured under sysconfig.  This is a fabricated
> hostname and my ISP won't recognize it.  Hence the mail I send cannot
> be properly responded to by my recipients.  So my question is, can
> I configure sendmail in some way that it always lists the response
> address of all the mail from all my users as "metcalf@snet.net"
> rather than "jeff@dane.snet.net" or "sonya@dane.snet.net", etc.?
> 
> Any help is greatly appreciated.

My laptops config is:

VERSIONID(`shift.mc 1.1')
OSTYPE(bsd4.4)dnl
DOMAIN(generic)dnl
MAILER(local)dnl
MAILER(smtp)dnl
Cwshift.utell.net
Cwshift.lan.awfulhak.org
define(`confTO_QUEUEWARN', `4d')dnl
define(`confTO_QUEUEWARN_NORMAL', `4d')dnl
define(`confTO_QUEUERETURN', `10d')dnl
define(`confTO_QUEUERETURN_NORMAL', `10d')dnl
define(`SMART_HOST', `mail.utell.net')dnl
MASQUERADE_AS(`utell.co.uk')dnl
FEATURE(allmasquerade)dnl
FEATURE(nocanonify)dnl
FEATURE(nodns)dnl
define(`confDOMAIN_NAME',`utell.co.uk')dnl

The SMART_HOST says that *all* mail should be sent to mail.utell.net
(the internal side of our mail gateway) and the MASQUERADE_AS and
allmasquerade bit says to change the From: line.  You may find the
other bits useful too.

Use these commands to turn the above m4 file into sendmail.cf:

$ CFDIR=/usr/src/usr.sbin/sendmail/cf/
$ m4 -D_CF_DIR_=$CFDIR ${CFDIR}m4/cf.m4 shift.mc >sendmail.cf

I believe Joerg has built a package for doing this if you don't
have the source installed, but I can't remember anything about
it - sorry.

> JM

-- 
Brian <brian@awfulhak.org> <brian@freebsd.org>
      <http://www.awfulhak.org>
Don't _EVER_ lose your sense of humour !