From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 In-Reply-To: <47ff785949f474506048701186b50f22@ladd.quanstro.net> References: <47ff785949f474506048701186b50f22@ladd.quanstro.net> Date: Sun, 27 Sep 2009 21:25:24 -0700 Message-ID: Subject: Re: [9fans] upas aliases From: Russ Cox To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Content-Type: text/plain; charset=UTF-8 Topicbox-Message-UUID: 78fc5e62-ead5-11e9-9d60-3106f5b1d025 You switched examples in your mail. Given an aliases file like a1: local!a2 a3: local!a1 and a rewrite file like [^!@.]+ translate "/bin/upas/aliasmail '&'" local!(.*) >> /mail/box/\1/mbox I expect an attempt to mail a1 to deliver to /mail/box/a2/mbox or else fail if that file does not exist. Similarly, I expect an attempt to mail a3 to deliver to /mail/box/a1/mbox or else fail if that file does not exist. "Attempt to mail" means any attempt at mail. Local is *not* analogous to builtin in rc. Rc's builtin has special meaning to rc. Local has no special meaning at all to upas; the rules apply to local!a1 the same as they do to any other string; there's just a rule that handles local!(.*). Because you switched names halfway through you didn't say what was working and what was not. In terms of the above two lines, what is it that is behaving a different way than you expect? Are you sure that your own $mail/aliases file is not also in play when your run plain "mail" as opposed to "upas/send -x"? Russ