<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<font size="2">Good to know. Many thanks for your comments. Always
appreciate when someone points out risks.<br>
<br>
As to my original question, are any others locating LISTINDEX
files in memory successfully with unique UIDs?. Or perhaps it only
works out of the box with a virtual mail user?<br>
</font><br>
<div class="moz-cite-prefix">On 3/25/2022 12:57 PM, João Silva
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:3ac116dc-db6a-5814-2291-08bb444637d1@lipc.fis.uc.pt">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<p>In that case things can be more peacefull.</p>
<p>I once had the mail in a NFS storage and was told to move to
local storage because of speed issues.</p>
<p>Really don't know if the .cache and .log should be put in a
fast local storage to speed up things.<br>
</p>
<div class="moz-cite-prefix">On 25/03/2022 16:40, doug wrote:<br>
</div>
<blockquote type="cite"
cite="mid:2dee2aa3-23a8-4852-15bc-229087529638@yahoo.com">
<meta http-equiv="Content-Type" content="text/html;
charset=UTF-8">
<font size="2">Thank you </font><font size="2"> João! I too am
concerned if this is a risky configuration. My understanding
is that the list indexes are not critical and that is why the
recommendation in an NFS environment is to place just those
and the lock files in memory. Other index files are on
permanent storage:<br>
<br>
</font><font face="monospace">[doug@mailserverdev doug]$ find ./
-name *index*<br>
./mail/mailboxes/INBOX/dbox-Mails/dovecot.index.cache<br>
./mail/mailboxes/INBOX/dbox-Mails/dovecot.index.log<br>
./mail/storage/dovecot.map.index.log.2<br>
./mail/storage/dovecot.map.index<br>
./mail/storage/dovecot.map.index.log</font><font size="2"><br>
<br>
Should I still be concerned?<br>
<br>
Doug<br>
</font><br>
<div class="moz-cite-prefix">On 3/25/2022 11:46 AM, João Silva
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:c2f7df0d-cab1-0a2b-2796-cb16b8005f36@lipc.fis.uc.pt">
<meta http-equiv="Content-Type" content="text/html;
charset=UTF-8">
<p>I'm not sure about that configuration. <br>
</p>
<p>I have seen huge index cache files for users with lots of
mail, putting those in memory may be a risk.</p>
<p><br>
</p>
<div class="moz-cite-prefix">On 25/03/2022 14:56, doug wrote:<br>
</div>
<blockquote type="cite"
cite="mid:53bb9159-4b0d-d9f1-2427-668bdd221f1d@yahoo.com">
<meta http-equiv="content-type" content="text/html;
charset=UTF-8">
<font size="2">Hi,<br>
</font><br>
<font size="2"><font size="2"><font size="2">Environment:
Dovecot 2.3.18 running on CentOS 7, mdbox, LDAP users<br>
<br>
</font></font>I'm in the process of moving my mailboxes
to NFS and moving with lock and index files in temp
storage following instructions from <a
class="moz-txt-link-freetext"
href="https://doc.dovecot.org/configuration_manual/nfs"
moz-do-not-send="true">https://doc.dovecot.org/configuration_manual/nfs</a>.
<br>
<br>
I set mail_location as:<br>
</font>
<blockquote><font face="monospace">mail_location =
mdbox:/mailstore/%u/mail:VOLATILEDIR=/dev/shm/dovecot/%u:LISTINDEX=/dev/shm/dovecot/%u/dovecot.list.index</font><br>
</blockquote>
<font size="2"><font size="2"> </font>What I discovered is
/dev/shm/dovecot is created by the initial user who
accesses their mail from a client, and with permissions
700. This prevents subsequent users from creating their
own index and lock files.<br>
</font>
<blockquote>
<pre class="moz-quote-pre" wrap=""># ls -l /dev/shm/dovecot
total 0
drwx------ 2 mary users 60 Mar 25 10:00 mary
</pre>
</blockquote>
<font size="2"> Sample error message from maillog during
mail delivery and from a dsync script.</font>
<blockquote>
<pre class="moz-quote-pre" wrap="">Mar 25 10:37:15 mailsrv1 dovecot: imap(doug)<19284><WKcX5gvbRe7AqFhA>: Error: mkdir(/dev/shm/dovecot/doug) failed: Permission denied (euid=1002(doug) egid=100(users) missing +x perm: /dev/shm/dovecot, dir owned by 97:100 mode=0700)
dsync(test): Error: mkdir(/dev/shm/dovecot/test) failed: Permission denied (euid=2003(test) egid=100(users) missing +x perm: /dev/shm/dovecot, dir owned by 97:100 mode=0700)
</pre>
</blockquote>
<font size="2">I couldn't locate documentation or
discussions on how to set the ownership or permissions for
/dev/shm/dovecot in the Dovecot configuration files. <br>
<br>
As a hack, I added this to
/usr/libexec/dovecot/prestartscript. </font><font
size="4"><br>
</font>
<blockquote><font face="monospace">! [[ -d /dev/shm/dovecot
]] && mkdir /dev/shm/dovecot</font><br>
<font face="monospace">chown dovecot:users
/dev/shm/dovecot</font><br>
<font face="monospace">chmod 770 /dev/shm/dovecot</font></blockquote>
<font size="2">This solved the problem, but left me
wondering if I missed something obvious or if I am setting
myself up for a problem later on, like with a Dovecot
version upgrade. </font><font size="2"><font size="2">I
could run these commands at bootup out of rc.local or a
systemd script rather than customizing a Dovecot
provided script. <br>
<br>
Is there a appropriate way of doing this that I missed?</font><font
size="4"><br>
</font></font><font size="2"><br>
TIA,<br>
Doug<br>
</font> </blockquote>
</blockquote>
<br>
</blockquote>
</blockquote>
<br>
</body>
</html>