Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 09 Apr 1997 10:06:19 -0100
From:      Paul Walsh <paul@nation-net.com>
To:        questions@freebsd.org
Subject:   Sendmail rule help needed
Message-ID:  <334B782B.1DAF@nation-net.com>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?334B782B.1DAF>