Different username for passdb and userdb
support+dovecot at shellworld.net
support+dovecot at shellworld.net
Sat Jan 21 11:20:11 UTC 2023
On Sat, 21 Jan 2023, I wrote:
> I am attempting to use an external IMAP server for authentication [.]
> The external server requires usernames of the format: user at domain
> However, my local users, where the mail is actually drawn from, are of the
> format: user (passwd file driven).
So, after about five hours of banging my head against this: naturally,
soon after asking this question, I found the answer. Here it is, for any
searchers who come upon this.
passdb {
driver = imap
args = host=remotehost.com ssl=imaps port=993 ssl_ca_dir=/etc/ssl/certs
# Next is the critical line, that redefines the username for the rest of the session
override_fields = user=%n
}
userdb {
driver = passwd
args = blocking=no
}
> Is there a way to do this? The docs suggest so
> (AuthDatabase.PasswdFile.txt), but if so I must be botching it.
The "override_fields = username_format=%n" that is suggested in that file
to solve what appears to be my same problem, doesn't seem to either work
or be necessary.
I'm probably misreading something, but that was my experience.
Regards,
Luke
More information about the dovecot
mailing list