[comp.mail.uucp] address re-writing in smail 3.1.18

bill@unixland.natick.ma.us (Bill Heiser) (06/02/91)

I have been informed by my mail forwarding site that my smail isn't
writing address headers correctly.  For example, if I send something
to user@site, it goes out like that ... and that is an incomplete
address (it should be user@site.domain).

Since I am a UUCP site (with a FQDN), I guess I should rewrite user@host
addresses as user@host.uucp, bouncing incomplete addresses back to the
sender.  An alternative would be to re-write the incomplete addresses as
host!user.

How is this done in smail 3.1?  What are those of you running smail 3.1
on uucp sites doing to make sure you transmit only valid addresses?

Thanks in advance,
Bill

-- 
bill@unixland.natick.ma.us	The Think_Tank BBS & Public Access Unix
    ...!uunet!think!unixland!bill       bill@unixland
    ..!{uunet,bloom-beacon,esegue}!world!unixland!bill
508-655-3848 (2400)   508-651-8723 (9600-HST)   508-651-8733 (9600-PEP-V32)

kdenning@genesis.Naitc.Com (Karl Denninger) (06/03/91)

In article <1991Jun2.165657.16810@unixland.natick.ma.us> bill@unixland.natick.ma.us (Bill Heiser) writes:
>I have been informed by my mail forwarding site that my smail isn't
>writing address headers correctly.  For example, if I send something
>to user@site, it goes out like that ... and that is an incomplete
>address (it should be user@site.domain).
>
>Since I am a UUCP site (with a FQDN), I guess I should rewrite user@host
>addresses as user@host.uucp, bouncing incomplete addresses back to the
>sender.  An alternative would be to re-write the incomplete addresses as
>host!user.

NO!  You should not rewrite the To: line.    The internal addressing
information (ie: the SMTP "RCPT TO: <xxxx>" info or the uux'd command for
uucp sites) is another matter entirely, and is handled properly by Smail3.

The "From:" line should always have a FQDN in it if you have one.  To
do so in smail3, set "hostnames" in the config file such that it has two
entries -- the first of which is your FQDN, the second is your UUCP name.
This will get you a "local" match on both address forms, yet send the mail
out with the proper FQDN in the From: line.

For example, on my home machine (which is a UUCP connected site with a FQDN)
I have:

hostnames=ddsw1.mcs.com:ddsw1
in /usr/lib/smail/config

This forces all outbound mail that doesn't have a "From:" line specified, or
has only a username there (ie: a local form) to have the first entry (called
the "$primary_name" in smail3) inserted appropriately.

>How is this done in smail 3.1?  What are those of you running smail 3.1
>on uucp sites doing to make sure you transmit only valid addresses?

If the "uucp" flag is on in the transport definition, or you have any "!"s
in the address when it gets to the transport level, it will normally be 
rewritten in the "!" form for the transport ONLY.  The To: line will be
untouched (as it should be).

This is Smail3.21 now... (which is what I have here).  I don't think this
changed from smail3.18 however.

If you send via SMTP or other transport without the "uucp" flag, then the
address is not messed with.  This is a >good thing<; I personally run a
funny "half-baked SMTP" to a number of sites, and it allows the other end to
use all their DNS lookup power without having to mangle the address back
into Internet form.

When in doubt, use the source, Luke ;-)

--
Karl Denninger - AC Nielsen, Bannockburn IL (708) 317-3285
kdenning@nis.naitc.com

"The most dangerous command on any computer is the carriage return."
Disclaimer:  The opinions here are solely mine and may or may not reflect
  	     those of the company.

bill@unixland.natick.ma.us (Bill Heiser) (06/03/91)

In article <1991Jun2.182421.11107@Firewall.Nielsen.Com> kdenning@genesis.Naitc.Com (Karl Denninger) writes:
>
>NO!  You should not rewrite the To: line.    The internal addressing
>information (ie: the SMTP "RCPT TO: <xxxx>" info or the uux'd command for
>uucp sites) is another matter entirely, and is handled properly by Smail3.
>
>The "From:" line should always have a FQDN in it if you have one.  To
>do so in smail3, set "hostnames" in the config file such that it has two

I had been getting FQDN's in my outbound FROM: line anyway (I had a
"visible domains" line in my config file.  I put in the hostnames line
you suggested, to give it a try.  So far OK.

How do I make all outbound addresses carry FQDN's (I do ONLY UUCP, no
SMTP)?  If I send out stuff like "user@host", it's going out with an
incomplete address!  That causes problems:  For example, if I send to
user@abc, meaning one system, but my mail host also has a host named
"abc", it'll end up bouncing from his machine with a "no such user"
error.  In order to avoid that confusion, the outbound mail needs to
be fully qualified (unless there's another way I don't know about).

