Subject: Sendmail and Masquerading

From: Erik van der Meulen <[email-masked]>
Date: Mon, 02 Sep 1996 10:11:50 +0200

Dear all,

I have noticed a small oddity with my addressing in sendmail. All seemed to
work really well with pop clients connecting to my Debian 1.1 box, but if I
use elm or plain mail my From: line is not correct. I (think I) have set up
sendmail to masquerade as avondel.xs4all.nl. My .mc file looks like this:

        divert(0)
        VERSIONID(`@(#)sendmail.mc	8.7 (Linux) 3/5/96')
        OSTYPE(debian)dnl
        FEATURE(nocanonify)dnl
        FEATURE(masquerade_envelope)dnl
        FEATURE(use_cw_file)dnl
        FEATURE(use_ct_file)dnl
        FEATURE(nodns)dnl
        define(`confTO_QUEUEWARN', `1d')dnl
        MAILER(local)dnl
        MAILER(smtp)dnl
        Cwavondel.xs4all.nl
        MASQUERADE_AS(avondel.xs4all.nl)dnl
        ## Custom configurations below (will be preserved)
        MAILER(uucp)dnl
        define(`UUCP_MAX_SIZE', 0)
        define(`SMART_HOST', uucp-dom:xs4all)

And if I send mail from root using elm, the header comes out like:
        
        X-POP3-Rcpt: eme@nlauc01
        Return-Path: sun4nl!souterrain.avondel!root
        Received: from sun4nl.UUCP (root@localhost) by nlauc01.ncm.nl
(8.6.11/8.6.9) with UUCP         id QAA18505 for ncm.nl!eme; Sun, 1 Sep 1996
16:12:37 +0200
        Received: from magigimmix.xs4all.nl by sun4nl.NL.net with SMTP
        	id AA03252 (5.65b/CWI-3.3); Sun, 1 Sep 1996 16:13:43 +0200
        Received: from asterix.xs4all.nl (asterix.xs4all.nl [194.109.6.11])
by         magigimmix.xs4all.nl (8.7.5/XS4ALL) with ESMTP id QAA25876 for
<[email-masked]>; Sun, 1 Sep         1996 16:13:36 +0200 (MET DST)
        Received: from souterrain.avondel (uucp@localhost) by
asterix.xs4all.nl (8.7.5/8.7.2)         with UUCP id QAA09967 for
[email-masked]; Sun, 1 Sep 1996 16:03:01 +0200 (MET DST)
        Received: (from root@localhost) by souterrain.avondel (8.7.5/8.7.3)
id OAA11142 for         [email-masked]; Sun, 1 Sep 1996 14:03:08 +0200
        From: root <[email-masked]>
        Message-Id: <[email-masked]>
        Subject: Meel van elm
        To: [email-masked]
        Date: Sun, 1 Sep 1996 14:03:07 +0200 (MET DST)
        X-Mailer: ELM [version 2.4 PL25 PGP2]
        Mime-Version: 1.0
        Content-Type: text/plain; charset=US-ASCII
        Content-Transfer-Encoding: 7bit

Both the From: line and the Return-Path: are incorrect. That is, my
linux-box is indeed called souterrain and my local domain is avondel, but I
would like to masquerade as avondel.xs4all.nl

Any hints are greatly appreciated!

Erik van der Meulen
[email-masked]

  Erik van der Meulen

  e: [email-masked]  p: +31 20 685 1618  f: +31 20 689 6569

---

From: Francois Ranchin <[email-masked]>
Date: Mon, 2 Sep 1996 14:10:25 +0200 (MET DST)

> And if I send mail from root using elm, the header comes out like:

root and/or postmaster are TRUSTED users.
So the masquerade doesn't apply to this users, and all users defined
in the trusted-user file.

In the sendmail.cf :

# class L: names that should be delivered locally, even if we have a relay
# class E: names that should be exposed as from this host, even if we
# masquerade
# class M: domains that should be converted to $M
#CL root
CE root

In the doc :

op.txt:      trusted users from a file use Ft/file/name.

and :

confCT_FILE             Ft class        [/etc/sendmail.ct] Name of file used
                                        to get the local additions to the $=t
                                        (trusted users) class.
confTRUSTED_USERS       Ct class        [no default] Names of users to add to
                                        the list of trusted users.  This list
                                        always includes root, uucp, and daemon.
                                        See also FEATURE(use_ct_file).

So don't post from root :)
But in the aliases file add :
root:	<real user>

-- 
François Ranchin
Any sufficiently advanced technology is indistinguishable from magic
	Arthur C. Clarke, The Lost Worlds of 2001