Hello, I'm switching from postfix to courier and I have problems setting
up virtualdomains.
This host is very small (~20 accounts) and I want to setup courier
without depending on a DB (Berkeley, Ldap, Mysql...). I want to do
everything in plain text files. The host is a Debian Sarge.
I have rawly 3 types of behaviour :
- all mail for maindomain.com is local and should be delivered to
existing accounts except for 4 accounts that are routed to
othermachine.maindomain.com
This already works perfectly.
- all mail for anyu...@external.com should be routed to
some...@somewhere.com
Mail sent to exis...@client.com delivers correctly but mail
to unkn...@client.com fails with "User unknown".
- all mail for anyu...@client.com should be delivered to a local
account, say "client" and thus the mailbox can also receive mails sent
to cli...@maindomain.com
Mail sent to exis...@client.com delivers correctly but mail
to unkn...@client.com fails with "User unknown".
esmtpacceptmailfor.dir/jc contains all the domains :
localhost
maindomain.com
.maindomain.com
external.com
client.com
locals contains :
localhost
maindomain.com
external.com
client.com
I did not put .maindomain.com since mail for othermachine.maindomain.com
should be transfered outside (not locally).
aliases contains :
cat: ca...@othermachine.maindomain.com
@external.com: some...@somewhere.com
@client.com: john
@maindomain.com: cat
I have also made a ~cat/.courier-default set to
"ca...@othermachine.maindomain.com" in order to catch some "user unknown"
and have them delivered (so I will be able to bounce them later when
everything works).
Of course, I have run makealiases, makehosteddomains and
makeacceptmailfor and restarted courier.
echo "To: some...@external.com" | sendmail
-> Message is delivered to cat@othermachine, thanks to .courier-default
In fact, message is delivered to cat-someone@me
echo "To: some...@client.com" | sendmail
-> exactly the same.
It looks like all these mails are delivered via the last line of aliases:
@maindomain.com: cat
If I remove this line, I get user unknown.
Why aren't the other aliases "seen" ? I must be missing somthing but I
don't see what. I can see that qmail has a "virtualdomains" file, should
I create one for courier ?
Thanks in advance for your help.