Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 19 Jun 1998 22:55:15 +0100 (BST)
From:      David Marsh <drmarsh@bigfoot.com>
To:        freebsd-questions@FreeBSD.ORG
Subject:   sendmail: How do I make sendmail 'fake' my 'online' mail address? (fwd)
Message-ID:  <199806192155.WAA01001@bigfoot.com>

next in thread | raw e-mail | index | archive | help
I'm copying this message to the main FreeBSD list, as I haven't had
much response from the FreeBSD-UK list..

----- Forwarded message from David R Marsh -----

Hi,

I'm in the process of getting my new FreeBSD box onto the internet, and
as can be expected, I'm having a few problems.. :-(

I've finally managed to cross the first hurdle, getting user ppp working :-)


I've also managed to semi-hack sendmail into just about working (using m4 to
generate sendmail.conf).

However, I have a few problems.

The most major is that I don't know how to convince sendmail to tell the
world who I am when I'm online:

My local login name is 'dm'.

My mailbox name with my ISP (Zetnet) is 'dmarsh', and just to make things more
difficult, my Bigfoot mailbox name (my preferred email address for the
From: field) is 'drmarsh' (Somebody beat me to the obvious choice!).

I've been forced to introduce this short-term (I hope) kludge in the meantime
by creating another local user called 'drmarsh', in order to make sendmail 
supply a genuine From: field.

I've managed to get sendmail to masquerade as 'bigfoot.com' successfully,
so hopefully (this is my first message with this new user: using dm worked 
similarly) this will 'assemble' a correct return-address, using the drmarsh 
from my *local* login, and the bigfoot.com from the MASQUERADE_AS line in 
my .mc file.


My question is: is it possible to 'order' sendmail to insert a From: field of
your own choosing, rather than have it do its too-smart-for-its-own-good
method of actually assembling one from your local login name and the 
'masquerade' domain?

This would allow me to send mail when logged in as 'dm' (less typing, you see)
which would be send with a _correct_ From: field.


[Actually, I now seem to have got around this problem, but I'm not sure if
my solution is the right one:

I've set the FROM and REPLYTO environment variables to contain my 'real'
online email address, and for double paranoia, I've also included the
same address in the From: header in my ~dm/.elm/elmheaders file.

This /seems/ to have got around my mixture of personalities ;-) ]




My other problem is that I don't seem able to send mail from the localhost
to either of my online incarnations (dmarsh@zetnet.. or drmarsh@bigfoot..)
In either case, the message is bounced back.

I suspect that this may be because I have included some wrong information in
my .mc file, which I have included below (obviously this will be crucial
in solving my first problem anyway). 

I suspect that I may have made a mistake in including one or more of the lines
beginning Cw ... I can't remember (or understand!) exactly what these are 
supposed to do, but the guide in the HTML docs suggested that these were
necessary? I've a horrible feeling that including those lines in the file has
convinced sendmail that my localhost is able to route mail to those
domains, which obviously it is not!


I can see now how it's possible to write an 800 page book on sendmail! :-((


Anyway, here's the pertinant part of my .mc file (initial comment fluff 
snipped).


----



include(`../m4/cf.m4')
VERSIONID(`@(#)trek.squelch.localnet.mc $Revision: 1.01, 1998-06-12 $')
OSTYPE(bsd4.4)dnl
DOMAIN(generic)dnl
MAILER(local)dnl
MAILER(smtp)dnl
Cw trek.squelch.localnet
Cw bigfoot.com
Cw zetnet.co.uk
MASQUERADE_AS(`bigfoot.com')dnl
FEATURE(masquerade_envelope)dnl
EXPOSED_USER(root)
FEATURE(mailertable, `hash -o /etc/mailertable')dnl
FEATURE(nodns)dnl
FEATURE(nouucp)dnl
define(`confCW_FILE', `-o /etc/sendmail.cw')dnl
define(SMART_HOST, `mail.zetnet.co.uk')
Dm bigfoot.com
define(`confDOMAIN_NAME', `bigfoot.com')dnl


----

If anybody can help me out, I'd be massively grateful!


Thanks,


David Marsh.
drmarsh@bigfoot.com (despite or maybe even according to the headers)


----- End of forwarded message from David R Marsh -----

-- 
David Marsh,drmarsh@bigfoot.com   | http://squelch.home.ml.org/            |
Glasgow/Glaschu, Scotland.          *If urgent, phone: +44  141 400-0577.* |
>> CYCLEWAY: cycle activism GB/IE: http://squelch.home.ml.org/cycleway/   <<
>> includes bikes on public transport, and cycle organisation directories <<
*Please don't send me long emails: very flakey phone connection at present!*

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199806192155.WAA01001>