How can we help?




Follow

webmail URL

Stewart -

PROBLEM

How do I change my webmail URL?

ENVIRONMENT

  • atmail suite - webmail

CAUSE

Requirement to change webmail URL after installation. 

RESOLUTION

  1. During the atmail suite installation, you set the webmail URL for your installation when running the following command.
    /usr/bin/atmail-api-install
    If you would like to change this URL after installation has been completed, you need to update the following configurations.
  2. Locate and update URL within your api.conf. For example, if you set your IP address as 127.0.0.1 as your webmail URL during installation.
    # cat /etc/atmail/api/api.conf | grep "127.0.0.1" 
        API_URL=https://127.0.0.1/api/jmap 
        EVENTSOURCE_URL=https://127.0.0.1/event 
        UPLOAD_URL=https://127.0.0.1/api/upload 
        DOWNLOAD_URL=https://127.0.0.1/api/download?blobId={blobId}&name={name}&accountId={accountId} 
        SHARE_URL=https://127.0.0.1/api/download?blobId={blobId}&name={name}&accountId={accountId}&accessToken={accessToken} 
        REGISTER_URL=https://127.0.0.1/api/register 
        MAILSERVER_BASEURL=127.0.0.1 
        STATIC_BASE_URL=https://127.0.0.1/static 
        DAV_BASEURI=https://127.0.0.1:8443/ 
        SHARE_URL=https://127.0.0.1/api/download?blobId={blobId}&name={name}&accessToken={accessToken}
    If you then wanted to change the URL to domain.com, you can use the following command in vi.
    :%s/127.0.0.1/domain.com/g
    Save changes and check all have been replaced.
    # cat /etc/atmail/api/api.conf | grep "domain.com" 
        API_URL=https://domain.com/api/jmap 
        EVENTSOURCE_URL=https://domain.com/event 
        UPLOAD_URL=https://domain.com/api/upload 
        DOWNLOAD_URL=https://domain.com/api/download?blobId={blobId}&name={name}&accountId={accountId} 
        SHARE_URL=https://domain.com/api/download?blobId={blobId}&name={name}&accountId={accountId}&accessToken={accessToken} 
        REGISTER_URL=https://domain.com/api/register 
        MAILSERVER_BASEURL=domain.com 
        STATIC_BASE_URL=https://domain.com/static 
        DAV_BASEURI=https://domain.com:8443/ 
        SHARE_URL=https://domain.com/api/download?blobId={blobId}&name={name}&accessToken={accessToken}
  3. You will have to also do the following update/s.

    Example

    cd /usr/share/atmail/webmail
    
    grep -Ril "127.0.0.1"
    
    [root@suite webmail]# grep -Ril "127.0.0.1"
    public/javascript/app-f32410f064f9a22e8366.js.20190719-213600
    public/javascript/app-f32410f064f9a22e8366.js
    
    If you then wanted to change the URL to domain.com, you can use the following command in vi.
    :%s/127.0.0.1/domain.com/g
    Save changes and check all have been replaced.
    cd /usr/share/atmail/webmail
    
    grep -Ril "domain.com"
    
    [root@suite webmail]# grep -Ril "domain.com"
    public/javascript/app-f32410f064f9a22e8366.js.20190719-213600
    public/javascript/app-f32410f064f9a22e8366.js
  4. Restart apiserver services.
    systemctl restart apiserver

 

Have more questions? Submit a request

Comments


Contact our support team


+61 (7) 5357 6605       support@atmail.com