You mentioned the "uux'd command".  How do I control that from
within smail?

Thanks!
bill


-- 
bill@unixland.natick.ma.us	The Think_Tank BBS & Public Access Unix
    ...!uunet!think!unixland!bill       bill@unixland
    ..!{uunet,bloom-beacon,esegue}!world!unixland!bill
508-655-3848 (2400)   508-651-8723 (9600-HST)   508-651-8733 (9600-PEP-V32)

chip@tct.com (Chip Salzenberg) (06/05/91)

According to bill@unixland.natick.ma.us (Bill Heiser):
>How do I make all outbound addresses carry FQDN's (I do ONLY UUCP, no
>SMTP)?

There is a control file intended exactly for this purpose: the
"qualify" file.  This file enumerates the domains with which bare
hostnames should be qualified.  For example, here is ours:

	tct	tct.com
	animal	tct.com
	count	tct.com
	gonzo	tct.com
	grouch	tct.com
	*	uucp

With this file, all addresses of the form "x@y", where "y" is one of
"tct", "animal", "count", "gonzo", or "grouch", is transformed to
"x@y.tct.com".  The wildcard entry at the bottom arranges for all
other hostnames to be qualified as "x@y.uucp".
-- 
Chip Salzenberg at Teltronics/TCT     <chip@tct.com>, <uunet!pdn!tct!chip>
          perl -e 'sub do { print "extinct!\n"; }   do do()'

les@chinet.chi.il.us (Leslie Mikesell) (06/05/91)

In article <1991Jun2.231207.19164@unixland.natick.ma.us> bill@unixland.natick.ma.us (Bill Heiser) writes:

>How do I make all outbound addresses carry FQDN's (I do ONLY UUCP, no
>SMTP)?  If I send out stuff like "user@host", it's going out with an
>incomplete address!  That causes problems:  For example, if I send to
>user@abc, meaning one system, but my mail host also has a host named
>"abc", it'll end up bouncing from his machine with a "no such user"
>error.  In order to avoid that confusion, the outbound mail needs to
>be fully qualified (unless there's another way I don't know about).

Do you have a "qualify" file?  If you do, smail3 should use it to
fully qualify the addresses (including To: and Cc:, etc.) on mail
that originates locally with a remote destination.  This does not
affect the envelope-to (the address in the uux'd rmail command),
though, so it doesn't solve the problem you mention.  If you maintain
your own paths file you would be resolving the route to abc.uucp yourself
so this wouldn't happen.  A work-around might be to hand-build a paths
file that includes:
  abc  mailhost!abc.uucp!%s
for any known conflicts.

Les Mikesell
  les@chinet.chi.il.us 

bill@unixland.natick.ma.us (Bill Heiser) (06/08/91)

In article <284CE01C.463E@tct.com> chip@tct.com (Chip Salzenberg) writes:
>
>There is a control file intended exactly for this purpose: the
>"qualify" file.  This file enumerates the domains with which bare
>hostnames should be qualified.  For example, here is ours:

Thank you Chip!  This looks likle exactly what I was looking for.

-bill

-- 
bill@unixland.natick.ma.us     ...!uunet!think!unixland!bill
OR ..!uunet!world!unixland!bill     heiser@world.std.com
Public Access Unix 508-655-3848(2400)   508-651-8723(HST)  508-651-8733(PEP-V32)

bill@unixland.natick.ma.us (Bill Heiser) (06/08/91)

In article <1991Jun05.151833.25405@chinet.chi.il.us> les@chinet.chi.il.us (Leslie Mikesell) writes:
>
>Do you have a "qualify" file?  If you do, smail3 should use it to
>fully qualify the addresses (including To: and Cc:, etc.) on mail
>that originates locally with a remote destination.  This does not
>affect the envelope-to (the address in the uux'd rmail command),
>though, so it doesn't solve the problem you mention.  If you maintain

OK, I got that to work.  I think it's actually the "envelope-to" address
I need to work on.  I guess I need to start using my own paths file and
pathalias.


-- 
bill@unixland.natick.ma.us     ...!uunet!think!unixland!bill
OR ..!uunet!world!unixland!bill     heiser@world.std.com
Public Access Unix 508-655-3848(2400)   508-651-8723(HST)  508-651-8733(PEP-V32)

larry@zztop.rn.com (Larry Snyder) (06/10/91)

bill@unixland.natick.ma.us (Bill Heiser) writes:

>I need to work on.  I guess I need to start using my own paths file and
>pathalias.

that is the key - to have on machine server as your server which
handles all the routing -- using your one paths and hosts files