After changing domain name in Hosting Settings, the identities in roundcube webmail shows old domain name.

Created:

2016-11-16 12:42:33 UTC

Modified:

2017-08-16 16:38:38 UTC

0

Was this article helpful?


Have more questions?

Submit a request

After changing domain name in Hosting Settings, the identities in roundcube webmail shows old domain name.

Applicable to:

  • Plesk 12.5 for Linux

Symptoms

After changing domain name in Hosting Settings, identity in Roundcube webmail in Roundcube > Settings > Identities is not updated.

Cause

This is software issue #PPPM-4830 which is planned to be fixed in future Plesk updates.

Workaround

  1. Create backup of original file:

    # cp /usr/local/psa/admin/plib/Webmail.php{,.saved}
  2. To apply the workaround for new mailboxes, replace /usr/local/psa/admin/plib/Webmail.php file with hotfix from attachment .

    # wget https://support.plesk.com/hc/article_attachments/115004383569/Webmail_hotfix.zip
    # unzip Webmail_hotfix.zip
    # cp Webmail.php /usr/local/psa/admin/plib/Webmail.php
  3. To apply the workaround for already existing mailboxes:

    3.1. Create dump of roundcubemail database

    # MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysqldump -u admin  --extended-insert=FALSE --complete-insert --databases roundcubemail > backup.sql

    3.2. Create file with list of affected mailboxes

    #MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql -uadmin roundcubemail -Ne "select u.username, i.email from users u, identities i where u.user_id=i.user_id and u.username != i.email" > /root/affected.mailboxes
  4. Run script

    #!/bin/bash
    cat /root/affected.mailboxes | while read i v
    do
    MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql -uadmin roundcubemail -Ne "UPDATE identities i, users u SET i.email='$i' WHERE i.email='$v' and u.user_id=i.user_id and u.username != i.email"
    echo "$v -> $i: success"
    done

Attachments:

Have more questions? Submit a request
Please sign in to leave a comment.