help centre
For more info visit status.atmail.com

How can we help?


Search our knowledge base for answers to
common questions and latest updates.



My activities New request

Follow

Dual Node: atmail suite & mail server

Dominic -

PROBLEM

How can I install the atmail suite and mail server on separate nodes?

ENVIRONMENT

  • atmail suite
  • atmail mail server

CAUSE

Installation requirement.

RESOLUTION

The atmail suite and mail server can be installed on separate nodes. This environment will allow dedicated resources per service(webmail/dav & imap/pop/smtp). This document will illustrate how to configure the atmail suite and mail server software in an integrated environment by explaining the required excerpts of each individual installation. Our example will use the following hostnames for each service:

  • atmail mail server : ms.local
  • atmail suite : suitedav.local

Pre-installation notes

Before installation, please make sure both of your hosts meet our System requirements.

Installation and configuration atmail mail server

  1. Install atmail mail server using our atmail mail server installation guide.
  2. Step 9 on the mail server installation guide now becomes a requirement as this plugin allows communication between mail server and suite.
    [root@localhost atmail-mailserver-[version]]# yum install atmail-mailserver-plugin-WebmailIntegration[version].el7.centos.x86_64.rpm -y -q
    Enabling plugins ..... [ OK ]
    Adding plugin to DB ..... [ OK ]
    Adding in config settings to DB ..... [ OK ]
  3. Continue with step 10 of the atmail mail server documentation and complete the remaining installation tasks.

Installation and configuration atmail suite

  1. Install atmail suite using our atmail suite installation guide.
  2. An example of step 5 of the atmail suite installation guide is shown below. During this step you will need to define your IMAP and SMTP settings for your mail server host.
    [root@suitedav atmail-suite-[version]]# /usr/bin/atmail-api-install 
    Welcome to the atmail api installation/configuration process
    You are installing on a RedHat type distribution
    Enter DB Host [ localhost ] :
    Enter DB Port [ 3306 ] :
    Enter DB user that has create user/grant access [ root ] :
    Enter root password [ ] : *********
    Enter URL Hostname where atmail services will be found [ suitedav.local ] :
    Will the API provision contacts/calendars [ yes ] :
    DAV provisioning has been enabled - you will need to update api.conf with details provided by dav install
    Is this a webmail ONLY install ? (ie no mailserver) yes/no [ no ] : yes
    Enter IMAP server:port accounts will connect to [ localhost:143 ] : ms.local:143
    Will this connection use tls/ssl true/false [ false ] :
    Enter outbound SMTP server accounts will use [ localhost:25 ] : ms.local:25
    Will this connection use SMTP Auth true/false [ true ] :
    Will this connection use tls/ssl true/false [ false ] :
    Enter your atmail ID : user@atmail.com
    Enter you licence key : ************************
    Configure NginX [ yes ] :
    Creating Database ...
    Creating application db account ...
    Creating DB schema ...
    INFO Wrote keyFile /etc/atmail/api/.keyring
    Create an admin user by running the following
    source /etc/profile.d/atmail-apiadmin.sh
    apiadmin user add <username> <passwd> --role=admin
    Creating override for systemd requirements for apiserver to ensure mariadb starts first
    Creating vhost file for atmail ...
    Creating locations for atmail api ...
    Restart of NginX required
    Enable apiserver to start at boot ...
    Installation/Configuration Completed - please ensure nginx/apiserver enabled and running!
  3. Don't forget to create your apiadmin user as advised during the /usr/bin/atmail-api-install. My example below denotes the user as 'admin' and the password as 'password'. We will need these credentials later to complete the integration of the services.
    [root@suitedav atmail-suite-8.2.0.1]# apiadmin user add admin password --role=admin
    INFO Adding user
    INFO User created.
    UserID=1
  4. Before moving onto step 6 in your atmail suite installation guide please perform the following.
  5. Install and enable redis.
    [root@suitedav ~]# yum install redis -y
    [root@suitedav ~]# systemctl start redis
    [root@suitedav ~]# systemctl enable redis
    Created symlink from /etc/systemd/system/multi-user.target.wants/redis.service to /usr/lib/systemd/system/redis.service.
    [root@suitedav ~]# systemctl status redis
    ● redis.service - Redis persistent key-value database
    Loaded: loaded (/usr/lib/systemd/system/redis.service; enabled; vendor preset: disabled)
    Drop-In: /etc/systemd/system/redis.service.d
    └─limit.conf
    Active: active (running) since Mon 2017-10-23 10:41:35 AEDT; 6s ago
    Main PID: 1793 (redis-server)
    CGroup: /system.slice/redis.service
    └─1793 /usr/bin/redis-server 127.0.0.1:6379
    Oct 23 10:41:35 suitedav.local systemd[1]: Started Redis persistent key-value database.
    Oct 23 10:41:35 suitedav.local systemd[1]: Starting Redis persistent key-value database...
  6. Next, open your /etc/atmail/api/api.conf with a text editor and update the MAILSERVER_BASEURL with the hostname of your mail server installation.
    [root@suitedav ~]# vim /etc/atmail/api/api.conf
    ###
    ### API
    ###

    API_ADDR=127.0.0.1:3000
    EVENTSOURCE_ADDR=127.0.0.1:3001

    BASE_URI=/api
    API_URL=https://suitedav.local/api/jmap
    EVENTSOURCE_URL=https://suitedav.local/event
    UPLOAD_URL=https://suitedav.local/api/upload
    DOWNLOAD_URL=https://suitedav.local/api/download?blobId={blobId}&name={name}&accountId={accountId}
    REGISTER_URL=https://suitedav.local/api/register
    MAILSERVER_BASEURL=ms.local
    STATIC_BASE_URL=https://suitedav.local/static
  7. Continue with step 6 of the atmail suite documentation and complete the remaining installation tasks.

Integration Configuration

Once both services are up and running, we need to complete the integration.

  1. Go to the mail server webadmin. Using my example mail server host-name, this would be: https://ms.local/admin/.
  2. Click Services -> Webmail API.
  3. Fill out the required inputs where:
    • API server URL = host-name of your suite server. Using my example suite host-name, this would be: https://suitedav.local/api/
    • Username = admin
    • Password = password
      The Username and Password are the credentials of your apiadmin user that you previously created in step 3 of the Installation and configuration atmail suite.
  4. Click Save Settings to confirm your settings.
    Screenshot_from_2017-10-23_10-38-01.png

Now that both services are integrated, you can perform tasks like creating users via your https://ms.local/admin and then logging in with them via https://suitedav.local.

Troubleshooting

The following logs will be of use in troubleshooting issues:

Mail server:

  • /var/log/maillog
  • /var/log/atmail/*
  • /var/log/nginx/atmail_*
  • /var/log/php-fpm/*

Suite:

  • /var/log/atmail/api.log
  • /var/log/nginx/atmail_*
  • /var/log/nginx/dav_errors.log

Starting the apiserver with a HEALTH_CHECK and outputting to STDOUT will also provide verbose debugging.

Open your /etc/atmail/api/api.conf with a text editor and add the following entry to the top of the file.

[root@suitedav ~]# vim /etc/atmail/api/api.conf
HEALTH_CHECK=true

You can then start apiserver using the below command:

[root@suitedav ~]# /usr/bin/apiserver -c /etc/atmail/api/api.conf -V -console
Have more questions? Submit a request

Comments


Contact our support team


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