sendmail virtaul domain with database
Posted on 1997-08-22
I am setting up a virtual domain but still not work at this stage, the following is what I've done.
1 Edit a text file, /etc/mbt, looks like :
2 Use the command :
makemap dbm mbt < mbt
and get two files mbt.dir and mbt.pag
3 Add a line in the "local info" section of the file /etc/sendmail.cf :
4 Add the following rules in R98
# Use mailboxtable-database:
R$+ < @ $+ . > $: $1 < @ $2 > .
R$+ < @ $+ > $* $: $(mbt $1@$2 $: $1 < @ $2 > $3 $)
R$+ < @ $+ > $* $: $(mbt $2 $: $1 < @ $2 > $3 $)
RERROR $* $#error $: $1
R$+ < @ $+ > . $: $1 < @ $2 . >
5 Test the rule set 98 with :
It cannot rewrite the address to email@example.com. The output is the same as input.
Then I test if the database works with the following steps
6 Delete the rules add to S98 in step 4
7 Add a rule
R$+ $: $(mbt firstname.lastname@example.org $)
8 Test the S98 with
The S98 still not rewrite the input address. But what I expect is no matter the input address is, it will be rewritten and use the value of the key "email@example.com" of the database mbt as output address.
I have tried to use other method that do not use database, such as add some rules in S2, it works but rather troublesome.
I am using linux kernel v.2.0.29 and the sendmail version is BSD sendmail 8.7.5
Thank you for your attention.