LMTP "Relative home directory paths not supported"

Jeff Kletsky dovecot at allycomm.com
Tue Nov 21 07:14:04 EET 2017


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 at 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 at 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







More information about the dovecot mailing list