Path: utzoo!attcan!uunet!twwells!bill From: bill@twwells.com (T. William Wells) Newsgroups: comp.mail.uucp Subject: Re: Smail, Aliases & Programs Keywords: smail alias Message-ID: <1989Nov23.120944.1292@twwells.com> Date: 23 Nov 89 12:09:44 GMT References: <590@piglet.vision.UUCP> <974@becker.UUCP> <254733A5.10634@ateng.com> <13074@s.ms.uky.edu> <254CCBB1.19467@ateng.com> <1989Nov2.200712.163@twwells.com> <255344AF.10561@ateng.com> <1989Nov6.064722.15635@twwells.com> <2558A19B.26552@ateng.com> <1989Nov13.09 Organization: None, Ft. Lauderdale, FL Lines: 77 In article <25687B9B.29705@ateng.com> chip@ateng.com (Chip Salzenberg) writes: : According to bill@twwells.com (T. William Wells): : >So, with this one, someone can mail to news-comp-mail-uucp and it : >goes to this newsgroup? : : Yes. I'm using a variant of this script on ateng for the local "ate.*" : hierarchy. Messages to "ate-*" or "ate.*" become local articles. I've not : installed a general "news-*" alias because I don't want one yet. :-) I can bet. :-) : >Neat. I doubt I could do that sort of thing with lmail unless I : >were to add some kind of wildcarding or regular expressions. And I : >think that that goes way beyond what I'd want to do. And besides, : >there's already a solution. :-) : : I see your point... though shoehorning in Henry Spencer's regexp routines : shouldn't be much of a trick. Not much of a trick. But lmail has to run root, which usually means setuid, and so the less complex it is the better. It is big enough as it is, so I'm not adding new features that require radical rewrites and the like. : >What I'd like to have is, if the To: address in locally generated : >mail does not contain an @ or !, to have my domain appended to : >it. While I don't know Deliver well enough to construct the : >script, I'm sure it can be done. : :... : : >But I think that this would best be done in smail rather than : >Deliver or lmail since smail sees all mail, whereas lmail or : >Deliver only sees it if it is a local address. : : Well, it should be done in Smail, yes. But it's eminently reasonable for a : user of Smail 2.5 to have Deliver handle _all_ mail, local and remote. For : UUCP addresses, Deliver will invoke uux, but you might want to do some fancy : special-case routing first -- just the kind of thing Deliver is best at. Well, it depends on what you want. I have this thing about not spending precious CPU cycles and disk accesses, thus I'd want to call as few programs as possible. So I'd prefer to let smail deal with what it can. : >: try-mail: "root|/usr/bin/deliver @" : >: bad-mail: "root/Badmail" : > : >More likely, what I'd do is to append the list of failed names to : >the command, without any special interpolation character. : : Sounds reasonable to me. You may want to consider a try-mail that's not a : pipe to be in error. If you really want it in a mailbox you should have : used bad-mail instead. I suppose that is so; however, I'm sure someone fill find a reasonable use for a mailbox or whatever and there is no technical reason for forbidding it, so I won't. One complexity I have to decide on: after aliasing, there are four different kinds of aliases. The pipe and file name aliases are obviously not appropriate to send off to Deliver; local names obviously should be. The open question is what to do with remote names. A remote name can fail only if the call to smail fails. Now, one can argue two ways about that: 1) if smail fails, there is something sufficiently wrong that sending the addresses off to Deliver won't fix it (or that sending them off to Deliver should not fix it). And 2) maybe Deliver can do something with the addresses to make them reasonable. Comments? --- Bill { uunet | novavax | ankh | sunvice } !twwells!bill bill@twwells.com