modify dovecot user/pass_queries to deliver to local aliases via dovecot submission, with postfixadmin/sqlite3 tables?
PGNet Dev
pgnet.dev at gmail.com
Tue Oct 20 22:36:08 EEST 2020
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 at example.com
ALIAS: aliasuser at 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 at example.com)<rI49JP45j19D8QAA+IOfAw>: Debug: auth-master: userdb lookup(aliasuser at example.com): auth USER input:
2020-10-20 12:26:54 lmtp(aliasuser at example.com)<rI49JP45j19D8QAA+IOfAw>: Debug: auth-master: userdb lookup(aliasuser at 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?
More information about the dovecot
mailing list