Current time: 11-22-2024, 02:06 PM Hello There, Guest! (LoginRegister)


Post Reply 
[BUG] mix-up when deleting alias-/subdomain
Author Message
push Offline


Posts: 3
Joined: Jan 2008
Reputation: 0
Post: #1
[BUG] mix-up when deleting alias-/subdomain
-----------------------
Actually this belongs in the ticket system, but that complains about the ticket being possible spam and rejects submission. Maybe one of the admins can move it over and delete this thread afterwards!?
-----------------------

Alright this is a bit complicate to explain, but i'll give it a try:

There's a problem when deleting alias domains with e.g. als_id=1 when there also exists a subdomain in the system with the same id (e.g. sub_id=1) which also has related e-mail accounts (e.g. mail@sub.domain.tld). This probably also happens the other way around, e.g. deleting subdomains when there are alias domain with the same id and having e-mail adresses.

Trying to delete the alias/(subdomain?) will result in the error: 'Domain alias you are trying to remove has email accounts !<br>First remove them!'.

The problem is that the alias delete script checks the sub_id field in mail_users, and since this field will be used by both alias domains and sub domains when adding new mail accounts this will lead to a mix up.

There probably should be an extra field in the mail_users table (e.g. "als_id") which is used when adding an alias email address (instead of using sub_id). Then the alias delete script should check for the existence of als_id in the mail_users table (instead of checking sub_id).
10-10-2008 08:46 AM
Find all posts by this user Quote this message in a reply
kilburn Offline
Development Team
*****
Dev Team

Posts: 2,182
Joined: Feb 2007
Reputation: 34
Post: #2
RE: [BUG] mix-up when deleting alias-/subdomain
You got an ugly bug here: sub_id should be handled as "alias id" or "subodmain id" based on the "mail_type" value (see this ticket).

I won't fix your bug right now though because sci2tech is completely rewriting the mail accounts handling code to clean it up (it's a real mess) so hopefully it'll get fixed when he commits his work Smile
10-12-2008 04:28 AM
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)