On 08.06.2020 07:41, Joseph Tam wrote:
On Sun, 7 Jun 2020, Binarus wrote:
So how exactly do I have to alter the configuration to implement your suggestion, i.e. to make dovecot look only at the mbox file and to prevent the creation of unnecessary directories?
Maybe try
mail_location = mbox:/empty/dir:INBOX=~/inbox
Not sure whether owner=rootZ:root, mode=555 will work, but those permissions would be the safest.
Thank you very much for your suggestion. Actually, I already had tried that, but that was only for testing, and I was hoping to avoid it.
Having said this:
That suggestion does not solve the problem completely, but reduces the negative impact so much that I can live with it. I had tried
mail_location = mbox:~/mail:INBOX=~/mail/inbox
With that, dovecot still created an .imap subdirectory, but only within the mail subdirectory in every user's home directory. The layout was the following (starting in an arbitrary user's home directory, showing only the contents of the mail subdirectory):
./mail/inbox ./mail/.imap ./mail/.imap/dovecot-uidvalidity ./mail/.imap/dovecot.list.index.log ./mail/.imap/dovecot-uidvalidity.5edce848 ./mail/.imap/INBOX ./mail/.imap/INBOX/dovecot.index.log ./mail/.imap/INBOX/dovecot.index ./mail/.imap/INBOX/dovecot.index.log.2 ./mail/.imap/INBOX/dovecot.index.cache
While there are no .imap subdirectories in other parts of the home directories any more (which was the main goal), there are still at least three unnecessary files plus one unnecessary directory with four unnecessary files left. This is an ugly waste of resources, but it won't keep me from going that way.
Obviously, dovecot is not meant to serve only POP3 any more (it used to work in previous versions, where it didn't create .imap directories if IMAP was disabled, if I remember correctly), but I don't know an alternative. All other POP3 servers which are currently maintained which I am aware of also have included an IMAP part, so I can probably expect the same problems as with dovecot. Since I currently have no motivation to learn another server software's configuration just to see that this got me nowhere, I'll just stick with the solution outlined above and hope that the POP3 part of dovecot will not be given up in the next versions, and that dovecot does not go wild and start to create more and more directories or files in unforeseeable manner.
The disadvantage of the solution above was that I had to reconfigure the MTA (in this case, sendmail) to deliver inbound messages to ~/mail/inbox instead of ~/inbox, which is another why I didn't implement this solution immediately. At least, this was quite easy.
Thank you very much again!
Regards,
Binarus