[Techtalk] Postfix Virtual Domain Configuration Driving Me Nuts
Kagan MacTane
kai at mactane.org
Sat Apr 2 23:00:12 UTC 2022
I'm at my wits' end with my Postfix configuration. I have machine whose
canonical name is brain-like-a-sieve.wandererblue.com. I have a variety
of historical/legacy domains, addresses, and users here, and I'm trying
to migrate off of one domain in particular.
Up until now, I've had the following situation: mail for kai at mactane.org
and kagan at mactane.org go to the user kmactane's inbox. Mail for
digitalsidhe at silmemar.org goes to user digitalsidhe's inbox. And I set
up the new wandererblue.com domain, making it the canonical/default
domain in DNS. Email to wanderer at wandererblue.com and
wb at wandererblue.com go to user wanderer's inbox.
(If it matters, these inboxes are all Maildirs owned by user accounts on
the machine, available via IMAP and POP3.)
I'm trying to get rid of the silmemar.org domain. I'd like to have email
to anything @mactane.org go to the kmactane inbox, have email to
digitalsidhe at wandererblue.com go to the digitalsidhe inbox, and have
anything else @wandererblue.com go to the wanderer inbox. This would
mean kagan at wandererblue.com goes to wanderer, while kagan at mactane.org
goes to kmactane.
What I've actually got, instead, is that kagan at mactane.org is going to
wanderer, which is annoying because I have a lot of IMAP folders set up
on the kmactane inbox and don't want to migrate them. Also, I'm getting
messages in the log:
Apr 2 21:08:49 brain-like-a-sieve
postfix/trivial-rewrite[3935407]: warning: do not list domain
wandererblue.com in BOTH mydestination and virtual_alias_domains
However, if I remove wandererblue.com from mydestination, I can no
longer receive email for kagan@ anything at all; I then get items like this:
Apr 2 21:07:45 brain-like-a-sieve postfix/error[3935328]:
4A355420097: to=<wanderer at wandererblue.com>,
orig_to=<kagan at mactane.org>, relay=none, delay=0.32,
delays=0.31/0/0/0, dsn=5.1.1, status=bounced (User
unknown in virtual alias table)
Here is what I hope are the relevant portions of my main.cf file; I can
send the whole thing if it will help:
myhostname = brain-like-a-sieve
mydomain = wandererblue.com
alias_maps = hash:/etc/postfix/aliases
alias_database = hash:/etc/aliases
mydestination = localhost.$mydomain, localhost.localdomain,
localhost, wandererblue.com
# The following line removes the warning, but doesn't deliver mail.
#mydestination = localhost.$mydomain, localhost.localdomain, localhost
virtual_alias_domains = hash:/etc/postfix/primary-domains
virtual_alias_maps = hash:/etc/postfix/virtual
local_recipient_maps = unix:passwd.byname $alias_maps
The /etc/postfix/primary-domains file does have wandererblue.com in it,
along with the other domains. All of the following lines (as well as
many others) appear in /etc/postfix/virtual, and I have run "postmap
/etc/postfix/virtual" and "/etc/init.d/postfix reload".
mactane.org DOMAIN
kai at mactane.org kmactane
kagan at mactane.org kmactane
silmemar.org DOMAIN
digitalsidhe at silmemar.org digitalsidhe
kagan at silmemar.org digitalsidhe
wandererblue.com DOMAIN
kai at wandererblue.com wanderer
kagan at wandererblue.com wanderer
digitalsidhe at wandererblue.com digitalsidhe
ds at wandererblue.com digitalsidhe
wanderer at wandererblue.com wanderer
wb at wandererblue.com wanderer
I can't figure out what's happening. It seems like any mail I try to
direct to kmactane winds up in wanderer's inbox instead.
I'll be very grateful for any help. Please let me know if you want me to
send full files, log output, or anything else. Thank you very much.
--
Kagan MacTane
(he/him/his)
More information about the Techtalk
mailing list