bzs@bu-cs.UUCP (Barry Shein) (02/08/86)
>I need some help. My host machine (geophiz) just died and won't be up >for about a month. I get lots of mail sent to geophiz!larry and it's >all piling up in /usr/spool/uucp. Is there any way to alias a user so >far as rmail is concerned? We're running 2.8BSD mail linked to rmail, >calling bellmail to forward the mail. It would be perfectly acceptable >to just have the machine name undergo a translation, ie geophiz!larry >gets rerouted to geopaz!larry. Any ideas? > >Thanks in advance, >-- >Larry McVoy Take rmail and put it into /usr/lib/rmail (or somewhere else, just out of the directory it was in.) Write a little C program to go into /bin/rmail. Its only job will be to pre-process the args and whatever and then exec() /usr/lib/rmail with the corrected addresses but otherwise as if it were rmail called in the first place. It could possibly even be done with a shell program but I would opt for C for flexibility. If it is not mail destined for the troubled machine your program just passes it through transparently. I am sure there are other fixes that would work, but this kind of thing works again and again, it's a very powerful trick. And it also will be trivial to undo at the end of the month (just mv rmail back where it belongs.) -Barry Shein, Boston University
henry@utzoo.UUCP (Henry Spencer) (02/21/86)
> Write a little C program to go into /bin/rmail. Its only job will be > to pre-process the args and whatever and then exec() /usr/lib/rmail > with the corrected addresses... > ...It could possibly even be done with a shell > program but I would opt for C for flexibility... It can be done with a shell program, and should be. We do this all the time. In practice doing it in sh is *more* flexible than doing it in C, because there is less overhead in modifying it. This sort of text manipulation is a perfect application for shell programs. Undoubtedly one could devise cases complex enough to need C, but "don't fix it if it ain't broken"! -- Henry Spencer @ U of Toronto Zoology {allegra,ihnp4,linus,decvax}!utzoo!henry