LMTP "Relative home directory paths not supported"
I'm in the process of moving from LDA to LMTP (Postfix upstream) prior to a transition off `nix accounts to virtual accounts and am stumped by LMTP reporting
dovecot: lmtp(10019, jeff@example.com): Error: Relative home directory paths not supported: 0
LDA does /not /have any problems with PAM or passwd-file passdb/userdb and the ubiquitous definition of
mail_location = maildir:~/Maildir:LAYOUT=fs
I have yet to be able to get LMTP to deliver mail, nor have I found anything on the Dovecot wiki to describe how to represent that the mail_location is <whatever/userdb/returned/for/home>/Maildir
I'd prefer to localize the user-to-file-space mapping localized to Dovecot (rather than split within Postfix and Dovecot)
I'd definitely appreciate any pointers to web pages or specific suggestions as to how to resolve this.
Excerpts of Dovecot local.conf follow, full doveconf -n output on request. The/users /file is in the same format as FreeBSD /etc/master.passwd with name, password, UID, gid, home_dir, and shell meaningfully populated. The configuration below works with LDA (end-to-end). With LMTP, it identifies <jeff@example.com> as a valid destination, but fails on delivery with the "relative home directory paths" error message.
passdb { driver = passwd-file args = /path/to/users } userdb { driver = passwd-file args = username_format=%n /path/to/users }
# See http://wiki2.dovecot.org/MailLocation/Maildir # https://wiki.dovecot.org/VirtualUsers/Home
mail_location = maildir:~/Maildir:LAYOUT=fs # mail_location = maildir:%h/Maildir:LAYOUT=fs
Thanks!
Jeff
On 20.11.2017 16:12, Jeff Kletsky wrote:
I'm in the process of moving from LDA to LMTP (Postfix upstream) prior to a transition off `nix accounts to virtual accounts and am stumped by LMTP reporting
dovecot: lmtp(10019, jeff@example.com): Error: Relative home directory paths not supported: 0
LDA does /not /have any problems with PAM or passwd-file passdb/userdb and the ubiquitous definition of
mail_location = maildir:~/Maildir:LAYOUT=fs
I have yet to be able to get LMTP to deliver mail, nor have I found anything on the Dovecot wiki to describe how to represent that the mail_location is <whatever/userdb/returned/for/home>/Maildir
I'd prefer to localize the user-to-file-space mapping localized to Dovecot (rather than split within Postfix and Dovecot)
I'd definitely appreciate any pointers to web pages or specific suggestions as to how to resolve this.
Excerpts of Dovecot local.conf follow, full doveconf -n output on request. The/users /file is in the same format as FreeBSD /etc/master.passwd with name, password, UID, gid, home_dir, and shell meaningfully populated. The configuration below works with LDA (end-to-end). With LMTP, it identifies <jeff@example.com> as a valid destination, but fails on delivery with the "relative home directory paths" error message.
passdb { driver = passwd-file args = /path/to/users } userdb { driver = passwd-file args = username_format=%n /path/to/users }
# See http://wiki2.dovecot.org/MailLocation/Maildir # https://wiki.dovecot.org/VirtualUsers/Home
mail_location = maildir:~/Maildir:LAYOUT=fs # mail_location = maildir:%h/Maildir:LAYOUT=fs
Thanks!
Jeff
That seems like lmtp is not doing variable expansion for user settings. What version of dovecot are you running?
Aki
On 11/20/17 6:15 AM, Aki Tuomi wrote:
On 20.11.2017 16:12, Jeff Kletsky wrote:
I'm in the process of moving from LDA to LMTP (Postfix upstream) prior to a transition off `nix accounts to virtual accounts and am stumped by LMTP reporting
dovecot: lmtp(10019, jeff@example.com): Error: Relative home directory paths not supported: 0
LDA does /not /have any problems with PAM or passwd-file passdb/userdb and the ubiquitous definition of
mail_location = maildir:~/Maildir:LAYOUT=fs
I have yet to be able to get LMTP to deliver mail, nor have I found anything on the Dovecot wiki to describe how to represent that the mail_location is <whatever/userdb/returned/for/home>/Maildir
I'd prefer to localize the user-to-file-space mapping localized to Dovecot (rather than split within Postfix and Dovecot)
I'd definitely appreciate any pointers to web pages or specific suggestions as to how to resolve this.
Excerpts of Dovecot local.conf follow, full doveconf -n output on request. The/users /file is in the same format as FreeBSD /etc/master.passwd with name, password, UID, gid, home_dir, and shell meaningfully populated. The configuration below works with LDA (end-to-end). With LMTP, it identifies <jeff@example.com> as a valid destination, but fails on delivery with the "relative home directory paths" error message.
passdb { driver = passwd-file args = /path/to/users } userdb { driver = passwd-file args = username_format=%n /path/to/users }
# See http://wiki2.dovecot.org/MailLocation/Maildir # https://wiki.dovecot.org/VirtualUsers/Home
mail_location = maildir:~/Maildir:LAYOUT=fs # mail_location = maildir:%h/Maildir:LAYOUT=fs
Thanks!
Jeff That seems like lmtp is not doing variable expansion for user settings. What version of dovecot are you running?
Aki
$ sudo jexec mail dovecot --version 2.2.32 (dfbe293d4)
Jeff
On 20.11.2017 16:20, Jeff Kletsky wrote:
On 11/20/17 6:15 AM, Aki Tuomi wrote:
On 20.11.2017 16:12, Jeff Kletsky wrote:
I'm in the process of moving from LDA to LMTP (Postfix upstream) prior to a transition off `nix accounts to virtual accounts and am stumped by LMTP reporting
dovecot: lmtp(10019, jeff@example.com): Error: Relative home directory paths not supported: 0
LDA does /not /have any problems with PAM or passwd-file passdb/userdb and the ubiquitous definition of
mail_location = maildir:~/Maildir:LAYOUT=fs
I have yet to be able to get LMTP to deliver mail, nor have I found anything on the Dovecot wiki to describe how to represent that the mail_location is <whatever/userdb/returned/for/home>/Maildir
I'd prefer to localize the user-to-file-space mapping localized to Dovecot (rather than split within Postfix and Dovecot)
I'd definitely appreciate any pointers to web pages or specific suggestions as to how to resolve this.
Excerpts of Dovecot local.conf follow, full doveconf -n output on request. The/users /file is in the same format as FreeBSD /etc/master.passwd with name, password, UID, gid, home_dir, and shell meaningfully populated. The configuration below works with LDA (end-to-end). With LMTP, it identifies <jeff@example.com> as a valid destination, but fails on delivery with the "relative home directory paths" error message.
passdb { driver = passwd-file args = /path/to/users } userdb { driver = passwd-file args = username_format=%n /path/to/users }
# See http://wiki2.dovecot.org/MailLocation/Maildir # https://wiki.dovecot.org/VirtualUsers/Home
mail_location = maildir:~/Maildir:LAYOUT=fs # mail_location = maildir:%h/Maildir:LAYOUT=fs
Thanks!
Jeff That seems like lmtp is not doing variable expansion for user settings. What version of dovecot are you running?
Aki
$ sudo jexec mail dovecot --version 2.2.32 (dfbe293d4)
Jeff
I tried to repeat this issue locally, and was not able to. Can you provide full output of
doveconf -n
and
doveadm user jeff@example.com
with both %h and ~/
Aki
On 11/20/17 6:33 AM, Aki Tuomi wrote:
On 20.11.2017 16:20, Jeff Kletsky wrote:
On 11/20/17 6:15 AM, Aki Tuomi wrote:
On 20.11.2017 16:12, Jeff Kletsky wrote:
I'm in the process of moving from LDA to LMTP (Postfix upstream) prior to a transition off `nix accounts to virtual accounts and am stumped by LMTP reporting
dovecot: lmtp(10019, jeff@example.com): Error: Relative home directory paths not supported: 0
[...]
mail_location = maildir:~/Maildir:LAYOUT=fs # mail_location = maildir:%h/Maildir:LAYOUT=fs
Thanks!
Jeff That seems like lmtp is not doing variable expansion for user settings. What version of dovecot are you running?
Aki
$ sudo jexec mail dovecot --version 2.2.32 (dfbe293d4)
Jeff I tried to repeat this issue locally, and was not able to. Can you provide full output of
doveconf -n
and
doveadm user jeff@example.com
with both %h and ~/
Aki
Found that I had two sets of passdb and userdb entries due to one from local.conf and and another from conf.d/10-auth.conf including auth-system.conf.ext -- unfortunately that wasn't the source of the problems.
Turning on auth_debug=yes in local.conf and enabling LOG_DEBUG level output shows that, in contrast to the "working" configuration, it looks like my passwd-file configuration is returning "home=0" -- consistent with
"Error: Relative home directory paths not supported: 0"
auth: Debug: passwd-file(jeff,n.n.n.n,<longToken>): lookup: user=jeff file=/usr/local/etc/dovecot/users auth: Debug: client passdb out: OK 1 user=jeff User &:/home/jeff:/usr/sbin/nologin
dovecot: auth: Debug: passwd-file(jeff,n.n.n.n,<longToken>): lookup: user=jeff file=/usr/local/etc/dovecot/users dovecot: auth: Debug: master userdb out: USER 1234567890 jeff uid=xxxxx gid=xxxxx home=0 auth_token=verylongauthtoken
These were the clues needed -- While https://wiki2.dovecot.org/AuthDatabase/PasswdFile talked about using a FreeBSD master.passwd file as a passdb, it neglected to state that the Linux format and FreeBSD format are different.
Linux -- user:password:uid:gid:(gecos):home:(shell):extra_fields FreeBSD -- name:password:uid:gid:class:change:expire:gecos:home_dir:shell ------------------------------------------^
Login will succeed, but the home variable will be populated with the FreeBSD "change" which is often 0
Wiki page updated with details on how to use FreeBSD /etc/master.passwd extracts with passwd-file
Jeff
participants (2)
-
Aki Tuomi
-
Jeff Kletsky