[comp.emacs] Proper handling of "%" in Internet addresses.

ljz%fxgrp.fx.com@ames.arc.nasa.gov (Lloyd Zusman) (11/01/88)

My site has almost perpetual Internet connection problems, and hence
we have to use another site as our gateway to the net.  Hence, my
Internet address contains a "%" as follows:

	ljz%fxgrp.fx.com@ames.arc.nasa.gov

I have tried using Gnews and Gnus, and neither seems to handle this
case very well.  If I specify my domain name as ...

	fxgrp.fx.com@ames.arc.nasa.gov

... then the news posting routines in both of these generates something
like this in my "From:" line:

	ljz@fxgrp.fx.com@ames

If I specify my domain as ...

	%fxgrp.fx.com@ames.arc.nasa.gov

... then the "From:" line ends up something like this:

	ljz@%fxgrp.fx.com@ames

This happens because the leading "@" is hard-coded in Gnews and in
Gnus.  No provision for handling domain names with leading a "%"
or an embedded "@" exists in either of these pieces of software.

This is bad enough, but to make things even worse, the fact that
"@ames.arc.nasa.gov" gets parsed down to "@ames" causes our mailer to
generate the address as "@ames.fx.com", which is wrong.  This becomes
a problem when I'm trying to reply to a news posting written by
someone at my own site.  This isn't a problem when there is only one
component in the Internet address (i.e., "ljz@fxgrp.fx.com" would get
parsed down to "ljz@fxgrp" in Gnus and Gnews, and our mailer would
expand this correctly to "ljz@fxgrp.fx.com").

Now, I realize that we can screw around with our local copies of Gnews
and Gnus to make them spew out our address correctly, but I'd prefer
to see something better: how about fixing Gnews, Gnus, and any other
news software that needs it so that it can handle domain names such as
mine?  I will do this with Gnews and Gnus if I get time in the next
3-6 months (unlikely), but I'm hoping that the authors of these programs
would take care of fixing the Internet address handling in their code.

Has anyone else had this problem, and if so, how have you dealt with it?

-- 
  Lloyd Zusman                  Internet:  ljz@fx.com
  Master Byte Software                  or ljz%fx.com@ames.arc.nasa.gov
  Los Gatos, California                 or fxgrp!ljz@ames.arc.nasa.gov
  "We take things well in hand."    uucp:  ...!ames!fxgrp!ljz
  [ our Internet connection is down: use uucp or mail to the entry above it ]

weemba@garnet.berkeley.edu (Matthew P Wiener) (11/01/88)

In article <849@fxgrp.UUCP>, ljz%fxgrp (Lloyd Zusman) writes:
>This happens because the leading "@" is hard-coded in Gnews and in
>Gnus.  No provision for handling domain names with leading a "%"
>or an embedded "@" exists in either of these pieces of software.

First off, "Reply-To" is the field that ought to have the correct
INTERNET mail address.  "From" need not.

For Gnews, try the following:

(setq gnews-machine "%fxgrp.fx.com@ames.arc.nasa.gov"
      group-follow-hook 'fix-the-domain)

(defun fix-the-domain ()
  (save-excursion
    (goto-char 1)
    (if (re-search-forward "\\(From.*\\)@%" nil 0)
	(replace-match "\\1%"))
    (if (re-search-forward "\\(Reply-To.*\\)@%" nil 0)
	(replace-match "\\1%"))))

ucbvax!garnet!weemba	Matthew P Wiener/Brahms Gang/Berkeley CA 94720
"Nil sounds like a lot of kopins! I never got paid nil before!" --Groo

matt@oddjob.uchicago.edu (Matt Crawford) (11/02/88)

In article <849@fxgrp.UUCP>, ljz%fxgrp (Lloyd Zusman) writes:
) My site has almost perpetual Internet connection problems, and hence
) we have to use another site as our gateway to the net.  Hence, my
) Internet address contains a "%" as follows:
) 	ljz%fxgrp.fx.com@ames.arc.nasa.gov
) I have tried using Gnews and Gnus, and neither seems to handle this
) case very well.  If I specify my domain name as ...
) 	fxgrp.fx.com@ames.arc.nasa.gov  ...
) Now, I realize that we can screw around with our local copies of Gnews
) and Gnus to make them spew out our address correctly, but I'd prefer
) to see something better: how about fixing Gnews, Gnus, and any other
) news software that needs it so that it can handle domain names such as
) mine?

The thing that you are calling your domain name is not.  Any attempt to
use it as one is bound to run into difficulty.  The purest solution is
to get ames listed as a mail-exchanger ("MX") for all your sites.  (You
DO have their permission to route all your mail through them, don't
you?)  If you want the percent-atsign address to be shown on your
outgoing mail or netnews, you should indeed fiddle with your mailer and
your news-poster.  Don't try to shift the blame on software that is
trying to go by the book.

________________________________________________________
Matt Crawford	     		matt@oddjob.uchicago.edu

bob@allosaur.cis.ohio-state.edu (Bob Sutterfield) (11/02/88)

In article <612@tank.uchicago.edu> matt@oddjob.uchicago.edu (Matt Crawford) writes:
>The thing that you are calling your domain name
>[fxgrp.fx.com%ames.arc.nasa.gov] is not.  The purest solution is to
>get ames listed as a mail-exchanger ("MX") for all your sites.

It's already there:

fx.com  14400 IN        MX      5 fxgrp-slip.fx.com
fx.com  14400 IN        MX      10 ames.arc.nasa.gov
fx.com  14400 IN        MX      15 cad.Berkeley.EDU

>If you want the percent-atsign address to be shown on your outgoing
>mail or netnews, you should indeed fiddle with your mailer and your
>news-poster.

Since fx.com is a correctly-registered domain with MXs nestled nicely
in place, I'd forget about giving yourself %-ifying headaches.  Just
put fxgrp.fx.com in your Path: and From: (and possibly Message-ID:)
lines and you're on the air.
-=-
Zippy sez,								--Bob
.  My pants just went on a wild rampage through
 a Long Island Bowling Alley!!