From owner-freebsd-questions Wed Apr 9 02:07:03 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id CAA07162 for questions-outgoing; Wed, 9 Apr 1997 02:07:03 -0700 (PDT) Received: from www.nation-net.com (www.nation-net.com [194.159.125.1]) by freefall.freebsd.org (8.8.5/8.8.5) with ESMTP id CAA07150 for ; Wed, 9 Apr 1997 02:06:58 -0700 (PDT) Received: from mag.nation-net.com (194.159.125.14) by www.nation-net.com with SMTP (Apple Internet Mail Server 1.1.1); Wed, 9 Apr 1997 10:11:56 +0100 Message-ID: <334B782B.1DAF@nation-net.com> Date: Wed, 09 Apr 1997 10:06:19 -0100 From: Paul Walsh Organization: NATION-NET X-Mailer: Mozilla 2.0 (Win95; I) MIME-Version: 1.0 To: questions@freebsd.org Subject: Sendmail rule help needed Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-questions@freebsd.org X-Loop: FreeBSD.org Precedence: bulk Hi, it's good to be back. I am trying to rewrite all mail for a domain abc.co.uk to xyz.co.uk retaining the user part. I have a virtualhosts file set up which is working fine for user1@domain1 -> user2@domain2 domain -> user@domain but these existing rules that I have won't map properly for domain1 -> domain2 which is what I want! S98 ############################# PW ########## # Sendmail for virtual domains PW 4 OCT 1996 ######################################## R$+ < @ $+ . > $: $1 < @ $2 > . R$+ < @ $+ > $* $: $(virtualhosts $1@$2 $: $1 < @ $2 > $3 $) R$+ < @ $+ > $* $: $(virtualhosts $2 $: $1 < @ $2 > $3 $) R$+ < @ $* > . $: $1 < @ $2 . > ######################### done PW ######### I tried adding: R< @ $+ > $: $(virtualhosts $1 $: < @ $1 > $) with a line: xyz.com abc.com in virtualhosts and Cwxyz.com, but it doesn't work ( user not known ) ... so I added a quick n dirty fix # PW forward vlh.co.uk mail R$+ < @ granby.co.uk > $* $#smtp $: $1 < @ granbyms.demon.co.uk > $2 which kind of works ( but not for local users) but isn't using virtualhosts. Can anybody help? Regards, Paul Walsh