mirror of
https://github.com/modoboa/modoboa.git
synced 2026-04-27 01:45:58 +03:00
[GH-ISSUE #379] removing a domain does not "remove all data associated..." #362
Labels
No labels
bug
bug
dependencies
design
documentation
duplicate
enhancement
enhancement
enhancement
feedback-needed
help-needed
help-needed
installer
invalid
looking-for-sponsors
modoboa-contacts
new-ui
new-ui
pr
pull-request
pyconfr
python
question
security
stale
webmail
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/modoboa-modoboa#362
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @tonioo on GitHub (Dec 4, 2013).
Original GitHub issue: https://github.com/modoboa/modoboa/issues/379
Originally assigned to: @tonioo on GitHub.
Originally created by Dalnix AB on 2013-03-15T19:12:05Z
Add a domain.
Add an account.
Delete the domain.
You get the warning "This operation will remove ALL data associated to this domain." but in fact only the domain get's deleted, the account is still present.
Also, the actual files/directories doesn't get deleted (my guess is due to fileperms).
@tonioo commented on GitHub (Dec 4, 2013):
Posted by Antoine Nguyen on 2013-03-15T22:38:07Z
Hi,
actually this is an intended behaviour. Accounts are preserved unless you activate the AUTO_ACCOUNT_REMOVAL option.
About directories removal, I also think it comes from permissions. Just one question: did you disable the CREATE_DIRECTORIES option ?
@tonioo commented on GitHub (Dec 4, 2013):
Posted by Dalnix AB on 2013-03-16T00:16:59Z
Antoine Nguyen wrote:
Maybe the warning message should change depending on if AUTO_ACCOUNT_REMOVAL is enabled or not?
Yes, the CREATE_DIRECTORIES is set to No. I noticed when modoboa is set to create directories, they are created with 0755 but when dovecot creates them they are 0700.
@tonioo commented on GitHub (Dec 4, 2013):
Posted by Antoine Nguyen on 2013-03-16T08:17:08Z
Dalnix AB wrote:
You're right, I'll change that.
I you configured sudo as indicated in the documentation (http://docs.modoboa.org/getting_started/configuration.html#host-configuration), it should work even with the permissions you see.
Anyway, the real problem is modo doesn't try to delete directories if CREATE_DIRECTORIES is set to No. I realize now it is a mistake. I'll find a way to fix it quickly. (because I don't know how to deal with non-local mailboxes).
Thanks for your feedback.
@tonioo commented on GitHub (Dec 4, 2013):
Posted by Dalnix AB on 2013-03-16T17:14:25Z
Antoine Nguyen wrote:
Got it. But, if I follow the quickfix from bug #387, setting VIRTUAL_UID and VIRTUAL_GID to numerical values, sudo won't work.
Then I get errors like:
in my sudo log, but if i use non numerical for VIRTUAL_UID/GID it works as it should:
mar 16 17:59:02 : root : TTY=unknown ; PWD=/var/www/modoboa ; USER=vmail ; COMMAND=/bin/mkdir -p /var/vmail/example.com mar 16 17:59:34 : root : TTY=unknown ; PWD=/var/www/modoboa ; USER=vmail ; COMMAND=/bin/rm -r /var/vmail/example.comNotice. I have read your diffs for fixing bug #387 (althou I can't read python that well ;) so you might already have solved this. Or maybe this is an unrelated issue.
@tonioo commented on GitHub (Dec 4, 2013):
Posted by Antoine Nguyen on 2013-03-17T09:19:15Z
Dalnix AB wrote:
Actually, this fix only displays error messages correctly.
The problem with dovecot is I can't know where mailboxes are stored (it handles everything). The only solution I found is to use doveadm to issue a user lookup query and so retrieve its mailbox path. It works well but only when mailboxes are stored locally.
If I want to handle non local mailboxes removal with modoboa, I'll need to add something smarter.
Are your mailboxes stored locally ?
@tonioo commented on GitHub (Dec 4, 2013):
Posted by Dalnix AB on 2013-03-17T09:42:49Z
Antoine Nguyen wrote:
They're on NFS.
@tonioo commented on GitHub (Dec 4, 2013):
Posted by Antoine Nguyen on 2013-03-17T10:08:21Z
Dalnix AB wrote:
Ok, so it would work. What is your dovecot version?
@tonioo commented on GitHub (Dec 4, 2013):
Posted by Dalnix AB on 2013-03-17T10:13:20Z
Antoine Nguyen wrote:
1.2.15 on Debian squeeze.
@tonioo commented on GitHub (Dec 4, 2013):
Posted by Antoine Nguyen on 2013-03-17T10:20:12Z
Dalnix AB wrote:
Oh my god... doveadm is only available with dovecot 2.x :p
Well, do you know a simple way to know where mailboxes are located using dovecot 1.2.x ?
@tonioo commented on GitHub (Dec 4, 2013):
Posted by Dalnix AB on 2013-03-17T10:54:29Z
Antoine Nguyen wrote:
Hmm, maybe this?
%d beeing the domain and %n the account name.
@tonioo commented on GitHub (Dec 4, 2013):
Posted by Antoine Nguyen on 2013-03-17T11:55:28Z
Dalnix AB wrote:
That's a solution but I see two problems with it:
1/ it requires modoboa can read the content of dovecot config's file
2/ it requires modoboa to parse the mail_location value
The 1/ element is the more annoying to me as it depends on the system configuration.
@tonioo commented on GitHub (Dec 4, 2013):
Posted by Dalnix AB on 2013-03-17T12:41:59Z
Antoine Nguyen wrote:
Ok, since you already suggest using sudo for removal of directories etc., why not suggest using a wrapper for running "dovecot -n | grep mail_location" and add a line like this:
to the sudoers file and creating a wrapper script:
maybe it's possible to do this without a script just using the sudoers file, but I couldn't figure out how.
Or... simply add a setting in modoboa where you have your mailboxes (you already have this, kind of, sort of, at least the first half ;)
@tonioo commented on GitHub (Dec 4, 2013):
Posted by Antoine Nguyen on 2013-03-17T13:06:36Z
Dalnix AB wrote:
It seems to be a good solution. I can ask dovecot its version and so run the proper command (doveadm or your wrapper) depending on the answer.
I don't really like this idea, we duplicate the information one more time.
Thanks!
@tonioo commented on GitHub (Dec 4, 2013):
Posted by Antoine Nguyen on 2013-03-17T13:07:26Z
One more question: have you finished your deployment or are you still testing modoboa?
@tonioo commented on GitHub (Dec 4, 2013):
Posted by Antoine Nguyen on 2013-04-04T19:11:37Z
Hi, I've thought about this problem and I think I'll only support mailboxes removal with dovecot 2.x. I'll also change the existing parameters to simplify the configuration.
I know you're using dovecot 1.2.x which is a pretty outdated version. Do you plan to move to 2.x?
@tonioo commented on GitHub (Dec 4, 2013):
Posted by Dalnix AB on 2013-04-05T18:50:58Z
Antoine Nguyen wrote:
That sounds good. I agree that it's probably best to only support 2.x.
Yes, of course. But for now we'll continue to run 1.2. Main reason we're still using 1.2 is that Debian squeeze came with it (which is what the old server ran, and the new one... old habits ;). Next debian version (which is around the corner) is using 2.x.
If I'd known about this issue before we started to migrate to a new server, I would have used another base than Debian.
@tonioo commented on GitHub (Dec 4, 2013):
Posted by Antoine Nguyen on 2013-04-06T18:05:42Z
Dalnix AB wrote:
I understand. Migrating to 2.x is pretty simple and you can easily find working debian packages.
I've finally pushed my modifications. Many paremeters have been removed:
I'll update the documentation. Now: