bugweb-cyradm - Bugs: bug #10161, Domain name change doesn't update...

 
 

bug #10161: Domain name change doesn't update the e-mail addresses.

Submitted by:  Anders Norrbring <MrPiercer>
Submitted on:  Thu 26 Aug 2004 05:26:06 PM UTC  
 
Category: mainSeverity: 3 - Normal
Priority: 5 - NormalItem Group: normal bugs
Status: FixedPrivacy: Public
Assigned to: NoneOriginator Name: Anders Norrbring
Open/Closed: ClosedRelease: 0.5.4
Operating System: GNU/LinuxReproducibility: Every Time
Planned Release: 0.5.4Cyrus IMAP version: 2.1.x
PHP version: 4.3Database type: MySQL 4.0

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Fri 27 Jan 2006 02:23:33 PM UTC, comment #5:

Correct! If you would change web-cyradm.org to old-cyradm.org the second recipient would stay at web-cyradm.org after the change.

Commited the patch .. Thanks for your help, more patches are appreciated :)

Now we've got a fullweekend for testing and go further to RC status

Michael Muenz <mimu>
Project Member
Fri 27 Jan 2006 02:11:25 PM UTC, comment #4:

hello michael

sorry, it's some days since i did that work. :)

if i understand you correct you are updating aliases which are pointing to email-addresses of the old domain to the new one, right?

i think this addition to the patch is correct and should have been in that patch anyway.

cheers
roman

Roman Hochuli <medea61>
Fri 27 Jan 2006 01:38:37 PM UTC, comment #3:

Roman, I've updated your patch, to also update "dest" if you have a local address in your alias.

Example: New Alias -> -unavailable-
Destinations -> me@all.org, local@web-cyradm.org, -unavailable-

:)

Check this little update if it's ok for you and I'll check it in:

for($i = 0; $i < $result5->numRows(); $i++){
$resultrow = $result5->fetchRow();
$oldalias = $resultrow[0];
$newalias = preg_replace("/" . preg_quote($domain) . "/", $newdomain, $resultrow[0]);
$updatealias = "UPDATE virtual SET alias = '$newalias' WHERE alias = '$oldalias'";
$updateresult = $handle->query($updatealias);
$updatealias2 = "UPDATE virtual SET dest = '$newalias' WHERE dest = '$oldalias'";
$updateresult2 = $handle->query($updatealias2);

P.S.: I know my style is ugly ;)

Michael Muenz <mimu>
Project Member
Sat 17 Dec 2005 03:05:07 PM UTC, comment #2:

this patch (against 0.5.5-beta1) will update the aliases to the new domainname while the userid is left as is.

Roman Hochuli <medea61>
Sat 17 Dec 2005 02:24:36 PM UTC, comment #1:

to clarify this: you'd like to have the email-addresses in the virtual-table to be updated to reflect the new domainname and not the usernames, right? otherwise if all accounnames would be updated too this would implicitly force to update all accounts in cyrus to be updated as well because the username is also the name of the mailbox...

Roman Hochuli <medea61>
Thu 26 Aug 2004 05:26:06 PM UTC, original submission:

When I go to "Edit Domain" and change the domain name, in my case the TLD from .biz to .se, the domain does change correctly.

But, the e-mail accounts within the domain does not change to the new domain name.

Neither does the aliases change to reflect the changed domain name.

All account names needs to be edited manually in the SQL database.

Anders Norrbring <MrPiercer>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #2423:  domainchanged_update_aliases.patch added by medea61 (2KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

Do you think this task is very important?
If so, you can click here to add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

 

 

Follow 4 latest changes.

Date Changed By Updated Field Previous Value => Replaced By
Fri 27 Jan 2006 03:21:29 PM UTCmimuStatusNone=>Fixed
  Open/ClosedOpen=>Closed
Sat 17 Dec 2005 03:05:07 PM UTCmedea61Attached File-=>Added domainchanged_update_aliases.patch, #3196
  Carbon-Copy-=>Added -unavailable-

Back to the top


Powered by Savane 3.1-cleanup1