Dovecot problem

My mail server works without any malfunctions.

But in /var/log/mail I see these error messages:

dovecot: pop3(<username>): Error: open(/var/spool/mail/.imap/INBOX/dovecot.index.log) failed: Permission denied (euid=<xxxx>(<username>) egid=<yyyy>(users) missing +r perm: /var/spool/mail/.imap/INBOX/dovecot.index.log, dir owned by <zzzz>:<yyyy> mode=0770)

This is for all mail users except the one (the one with uid <zzzz>) who had contacted the server the very first time. The diretory tree and files under /var/spool/mail/.imap/INBOX/ have been created by that user obviously. After I delete /var/spool/mail/.imap/INBOX/ it is recreated under the uid:groupid of the user which is the first to contact the server again. The error message is issued for all other users but they get their mails fine.

I am not using IMAP at all, I use POP3 only for mail retrieval.

My system is openSuSE 13.1

I guess it is a Problem with the ownership/access rights.
It looks like this at the Moment:

ls -l /var/mail/
drwxrwxrwx 3 aaaa users 4096 Oct 16 05:25 .imap
-rw------- 1 bbbbbb users 7934 Oct 17 06:27 bbbbbb
-rw------- 1 ccccc users 13924898 Oct 25 10:22 ccccc
-rw------- 1 aaaa users 29107047 Oct 25 12:15 aaaa
-rw------- 1 nobody nobody 5587 Oct 25 04:00 nobody

ls -l /var/mail/.imap/
total 4
drwxrwx— 2 aaaa users 4096 Oct 24 12:38 INBOX

ls -l /var/mail/.imap/INBOX/
total 92
-rw------- 1 aaaa users 20352 Oct 24 12:39 dovecot.index
-rw------- 1 aaaa users 26624 Oct 24 22:10 dovecot.index.cache
-rw------- 1 aaaa users 3912 Oct 24 22:10 dovecot.index.log
-rw------- 1 aaaa users 33036 Oct 24 12:38 dovecot.index.log.2

I have installed the whole postfix/dovecot system again from scratch (with YaST2) on a different computer as a reference.
Same result. Any clues?

On 2014-10-25 12:36, Suworow wrote:
>
> My mail server works without any malfunctions.
>
> But in /var/log/mail I see these error messages:
>
>> dovecot: pop3(<username>): Error:
>> open(/var/spool/mail/.imap/INBOX/dovecot.index.log) failed: Permission
>> denied (euid=<xxxx>(<username>) egid=<yyyy>(users) missing +r perm:
>> /var/spool/mail/.imap/INBOX/dovecot.index.log, dir owned by
>> <zzzz>:<yyyy> mode=0770)

Wow. You should not have “/var/spool/mail/.imap” without a user name.
Who does it belongs to? “/var/spool/mail/” is for all users.

> This is for all mail users except the one (the one with uid <zzzz>) who
> had contacted the server the very first time. The diretory tree and
> files under /var/spool/mail/.imap/INBOX/ have been created by that user
> obviously. After I delete /var/spool/mail/.imap/INBOX/ it is recreated
> under the uid:groupid of the user which is the first to contact the
> server again. The error message is issued for all other users but they
> get their mails fine.

You have some misconfiguration that tells dovecot to create the archive
there.

> I am not using IMAP at all, I use POP3 only for mail retrieval.

I think the imap folder is used for indexing. And unless you have
actually disabled imap, it should be enabled by default.

> I have installed the whole postfix/dovecot system again from scratch
> (with YaST2) on a different computer as a reference.
> Same result. Any clues?

What is your “mail_location”?


Cheers / Saludos,

Carlos E. R.
(from 13.1 x86_64 “Bottle” at Telcontar)

Sorry for confusing you.
I do no wnat to publish the usernames atec. of my Network.
Therefore I have replaced the actrual user-ids and Group-ids by xxxx, yyyy, zzzz etc.
When I wrote <username> this is of course a user like mxzptlk with user-id xxxx or so.

The maill location is

mail_location = mbox:/var/spool/mail:INBOX=/var/spool/mail/%u

On 2014-11-02 10:16, Suworow wrote:
>
> Sorry for confusing you.
> I do no wnat to publish the usernames atec. of my Network.
> Therefore I have replaced the actrual user-ids and Group-ids by xxxx,
> yyyy, zzzz etc.
> When I wrote <username> this is of course a user like mxzptlk with
> user-id xxxx or so.

Ok, fine; but when you do such things, please tell so.

> The maill location is
>
> mail_location = mbox:/var/spool/mail:INBOX=/var/spool/mail/%u
>
>

That’s a problem… there is a name conflict between inbox and directory for storage.

The documentation gives some samples:


#   mail_location = maildir:~/Maildir
#   mail_location = mbox:~/mail:INBOX=/var/mail/%u
#   mail_location = mbox:/var/mail/%d/%1n/%n:INDEX=/var/indexes/%d/%1n/%n

I use the second form. You could perhaps try:


mail_location = mbox:/var/spool/mail/MAIL:INBOX=/var/spool/mail/%u

But that is still incorrect, I think. Perhaps


mail_location = mbox:/var/spool/mail/users/~/mail:INBOX=/var/spool/mail/%u

or:


mail_location = mbox:/var/spool/mail/users/%u:INBOX=/var/spool/mail/%u

Or simply the third form in the doc example above, or a variation.
I’d have to re-read the documentation to be certain, but your problem is there.


Cheers / Saludos,

Carlos E. R.
(from 13.1 x86_64 “Bottle” at Telcontar)

Thank you very much.

After I rectified the settings fort he locations it works fine without the error messages.

I am intrigued, however, why openSuSE YaST installation creates exactly the erraneous settings which I had on my system.