0

I'm trying to create my first mail server with postfix, Dovecot and squirrel mail on Ubuntu 14.04

To get started did i follow this tutorial on this page. http://www.tecmint.com/setup-postfix-mail-server-in-ubuntu-debian/

I created a user on my linux server called nicolai with a random password that im using to sign in to squirrelmail.

But i keep getting this error:

ERROR: Could not complete request.
Query: SELECT "INBOX"
Reason Given: [SERVERBUG] Internal error occurred. Refer to server log for more information. [2015-08-11 17:31:42]

And my log file give me this error:

Aug 11 17:31:44 remedy dovecot: imap(nicolai): Error: open(/var/mail/nicolai) failed: Permission denied (euid=1001(nicolai) egid=1002(nicolai) missing +w perm: $var/mail, we're not in group 8(mail), dir owned by 0:8 mode=0775)
Aug 11 17:31:44 remedy dovecot: imap(nicolai): Error: Failed to autocreate mailbox INBOX: Internal error occurred. Refer to server log for more information. [2015-08-15-08-11 17:31:44]

So for some reason it seems like it won't create the INBOX - I checked the mail directory in my home folder and it has only created the following folders INBOX.Drafts, INBOX.Sent and INBOX.Trash

I have not been able to find a solution on the internet so I'm hoping someone else have tried the same as me before.

  • 1
    Either postfix or dovecot can hold the responsibility to create mailbox. Can you edit the post and add the output of postconf -n and dovecot -n? – masegaloeh Aug 12 '15 at 23:50
  • @masegaloeh: that´s not right: dovecot could create the mailbox: manually via doveadm mailbox create or with the first receiving email (if user rights on the mail folder are ok). But for a detailed answer you are right: postconf -n and dovecot -n is needed. – UsersUser Aug 19 '15 at 10:45
7

The first line of the dovecot error indicates it doesn't have permission write to /var/mail/. This indicates the dovecot is running under an account without permission to write to the folder. /var/mail/ is owned by root:mail (UID/GID 0:8), giving full read/write/execute permissions to both root and the group mail. Dovecot is running under nicolai to access it, and because nicolai is not in the group mail, the folder cannot be accessed.

I'm not sure how the other inbox folders got created, but to fix this, all you should need to do is add nicolai to mail, like this:

adduser nicolai mail

That should allow nicolai to access it's mail folder, and fix the problem.

-2

The issue could be that SELinux is blocking access for the user mentioned in your log file. If this is the case disabling SELinux enforcement should allow you to work around this. This can be done by issuing the command below:

$ setenforce 0

Be aware that SELinux is a security feature and you might want consider whether you want to disable it entirely or not.

  • 1
    And what is this command supposed to do? – RalfFriedl Oct 1 '18 at 21:08
  • this will disable SELinux for Temporarily. – JackyChan Oct 1 '18 at 21:28
  • Maybe you want to include that in the answer, and also why you think this would solve the problem. – RalfFriedl Oct 1 '18 at 21:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.