# # # Date: Mon, 19 Dec 1994 01:49:44 -1000 (HST) From: "James H. Thompson" To: Dr Eberhard W Lisse Subject: Re: phantom domains/mx records (fwd) In-Reply-To: On Wed, 14 Dec 1994, Dr Eberhard W Lisse wrote: > In message "James H. Thompson > " writes > > > >Thanks for the info. > > > >Assuming xxx.com and yyy.com have mx records pointing to the same > >host and those names are in the more_hostnames, > >Is there any way to have > > > > aaa@xxx.com > >and > > aaa@yyy.com > > > >go to different mailboxes? > > > What about the /usr/lib/smail/forward* files? > > I think you could leave the more_hostnames thing out and put each and > every username there. Smail would then do what you want. Not elegant though :-)-O. > This looks promising, The only problem I ran into when I tried it was that the forwardfile director does not pass the address structure to the expand_string routine so that the host name portion of the address is not available when you try to do something like: forwardx: driver=forwardfile, owner=Postmaster, # errors can't go to the user's mailbox nobody, # use nobody user, if unsecure sender_okay; # sender never removed from expansion file=remap_${lc:top:input_addr}, checkowner, # the user can own this file owners=root, # or root can own the file modemask=0022, # only owner should be able to write # modemask=0002, # under System V, group mail can write caution=0-10:uucp:daemon, # don't run things as root or daemons The "file=remap..." is not expanded at all because only ${user} is available. It appears that it would be very easy (changes to one or two lines of code) to pass the address info into the expand_string routine from the forwardfile director. Is there any reason not to make this change? Another approach would be to enable full string expansion on the file= option for the alias file director, then you could have one alias file per host name. Jim jht@aloha.net