page@swan.ulowell.edu (Bob Page) (10/21/88)
I'm getting uucp mail from some hosts with From_ lines that have route-addrs in them. For example: From @MITVMA.MIT.EDU:user@host.BITNET remote from mit-eddie Since the convention is to append the hostname to the From_ line, when I pass that along (also via uucp) it looks like From mit-eddie!@MITVMA.MIT.EDU:user@host.BITNET remote from ulowell This isn't just with mit-eddie, by the way. Somehow at the destination this monster has made its way to the From: line. Any mailer that understands the '@' syntax (most of them) goes bananas when it tries to deal with it. Even if it doesn't get into the From: line, if it bounces, sendmail uses the address in the envelope. Suppose a message is going to ulowell!bounce, who doesn't exist. My sendmail bounces it to an address like: mit-eddie!MITVMS.MIT.EDU!host.BITNET!:user That is, it takes the user@host and tries to flip it to host!user so we get orig: mit-eddie!@MITVMA.MIT.EDU:user@host.BITNET pass1: switch user and host.bitnet mit-eddie!@MITVMA.MIT.EDU!host.BITNET!:user pass2: switch mit-eddie and the route-addr mit-eddie!MITVMA.MIT.EDU!host.BITNET!:user You see how this *almost* works? if the colon had been thrown away it would have worked, instead it gets to host.bitnet, who doesn't have an user named :user so the bounce message comes back to me. Anyway, instead of just making *my* sendmail throw away the : in the route addr when it flips user@host to host!user, I wanted to do something that would benefit all the hosts down line from me. In other words, I want to rewrite the From_ line so it doesn't have route-addrs in them. I thought about having sendmail throw away the route-addr - it's just routing information anyway, right? So I'd have to do something like R$+!@$-:$+ $1!$3 which would turn the above into mit-eddie!user@host.bitnet which I could then correctly turn into mit-eddie!host.bitnet!user but this assumes mit-eddie can get to host.bitnet, an assumption I'm not prepared to make in the general case. You couldn't convince me to do it anyway, because of this header I got yesterday: mit-eddie!@EDDIE.MIT.EDU,mit-amt!caf.MIT.EDU!mit-eddie!@EDDIE.MIT.EDU:user I kid you not. I have no idea what to do with this! Clearly throwing away the route-addr is wrong, since it contains the original host info! (I think! if user is really on mit-eddie, then we're in more trouble than I want to know about!) I can't just look for route-addrs and convert them to UUCP-like paths: R$+!@$-:$+ $1!$2!$3 because although it would work in the general sense (one host) it would not work with a route-addr with commas, like mit-eddie!@host1.domain,host2.domain:user@host.domain which would become mit-eddie!host1.domain,host2.domain!user@host.domain OK, so since the standards say only registered hosts can put themselves in a route-addr (which is probably just wishful thinking, but hey), maybe I can combine the above rule with another one that strips everything between a comma and the ! -- so mit-eddie!host1.domain,host2.domain!user@host.domain becomes mit-eddie!host1.domain!user@host.domain which eventually gets rewritten into mit-eddie!host1.domain!host.domain!user which is what I want. I think. Any suggestions? How do I correctly deal with route-addrs in UUCP paths? How do others do it? ..Bob -- Bob Page, U of Lowell CS Dept. page@swan.ulowell.edu ulowell!page Have five nice days.
david@ms.uky.edu (David Herron -- One of the vertebrae) (10/21/88)
Bob, route-addr's are mappable to uucp paths and vicy versy My suggestion is of course to switch to MMDF... :-) -- <-- David Herron; an MMDF guy <david@ms.uky.edu> <-- ska: David le casse\*' {rutgers,uunet}!ukma!david, david@UKMA.BITNET <-- <-- Controlled anarchy -- the essence of the net.
wcf@psuhcx.psu.edu (Bill Fenner) (10/24/88)
In article <9742@swan.ulowell.edu> page@swan.ulowell.edu (Bob Page) writes: | |OK, so since the standards say only registered hosts can put themselves |in a route-addr (which is probably just wishful thinking, but hey), |maybe I can combine the above rule with another one that strips |everything between a comma and the ! -- so | mit-eddie!host1.domain,host2.domain!user@host.domain |becomes | mit-eddie!host1.domain!user@host.domain |which eventually gets rewritten into | mit-eddie!host1.domain!host.domain!user |which is what I want. | |I think. I think you might rather have mit-eddie!host2.domain!host.domain!user... or, of course, you could make a rule to rewrite it into mit-eddie!host1.domain!host2.domain!host.domain!user... |Any suggestions? How do I correctly deal with route-addrs in UUCP |paths? How do others do it? | how about R$*@$+,$* $1!$2$3 #take care of ,'s R$*@$+:$- $1!$2!$3 #take care of :'s actually, don't most people do R@$+,$+ @$1:$2 or something to make route-addr parsing easier? In that case, just remove the first @ and change :@'s and :'s to !'s. ooh, wattapain. R@$+:$* $1:$2 R$*:@$* $1!$2 R$*:$* $1!$2 I'm sure that's not quite right... I'm doing this off the top of my head. Anyone care to correct me? Suggest another way to do it? Bill -- Bitnet: wcf@psuhcx.bitnet Bill Fenner | "Ain't got no cash, Internet: wcf@hcx.psu.edu | Ain't got no style UUCP: {gatech,rutgers}!psuvax1!psuhcx!wcf | Ain't got no girls Fido: Sysop at 263/42 (814/238 9633) \hogbbs!wcf| To make me smile"
cfe+@andrew.cmu.edu (Craig F. Everhart) (10/24/88)
> *Excerpts from ext.nn.comp.mail.sendmail: 23-Oct-88 Re: route-addrs in UUCP* > *paths? Bill Fenner@psuhcx.psu.e (1584)* > how about > R$*@$+,$* $1!$2$3 #take care of ,'s > R$*@$+:$- $1!$2!$3 #take care of :'s > actually, don't most people do > R@$+,$+ @$1:$2 > or something to make route-addr parsing easier? In that case, just > remove the first @ and change :@'s and :'s to !'s. ooh, wattapain. > R@$+:$* $1:$2 > R$*:@$* $1!$2 > R$*:$* $1!$2 > I'm sure that's not quite right... I'm doing this off the top of my head. > Anyone care to correct me? Suggest another way to do it? I admit--I'm stunned that somebody would try to do this. RFC822 source routes and UUCP paths are not the same! Why would you ever try to mix them? (Especially if some other mail agent has mixed them up already, so you can't tell what was intended. Bounce the mail and/or forward it to the postmaster of the site that's apparently screwing it up. You can't hope to automatically untangle the webs they've woven.) Standards aside, zillions of people put unregistered hosts in source routes. Just because you might recognize a domain name in the middle of a path or a source route doesn't mean that your mailer will recognize all possible domain-looking names that will be passing your way in the future. In short, truncating a source route is a bad heuristic. Craig Everhart Andrew message system
mouse@mcgill-vision.UUCP (der Mouse) (10/30/88)
In article <9742@swan.ulowell.edu>, page@swan.ulowell.edu (Bob Page) writes: > I'm getting uucp mail from some hosts with From_ lines that have > route-addrs in them. I've seen such horrors arriving here, too. Mit-eddie seems to be the worst of our immediate links for handing us such things, for what that's worth. (I've even seen host%host!user, which I was told was due to a bug in smail that would be fixed Real Soon Now. Bug or not, it's been showing up with great regularity, and hadn't been fixed sometime Saturday morning, when I got the most recent such.) I eventually got fed up with nonsense like this in reply addresses and put a patch into rmail so that it understand the header to a limited extent. It checks for From:, To:, Cc:, and From_ lines, and if it finds any, it checks the addresses on them for sanity. If it finds anything dubious it inserts a warning at the top of the body of the message before passing it to sendmail. (Unless the mangled address is the envelope to-line, in which case it gets sent to postmaster (me) instead, because the probability of its reaching its intended destination is quite low.) How do I tell dubious addresses? They're addresses which mix ! with either % or @. Initially, it was just mixed ! and %, until I saw some horrors that came from mixed ! and @ that were technically legal RFC822 but required interpretations different from those prescribed by the RFC if they were to work. This seems to be an acceptable compromise. All mail leaving via UUCP gets completely rewritten to bang paths (least common denominator). Dubious mail probably carries damaged addresses, but it also carries a warning which makes the recipient aware of this; the warning quotes the line seen by rmail when it hit this machine. I got a few complaints that I should be sending the grumble to the postmaster on the next-hop machine, but (a) that's not necessarily the guilty machine and (b) I don't really care whether they fix their mailer or not. (The *recipient* of the letter might care, though....) > Bob Page, U of Lowell CS Dept. page@swan.ulowell.edu ulowell!page > Have five nice days. That's a curious balance between stated meaning and implied meaning. I like it. der Mouse old: mcgill-vision!mouse new: mouse@larry.mcrcim.mcgill.edu