How do I change the envelope from address in sendmail

Kevin Stevens Kevin_Stevens at
Fri Jun 13 23:30:42 PDT 2003

On Friday, Jun 13, 2003, at 17:33 US/Pacific, Bill Moran wrote:

> I'm having a hell of a time with send-pr.

See thread below from the comp.mail.sendmail Usenet group; this is what 
worked for me after I had the same problem:

Begin forwarded message:

> Newsgroups: comp.mail.sendmail
> Organization: Sporadic
> User-Agent: MT-NewsWatcher/3.2 (PPC Mac OS X)
> Message-ID: <Kevin_Stevens-214E49.21564606082002 at babelfish>
> Return-Path: Kevin_Stevens at
> X-OriginalArrivalTime: 07 Aug 2002 04:56:52.0260 (UTC) 
> FILETIME=[D8612E40:01C23DCE]
> I know the regulars here must be incredibly tired of responding to the
> same questions over and over.  I apologize in advance, but I *have* 
> read
> through all the masquerading posts I could find in this group, the
> sendmail FAQ, and the FreeBSD handbook.  I'm at a loss.  Please don't
> hurt me.
> Typical goal:  I want my messages, including envelopes, to appear as
> though they are from my domain name rather than the specific host.
> Sendmail is version 8.12.3, running on FreeBSD 4.6-RELEASE.
> Here's an example of a local test message with headers:
> From: Kevin Stevens <KeS at>
> Date: Tue Aug 06, 2002  09:37:55  US/Pacific
> To: foo at
> Subject: test
> Return-Path: <KeS at>
> Received: from (localhost []) by
> (8.12.3/8.12.3) with ESMTP id g774bteb056372
> for <foo at>; Tue, 6 Aug 2002 21:37:55 -0700 (PDT)
> (envelope-from KeS at
> Received: (from root at localhost) by
> (8.12.3/8.12.3/Submit) id g774btRg056371 for foo at; Tue,
> 6 Aug 2002 21:37:55 -0700 (PDT)
> Message-Id: <200208070437.g774btRg056371 at>
> Basically, I want "babelfish." excised in its entirety.
> I began with the typical MASQUERADE_AS( ) and
> FEATURE(`masquerade_envelope') settings, and have progressed in
> confusion to FEATURE(`masquerade_entire_domain') and more esoteric
> things.  Here's the salient portion of my current .mc file:
> FEATURE(access_db, `hash -T<TMPF> /etc/mail/access')
> FEATURE(blacklist_recipients)
> FEATURE(local_lmtp)
> FEATURE(mailertable, `hash -o /etc/mail/mailertable')
> FEATURE(relay_based_on_MX)
> FEATURE(virtusertable, `hash -o /etc/mail/virtusertable')dnl
> FEATURE(`masquerade_envelope')dnl
> FEATURE(`masquerade_entire_domain')dnl
> MASQUERADE_DOMAIN_FILE(`/etc/mail/masqueraded-hosts')dnl
> Nothing I do seems to make any difference, which is what's really
> strange.  I've tested, and the file does get updated and 
> the
> daemon restarted when using the "make all install restart" format, for
> what that's worth.  I can post any other needed info, just ask.  Thanks
> for any assistance.
> KeS

>> From: per at (Per Hedeland)
>> Subject: Re: Another stupid masquerading question...
>> Date: Thu, 8 Aug 2002 00:32:22 +0000 (UTC)
>> Newsgroups: comp.mail.sendmail
>> Message-ID: <aise6m$15qj$2 at>
>> In article <Kevin_Stevens-037D10.00405407082002 at babelfish> Kevin 
>> Stevens
>> <Kevin_Stevens at> writes:
>>> a)  I don't particularly want to display my internal host names all 
>>> over
>>> the world (although apparently I don't mind doing it on Usenet - 
>>> eek!).
>> Why do you care, especially if the name can't be found in DNS - are 
>> you
>> ashamed of it or something?:-)
>>> b)  With this configuration, other SMTP hosts can't authenticate my 
>>> mail
>>> server, since that hostname isn't published/resolvable in the outside
>>> world.  As below:
>> As Neil points out, this site violates the RFCs, and it's unusual.
>> However the RFCs also say that you should give the "official" name of
>> the host in the HELO argument (or a dotted quad if the host doesn't 
>> have
>> an official name), and an official name must be in DNS, so it's
>> reasonable to fix this.
>> The simplest way to do it is to define confDOMAIN_NAME in the .mc 
>> file,
>> see cf/README. What to set it to in a case like yours is perhaps not
>> obvious, to be as "correct" as possible it should be a name that
>> resolves to the IP address that remote servers are seeing when you
>> connect, as well as the name that that IP address reverse-resolves to.
>> If you can't meet both of those requirements for some reason (you 
>> should
>> be able to), it's probably best to go for the former. And be sure to
>> never set the same confDOMAIN_NAME on two different servers (whereas
>> using the same MASQUERADE_AS on multiple servers can be perfectly OK).
>> --Per Hedeland
>> per at

More information about the freebsd-questions mailing list