S
Seilori
Guest
Hello,
As a novice in administering Linux server, here is my humble request for help concerning useradd and dovecot problem in our CentOS 6.2 server.
After yum updating a whole lot of stuff with webmin last week, none of the users added after this update could use their email.
As shown below, I've added two users for test purposes: user.test1 yesterday and user.test2 this night, both with CREATE_MAIL_SPOOL = yes option (as it's stored in /etc/default/useradd). I run chmod 0600 /var/mail/user.test1 after the first useradd and that solved the problem so far. I tried this, because all the older mbox files had these privileges and this new one had 0660.
# ls -l /var/mail/user.test1
-rw------- 1 user.test1 mail 0 May 8 20:09 user.test1
I have spend a lot of time in the net trying to find a solution which solves this issue but found none, issue obviously being changing default file permissions of /var/mail/$USER when creating new users. I even tried editing /etc/dovecot/conf.d/10-mail.conf with "mail_privileged_group = mail" and reloading dovecot. But when creating a new user the same permissions 0660 are again set automatically:
# ls -l /var/mail/user.test2
-rw-rw---- 1 user.test2 mail 0 May 9 22:06 user.test2
When testing webmail with this newly created user account, I got following error message:
[SERVERBUG] Internal error occurred. Refer to server log for more information. [2013-05-09 22:08:25]
and maillog informs:
May 9 22:08:25 mail dovecot: imap-login: Login: user=<user.test2>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=4770, secured
May 9 22:08:25 mail dovecot: imap(user.test2): Error: chown(/home/hety/user.test2/mail/.imap/INBOX, -1, 12(mail)) failed: Operation not permitted (egid=567(user.test2), group based on /var/mail/user.test2)
May 9 22:08:25 mail dovecot: imap(user.test2): Error: mkdir(/home/hety/user.test2/mail/.imap/INBOX) failed: Operation not permitted
May 9 22:08:25 mail dovecot: imap(user.test2): Disconnected: Logged out bytes=79/715
Because I used to add users succesfully before this update process and their emails were working ok, I think something went wrong during updates.
Can anybody help me with this problem? Meaning not to be forced to run chmod 0600 /var/mail/* after every useradd. I'm beginning to think this issue rises because of some other reason than mail server configuration even though maillog tells about mail dovecot involvement. IMHO this points more towards OS's useradd.
Thank You
As a novice in administering Linux server, here is my humble request for help concerning useradd and dovecot problem in our CentOS 6.2 server.
After yum updating a whole lot of stuff with webmin last week, none of the users added after this update could use their email.
As shown below, I've added two users for test purposes: user.test1 yesterday and user.test2 this night, both with CREATE_MAIL_SPOOL = yes option (as it's stored in /etc/default/useradd). I run chmod 0600 /var/mail/user.test1 after the first useradd and that solved the problem so far. I tried this, because all the older mbox files had these privileges and this new one had 0660.
# ls -l /var/mail/user.test1
-rw------- 1 user.test1 mail 0 May 8 20:09 user.test1
I have spend a lot of time in the net trying to find a solution which solves this issue but found none, issue obviously being changing default file permissions of /var/mail/$USER when creating new users. I even tried editing /etc/dovecot/conf.d/10-mail.conf with "mail_privileged_group = mail" and reloading dovecot. But when creating a new user the same permissions 0660 are again set automatically:
# ls -l /var/mail/user.test2
-rw-rw---- 1 user.test2 mail 0 May 9 22:06 user.test2
When testing webmail with this newly created user account, I got following error message:
[SERVERBUG] Internal error occurred. Refer to server log for more information. [2013-05-09 22:08:25]
and maillog informs:
May 9 22:08:25 mail dovecot: imap-login: Login: user=<user.test2>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=4770, secured
May 9 22:08:25 mail dovecot: imap(user.test2): Error: chown(/home/hety/user.test2/mail/.imap/INBOX, -1, 12(mail)) failed: Operation not permitted (egid=567(user.test2), group based on /var/mail/user.test2)
May 9 22:08:25 mail dovecot: imap(user.test2): Error: mkdir(/home/hety/user.test2/mail/.imap/INBOX) failed: Operation not permitted
May 9 22:08:25 mail dovecot: imap(user.test2): Disconnected: Logged out bytes=79/715
Because I used to add users succesfully before this update process and their emails were working ok, I think something went wrong during updates.
Can anybody help me with this problem? Meaning not to be forced to run chmod 0600 /var/mail/* after every useradd. I'm beginning to think this issue rises because of some other reason than mail server configuration even though maillog tells about mail dovecot involvement. IMHO this points more towards OS's useradd.
Thank You