modify dovecot user/pass_queries to deliver to local aliases via dovecot submission, with postfixadmin/sqlite3 tables?
I run dovecot + postfix with postfixadmin/sqlite3
I'm set up for all/only virtual users.
All outbound mail submits via dovecot submission port.
My current dovecot pass/user db queries are
password_query = \
SELECT \
username as user, \
password, \
'/data/vmail/%d/%n/Maildir' as userdb_home, \
5000 as userdb_uid, \
5000 as userdb_gid \
FROM mailbox WHERE username = '%u' AND active = '1'
user_query = \
SELECT \
'/data/vmail/%d/%n/Maildir' as home, \
5000 AS uid, \
5000 AS gid, \
('dirsize:storage=' || quota) AS quota \
FROM mailbox WHERE username = '%u' AND active = '1'
It works perfectly for real addresses.
I've setup an alias address, e.g.
REAL: realuser@example.com
ALIAS: aliasuser@example.com
INBOUND email to the ALIAS address -- from the 'net, delivered from postfix via LMTP to dovecot backend -- works fine.
BUT any/all mail from local users TO the ALIAS addr fail at userDB lookup
2020-10-20 12:26:54 lmtp(aliasuser@example.com)<rI49JP45j19D8QAA+IOfAw>: Debug: auth-master: userdb lookup(aliasuser@example.com): auth USER input:
2020-10-20 12:26:54 lmtp(aliasuser@example.com)<rI49JP45j19D8QAA+IOfAw>: Debug: auth-master: userdb lookup(aliasuser@example.com): Userdb lookup failed
What mods are required to the password_query &/or user_query in order to FIX the local->aliasuser mail lookup and delivery ... and ideally not break the rest of delivery?
as usual, the problem's seldom where you 1st look.
*NO* need for _any_ changes to queries.
the source of the problem was my local postfix submission instance's config -- connected to, as submission_relay_host, by dovecot.
it was doing exactly what I'd told it to do ... NOT expanding alias address mappings.
ensuring that
no_address_mappings
is removed from
receive_override_options=
, whether in main.cf, or in the instance's config in master.cf, does the trick.
i.e., pebkac.
participants (1)
-
PGNet Dev