Sendmail address rewriting

Matthew Seaman m.seaman at
Sun Aug 17 02:35:50 PDT 2003

On Sat, Aug 16, 2003 at 05:38:17PM -0700, Doug Hardie wrote:
> I have what is most likely a simple misunderstanding of the 
> file configuration.  But, nothing I have tried works.  Basically I have 
> one machine (zoon) which is the mail host for all received mail.  All 
> user mailboxes are on that machine and it is the host identified in the 
> MX records.  I have the send mail server on zoot.  When a message is 
> sent out without a domain in the to address, zoot is filling it in with 
> which makes the reply functions useless.  Zoot does not 
> accept incoming mail.  How do I get zoot's sendmail to use the domain 
> in these cases?

Hmmm... How exactly are you sending the test e-mails?  There are two
circumstances where the masquerading setup you've configured below
won't be applied:

   i) Messages sent by root or any other user in class {E} -- however,
      you've already put root into class {L} -- local users, so you
      wouldn't use that account for testing masquerading anyhow.

  ii) Unqualified names (ie. without an @... part) given as the 'From'
      address.  Try adding:


      mail(1) just uses your login ID as the originating address, and
      it expects the local MTA to fill in any missing information.
      Other mailers generally have options to let you choose the
      e-mail address you use to send from.  However, sendmail will
      generally qualify any names with the local domain when relaying
      to another machine.

Aha! You're using LOCAL_RELAY --- try changing that to MAIL_HUB.  You
may or may not need 'always_add_domain' with that -- you'll have to
experiment a bit.
> Here is zoot's mc file
> VERSIONID(`$Id:,v 1.1 2000/05/31 22:21:02 gshapiro Exp $')
> OSTYPE(bsd4.4)dnl
> DOMAIN(generic)dnl
> dnl set SASL options
> define(`confDEF_AUTH_INFO', `/etc/mail/auth-info')dnl
> FEATURE(`masquerade_entire_domain')dnl
> FEATURE(`masquerade_envelope')dnl
> FEATURE(`relay_entire_domain')dnl
> FEATURE(`access_db', `hash -T<TMPF> /etc/mail/access')dnl
> FEATURE(`virtusertable', `hash -T<TMPF> /etc/mail/virtusers')dnl
> FEATURE(`delay_checks', `friend')dnl
> FEATURE(`no_default_msa')dnl
> FEATURE(`use_ct_file')dnl
> define(`confBIND_OPTS', `WorkAroundBrokenAAAA')dnl
> define(`confTO_QUEUERETURN',`3d')dnl
> define(`confTO_QUEUEWARN',`5d')dnl
> define(`LOCAL_RELAY',`')dnl
> LOCAL_USER(`root')dnl
> MAILER(local)dnl
> MAILER(smtp)dnl



Dr Matthew J Seaman MA, D.Phil.                       26 The Paddocks
                                                      Savill Way
PGP:         Marlow
Tel: +44 1628 476614                                  Bucks., SL7 1TH UK
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url :

More information about the freebsd-questions mailing list