[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

exmh and the From field.



>From time to time I am still trying to convince exmh to use the login and 
address of my ISP's account (beitamos@inter.net.il).

Couple of days ago I run into something relevant from exmh help. It is written 
in /usr/lib/exmh/html/ppp.howto.html
Start quoting:
 " 

ABOUT SETTING UP MAIL ON PPP-CONNECTED DIALUP MACHINES.
=======================================================

# This howto is distributed in the hope that it will be useful,        #
# but WITHOUT ANY WARRANTY; without even the implied warranty of       #
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.                 #

This howto is for you if you have a Linux machine that does not have a
permanent internet connection but rather uses dialup PPP to connect to
your internet service provider. A common problem is how to masquerade as
your ISP's mailhost to get

From: me@myispprovider.com

instead of

From: me@mylocalPPPmachine.nowhere

Another problem is how to send and receive mail.

0.) Fixing MH 
=============
You just need to add two lines to your MH mail transport configuration
file.  For original MH this file is called mtstailor (typically
installed in /usr/local/lib/mh).  For nmh it is mts.conf (typically
installed in /usr/local/nmh/etc).  In either case you put in two
entries: "localname" defines the machine name used in From: lines,
"clientname" the machine name used in the SMTP HELO header.
(If you don't put a clientname entry then localname gets used, which
may make your SMTP server unhappy if it tries to verify HELO.)

For example, I have:

localname:      sss.pgh.pa.us
clientname:     sss.sss.pgh.pa.us

 "
End quoting.

Trying to follow what it says, I added the following 2 lines to 
/etc/mh/mtstailor:

		localname:      rakefet
		clientname:     mail.inter.net.il

But it didn't give me the correct From field. 
Some lines from smail's log are:

10/02/1998 23:17:25: remote EHLO: questionable operand: 'mail.inter.net.il': 
fro
m shaul@mail.inter.net.il(rakefet) source [127.0.0.1]: Host name does not 
match
remote address.
10/02/1998 23:17:25: [m0zPBdl-0002ARC] Received FROM:shaul@rakefet 
HOST:mail.int
er.net.il(rakefet)[127.0.0.1] PROTOCOL:esmtp PROGRAM:in.smtpd SIZE:1567 
IDENT:sh
aul ID-METHOD:rfc1413
10/02/1998 23:17:29: [m0zPBdl-0002ARC] Delivered VIA:mail.inter.net.il 
TO:linux-
il@cs.huji.ac.il ORIG-TO:<linux-il@cs.huji.ac.il> ROUTER:smart_host 
TRANSPORT:sm
tp
10/02/1998 23:17:29: [m0zPBdl-0002ARC] Delivered VIA:mail.inter.net.il 
TO:alex_d
vash@mail.stil.scitex.com ORIG-TO:<alex_dvash@mail.stil.scitex.com> 
ROUTER:smart
_host TRANSPORT:smtp
10/02/1998 23:17:29: [m0zPBdl-0002ARC] Completed.
10/02/1998 23:17:31: remote EHLO: questionable operand: 'rakefet': from 
shaul@ra
kefet(rakefet) source [127.0.0.1]: hostname must contain a '.'.
10/02/1998 23:17:31: [m0zPBdr-0002ARC] Received FROM:debian-user@lists.debian.o
r
g HOST:rakefet[127.0.0.1] PROTOCOL:esmtp PROGRAM:in.smtpd 
ORIG-ID:<"DX6_RD.A.XYB
.3R-E2"@murphy> SIZE:1914 IDENT:shaul ID-METHOD:rfc1413
10/02/1998 23:17:32: [m0zPBdr-0002ASC] Received FROM:debian-devel@lists.debian.
o
rg HOST:rakefet[127.0.0.1] PROTOCOL:esmtp PROGRAM:in.smtpd 
ORIG-ID:<"NCTSo.A.b-B
.jd-E2"@murphy> SIZE:2730 IDENT:shaul ID-METHOD:rfc1413


As an alternative, the above help says that:

Continue quoting:

 " 

If you do step 0 then you probably do not have to setup sendmail masquerading.

1.) Setting up sendmail for masquerading
========================================

If you don't use sendmail, you're on your own. If you're using sendmail,
all you need to do is to replace your /etc/sendmail.cf with a new
sendmail.cf that you generate using the m4 files that come with any
(newer) sendmail source distribution.

In that distribution you'll find directories ./cf/cf, ./cf/domain,
../cf/feature, ... You first have to create an m4 config file for your
host. The file ./cf/README explains how to do that. If you don't want to
read it, here is a quick start with an m4 config file (myhost.mc) that
should be appropriate in most cases (if you don't use procmail, delete
the lines regarding procmail; BTW, redhat 4.2 uses procmail):

# myhost.mc
VERSIONID(`Put here some free text describing the version of this config file')
OSTYPE(linux)
DOMAIN(generic)
define(`SMART_HOST', `myispmailhost.com')dnl
FEATURE(masquerade_envelope)
MASQUERADE_AS(myispdomain)
define(`PROCMAIL_MAILER_PATH',`/usr/bin/procmail')dnl
define(`confCOPY_ERRORS_TO',`mylocalloginname')dnl
FEATURE(nouucp)
FEATURE(local_procmail)
MAILER(local)
MAILER(smtp)
MAILER(procmail)

In many cases, myispmailhost.com and myispdomain are the same:

Myispmailhost is the host that accepts SMTP connections on tcp port 25
and acts as a mail relay to the outer world (smart host). Very often
the name of a PPP connected machine does not have a valid entry in
DNS (domain name service), i.e. other machines that try to determine
your IP address using your hostname will get an error. Some domains
(notably AOL) won't accept mail from your host if they get such an
error. Therefore, you need to use a mail relay since otherwise you won't
be able to send mail to such domains. If you did not get the address of
a mail relay from your ISP provider, the best bet is to use the same
host that you were told to use as your POP server.

Myispdomain is what you want to see in your "From:" lines. For example,
if you choose

MASQUERADE_AS(isp.nowhere.com)

your "From:" lines will appear as

From: loginname@isp.nowhere.com

although the name of your PPP connected Unix machine is completely different.

After editing myhost.mc, put the file into ./cf/cf. Then cd to ./cf, call

m4 m4/cf.m4 cf/myhost.mc > sendmail.cf
su
cp sendmail.cf /etc
touch /etc/sendmail.cw

and restart sendmail. That's all.

....

 " 
End quoting.

If I can't make step 0 to work and I don't use sendmail, is it possible to 
convert this to something useful with smail ?





Reply to: