I have my MTA (Postfix) check Dovecot2 LMTP for existing users. No other delivery is done; this is a virtual/LMTP-only setup.
I define known users in a Dovecot passwd-file, specified in
conf.d/10-auth.conf passdb { args = ... username_format=%n /stor01/vmail/auth.d/%d/passwd
e.g.,
vi /stor01/vmail/auth.d/mx1.domain1.com/passwd myuser:{scheme}####:...
mail to: myuser@mx1.domain1.com is correctly auth'd and stored.
I want two things to happen:
(1) all mail to existing-users "@domain1.com" gets re-routed to "@mx1.domain1.com", i.e.,
map: myuser@domain1.com -> myuser@mx1.domain1.com
and is accepted/not-rejected ONLY if 'myuser' is defined as a user in mx1.domain1.com/passwd
and,
(2) specific 'user' aliasing/remapping within a given domain, i.e.
map: whatever@mx1.domain1.com -> myuser@mx1.domain1.com
as long as 'myuser' is a defined user in mx1.domain1.com
In these cases, where should I assign domain & mail aliases, Dovecot or the MTA's conf ?