Opened 13 years ago

Last modified 10 years ago

#431 testing defect (fixed)

Addresses (and users) are not deleted when a domain is deleted

Reported by: rjl Owned by: mortonda@…
Priority: normal Milestone: 1.0.3
Component: PHP scripts Version: 1.0.2
Severity: normal Keywords: maia_db.php delete domains
Cc:

Description

When a domain is deleted using the Maia GUI, the email addresses in that

domain are not being deleted as they should be. The delete_domain() function in maia_db.php needs to be amended to delete any entries from the users and policy tables that belong to that domain. If deleting such an address leaves its owner with no other email addresses, then the user account (in maia_users) should also be deleted. The maiadbtool.pl script already does this; this problem is limited to maia_db.php.

Change History (7)

comment:1 Changed 13 years ago by anonymous

It's currently possible to add users without the domain even entered; do

we want to consider forcing a domain to be entered first?

Should we make an option to delete the email addresses or not when deleting the domain?

comment:2 Changed 13 years ago by anonymous

That's how the maiadbtool.pl script handles it. If an email address being

added has a domain that doesn't already exist in Maia's database, the domain record is automatically created. Doing so would also simplify life for the superadmin, since domains would be created implicitly as new users are added.

As for making the deleting of email addresses optional when a domain is deleted, I don't see the point in keeping them around if the domain no longer exists. At best, I can see a pop-up or somesuch to warn the admin that all email addresses in that domain are about to be deleted, asking him to confirm his intention.

comment:3 Changed 13 years ago by anonymous

Hi,

I think that automatically deleting them with or without approval is bad. My setup is currently running on some domains but a load of users (which are not all inside those domains). The domains had been created because the owner of the domain wanted to have better controlling options domain wide.

The users which are not mapped to a domain, did not need that function so I only created accounts for them to manage their own mailbox and inherit system default settings.

With your idea I am forced to add a domain first (which only generates overhead for me), then the accounts and in the case nobody needs to administrer the domain, i cannot just remove the domain because that will also remove the users attached to it.

I do not support this idea :) (but then again others might and I need to go with the majority).

-- Remko

comment:4 Changed 13 years ago by anonymous

Remko, if the adition of new users added the domain automatically, it

would be the same values as @. which would essentially do nothing different from the way it is. That wouldn't add any extra work for you.

OTOH, Robert, there's really no real need to have the @domain entry at all. The only reason I see to have it is either to have a slightly different policy than the original, to delegate control to other admins, and/or just for completeness of the schema.

Perhaps a better deletion tool would be a wildcard match search? For example, we could add a checkbox next to the find users list, and a delete button on that page that would delete the users. We need to improve it a bit more anyway, to also list aliases.

comment:5 Changed 13 years ago by anonymous

The @domain account serves a vital function in that it allows the @.

account to be used to handle only outgoing mail. When every domain has a corresponding @domain account, that @domain account becomes the catch-all for the domain, so the only mail that will ever fall through to the @. account is outbound mail. This is what makes it possible for Maia admins to define a filtering policy for outbound mail.

Secondly, as you point out, the @domain accounts make it possible for the super-admin to delegate administrative authority on a per-domain basis, which is something that many Maia users need to do as part of their business model. Offsite mail filtering services and ISPs, for instance, typically want to give clients some control over their domain.

Following on that last point, a lot of old-school admins prefer not to assign Maia accounts to individual users, not trusting them to manage their quarantines properly, so instead they just want a single @domain account that catches everything and can be managed by the admin in one place. Often these admins gradually create exceptions by granting individual accounts to a handful of users (perhaps eventually doing so for all of them), so the @domain account becomes a management pool for the users who aren't trusted enough to do so themselves.

All of this said, I agree that we could use a wildcard-based address- deletion tool as well, but that's really something additional, not a replacement for this feature.

comment:6 Changed 10 years ago by mortonda@…

  • Owner changed from dmorton to mortonda@…
  • Status changed from new to accepted

[1420] added option to domain screen.

comment:7 Changed 10 years ago by mortonda@…

  • Resolution set to fixed
  • Status changed from accepted to testing
Note: See TracTickets for help on using tickets.