2 users who are the same user
I have been using system users (/etc/passwd). I recently started using, in addition, passwd-file with a separate dovecot password database so that I could have user@domainname users with a different password as their shell login password.
This means I have dovecot authenticating on users in both /etc/passwd and /etc/dovecot/users.
If I have a user in /etc/passwd, for example 'joe' and a user in /etc/dovecot/users, joe@example.org, and both of these users are in fact the same user but different password. They use the same inbox and the same mail files. Dovecot does not seem to like this very much. I am seeing many errors like this:
Error: Mailbox INBOX: Sync failed for mbox: UID inserted in the middle of mailbox (4315358 > 4312144, seq=1, idx_msgs=3212)
I think I'm causing this by having 2 users that are in fact the same user and dovecot is stepping on itself.
Is it possible to tell Dovecot that these 2 users are in fact the same, as in like an alias user? Or is it possible to tell dovecot not to process mail for say for 'joe' the system user?
Michael Grant
- Michael Grant via dovecot:
If I have a user in /etc/passwd, for example 'joe' and a user in /etc/dovecot/users, joe@example.org, and both of these users are in fact the same user but different password. They use the same inbox and the same mail files.
Do these two share a single user ID, or do they use separate IDs? Think about file/directory ownership and permissions. If user IDs 123 and 234 attempt use the same directory, things will break. User 123 should not be able to delete a file owned by user 234, for example.
Perhaps have a look at your setup, and verify that you are matching multiple logins to a single OS user ID only. For example, you can use LDAP login to map an arbitrary login name to a given UID. This works nicely with Dovecot.
-Ralph
Do these two share a single user ID, or do they use separate IDs? Think about file/directory ownership and permissions. If user IDs 123 and 234 attempt use the same directory, things will break. User 123 should not be able to delete a file owned by user 234, for example.
yes, same UID/GID because they are infact the same user. What I was hoping to do was to either tell dovecot they are infact the same or mask one of them so dovecot ignored one. I guess that's not possible?
Perhaps have a look at your setup, and verify that you are matching multiple logins to a single OS user ID only. For example, you can use LDAP login to map an arbitrary login name to a given UID. This works nicely with Dovecot.
I am trying to keep things simple. I would rather drop support for the system /etc/passwd file and move every user into the dovecot users file before moving to ldap. My setup would not warrent that.
Dave McGuire had a similar idea of using an SQL stored proc which also probably would have worked but just too complicated for what i'm doing.
Am 25.11.23 um 20:38 schrieb Michael Grant via dovecot:
Error: Mailbox INBOX: Sync failed for mbox: UID inserted in the middle of mailbox (4315358 > 4312144, seq=1, idx_msgs=3212)
Maildir to the rescue?
https://doc.dovecot.org/admin_manual/known_issues/mbox_problems/
-- peter
Error: Mailbox INBOX: Sync failed for mbox: UID inserted in the middle of mailbox (4315358 > 4312144, seq=1, idx_msgs=3212)
Maildir to the rescue?
https://doc.dovecot.org/admin_manual/known_issues/mbox_problems/
I really want to migrate to maildir.
Is it possible for me to migrate one user at a time? I want to get it working for just me first and then slowly move people over. Oddly, I am the only one who has this weird setup which is causing this error.
If maildir can fix this and leave it as 2 users (both me!) accessing the same maildir, then that's great.
I see how to override to use maildir for the user in the users file, but not for a user in the system /etc/passwd file.
Am 25.11.23 um 23:53 schrieb Michael Grant via dovecot:
Error: Mailbox INBOX: Sync failed for mbox: UID inserted in the middle of mailbox (4315358 > 4312144, seq=1, idx_msgs=3212)
Maildir to the rescue?
https://doc.dovecot.org/admin_manual/known_issues/mbox_problems/
If maildir can fix this and leave it as 2 users (both me!) accessing the same maildir, then that's great.
I'd say, Maildir also requires the accounts switched to the same user. Read the linked article and about userdb. But if it is a concurrency problem, it should help. Have this running with 5 virtual users switched to the same system user, all very busy. Dovecot is a great groupware :)
-- peter
participants (3)
-
Michael Grant
-
Peter
-
Ralph Seichter