<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;"><br><div>
<meta charset="UTF-8"><div><div style="margin: 0cm 0cm 0.0001pt;">Thanks will try when I get time</div></div>
</div>
<div><br><blockquote type="cite"><div>On 23 Mar 2023, at 15:54, Duc Anh Do <doducanh2710@gmail.com> wrote:</div><br class="Apple-interchange-newline"><div><div dir="ltr"><div class="gmail_default" style="font-family:verdana,sans-serif">Hi,</div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><span style="font-family:verdana,sans-serif">There is a note in the document:</span><span style="font-family:monospace"> <i>For a password database it’s enough to have only the user and password fields. For a user database, you need to set also uid, gid and preferably also home (see VirtualUsers). (gecos) and (shell) fields are unused by Dovecot.</i></span><div class="gmail_default" style="font-family:verdana,sans-serif">You can leave empty what you don't need.<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, 23 Mar 2023 at 11:09, Horst Simon <<a href="mailto:horst.simon2@icloud.com">horst.simon2@icloud.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div>I am not sure if I understand it correctly, that this configuration is for each user has its mailbox in its home directory. This is not my intention, I have in 10-mail.conf the mailloration configured as:</div><div><div style="margin: 0px; font-stretch: normal; line-height: normal;"><span style="font-variant-ligatures:no-common-ligatures">mail_location = maildir:/opt/local/var/spool/dovecot/%u:LAYOUT=fs</span></div><div style="margin: 0px; font-stretch: normal; font-size: 18px; line-height: normal; font-family: Courier;"><span style="font-variant-ligatures:no-common-ligatures"><br></span></div><div style="margin: 0px; font-stretch: normal; font-size: 18px; line-height: normal; font-family: Courier;"><span style="font-variant-ligatures:no-common-ligatures"><br></span></div></div><div><blockquote type="cite"><div>On 23 Mar 2023, at 12:37, Duc Anh Do <<a href="mailto:doducanh2710@gmail.com" target="_blank">doducanh2710@gmail.com</a>> wrote:</div><br><div><div dir="ltr"><div class="gmail_default" style="font-family:verdana,sans-serif">Hi,</div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif">The args parameter of userdb contains scheme, username format and location of the password file. Please take a look this link <a href="https://doc.dovecot.org/configuration_manual/authentication/passwd_file/" target="_blank">https://doc.dovecot.org/configuration_manual/authentication/passwd_file/</a></div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif">For example, mine is:</div><div class="gmail_default" style="font-family:verdana,sans-serif"><span style="font-family:monospace">userdb {<br> </span><span style="font-family:monospace">driver = passwd-file</span></div><div class="gmail_default" style="font-family:verdana,sans-serif"><span style="font-family:monospace"> args = username_format=%u /etc/dovecot/imap.passwd<br>}</span></div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif"><span style="font-family:monospace">$ head /etc/dovecot/imap.passwd<br>to@localhost.local:{plain}1:vmail:vmail::::userdb_mail=mdbox:~/Mdbox/%d/%n:INDEX=~/indexes/%d/%n</span></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, 23 Mar 2023 at 05:08, Horst Simon <<a href="mailto:horst.simon2@icloud.com" target="_blank">horst.simon2@icloud.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">OS environment:<br>
<br>
Linux qnap-nas 5.10.60-qnap #1 SMP Thu Jan 12 04:39:10 CST 2023 x86_64 GNU/Linux<br>
<br>
I enabled "auth-passwdfile.conf.ext” in 10-auth.conf<br>
#!include auth-deny.conf.ext<br>
#!include auth-master.conf.ext<br>
#!include auth-system.conf.ext<br>
#!include auth-sql.conf.ext<br>
#!include auth-ldap.conf.ext<br>
!include auth-passwdfile.conf.ext<br>
#!include auth-checkpassword.conf.ext<br>
#!include auth-static.conf.ext<br>
<br>
In this file I have following entries and I don’t know what to enter for userdb <br>
<br>
passdb {<br>
driver = passwd-file<br>
args = /opt/local/etc/dovecot/users<br>
}<br>
<br>
userdb {<br>
driver = passwd-file<br>
#args = username_format=%u /opt/local/etc/dovecot/users<br>
<br>
# Default fields that can be overridden by passwd-file<br>
#default_fields = quota_rule=*:storage=1G<br>
<br>
# Override fields from passwd-file<br>
#override_fields = home=/home/virtual/%u<br>
}<br>
<br>
In the users file I have 2 users defined as follow:<br>
user1:{SSHA512}<encrypted password>::::::<br>
user2:{SSHA512}<encrypted password::::::<br>
<br>
Dovecot gives following error message on startup:<br>
Mar 23 08:50:30 master: Info: Dovecot v2.3.20 (80a5ac675d) starting up for imap, lmtp, sieve (core dumps disabled)<br>
Mar 23 08:50:30 auth: Debug: Loading modules from directory: /opt/local/lib/dovecot/auth<br>
Mar 23 08:50:30 auth: Debug: Module loaded: /opt/local/lib/dovecot/auth/lib20_auth_var_expand_crypt.so<br>
Mar 23 08:50:30 auth: Fatal: userdb passwd-file: Missing args<br>
<br>
I don’t know what arguments I have to enter for userdb<br>
<br>
Horst<br>
<br>
> On 22 Mar 2023, at 23:00, Narcis Garcia <br>
> <br>
> Please, specify OS environment, Dovecot version, and what options did <br>
> you try.<br>
> <br>
> <br>
> El 22/3/23 a les 4:52, Horst Simon ha escrit:<br>
>> I try to configure to have user authenticate to a local file called <br>
>> users, with their mailboxes in ../../spool/dovecot, not in their home <br>
>> directories. I have this working correctly with pam authentication on <br>
>> different servers(openSuse and macOS). This server has no pam <br>
>> authentication so I need to use a local file, but I can not make any <br>
>> sense of the documentation, can someone please help on which files I <br>
>> need to change and to which values.<br>
>> I tried several options but getting all kind of errors with UID.<br>
>> <br>
>> Horst<br>
>> <br>
> <br>
> -- <br>
> <br>
> Narcis Garcia<br>
> <br>
> __________<br>
> I'm using this dedicated address because personal addresses aren't <br>
> masked enough at this mail public archive. Public archive administrator <br>
> should fix this against automated addresses collectors.<br>
> <br>
> <br>
> ------------------------------<br>
> <br>
> Subject: Digest Footer<br>
> <br>
> _______________________________________________<br>
> dovecot mailing list<br>
> <a href="mailto:dovecot@dovecot.org" target="_blank">dovecot@dovecot.org</a><br>
> <a href="https://dovecot.org/mailman/listinfo/dovecot" rel="noreferrer" target="_blank">https://dovecot.org/mailman/listinfo/dovecot</a><br>
> <br>
> <br>
> ------------------------------<br>
> <br>
> End of dovecot Digest, Vol 239, Issue 36<br>
> ****************************************<br>
<br>
</blockquote></div>
</div></blockquote></div><br></div></blockquote></div>
</div></blockquote></div><br></body></html>