20 Oct
2020
20 Oct
'20
10:36 p.m.
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?