Recently upgraded a machine, it now has:
distribution: mageia 3
roundcube: 0.9.4-1.mga4
dovecot: 2.1.15-2.mga3
postgresql: 9.2
exim: 4.72
Exim appends mail to the inbox. Physically that is /var/spool/mail/username, here is mine:
-rw-rw---- 1 mathog mail 35447035 Sep 19 10:41 /var/spool/mail/mathog
roundcube talks to dovecot, shows those messages, and APPEARS to be moving/deleting messages from
the inbox. What is actually happening is that all of the messages are still present in the inbox, just masked
somehow so that they are not shown. Open it with "alpine", for instance, and there they all are. In the preceding
version of all of these programs, prior to the update, the messages were actually moved/deleted.
I assume that there is somewhere a "leave copy of messages in inbox" switch that is set, perhaps by default. How
do I unset it? (The postgresql database for roundcube was dumped and restored, so if this bit was set in the preceding version, it did not make it into the current one. This roundcubemail rpm did not have a postgres_update.sql
in it, which previous versions did. That might be part of the problem.)
Ah, there are error messages, I just wasn't looking in the right place:
Sep 19 10:52:57 a.b.c.d dovecot[1336]: imap(mathog): Error: file_dotlock_create(/var/mail/mathog) failed: Permission denied (euid=2005(mathog) egid=192(biostaff) missing +w perm: /var/mail, we're not in group 12(mail), dir owned by 0:12 mode=0771) (set mail_privileged_group=mail)
The dovecot account is in the mail group:
mail:x:12:clamav,dovecot
but each and every user isn't. The /var/spool/mail directory is set up like:
drwxrwx--x 3 root mail 4096 Sep 19 11:01 mail/
So, how does one tell dovecot to use the "dovecot" uid/gid when accessing inbox, and the end user's values for all of the other folders????
Ok, found the solution. Edit
/etc/dovecot/conf.d/10-mail.conf
and uncomment and modify the mail_privileged_group line to
mail_privileged_group = mail