How can we help?




Follow

api.conf

Dominic -

PROBLEM

What variables are available for api.conf?

ENVIRONMENT

  • atmail suite - API server

CAUSE

I want to customise functionality of my atmail api.

RESOLUTION

The /etc/atmail/api/api.conf file will control how and where your api server will make its connections.

Available variables for this configuration can be found by running the following:

# apiadmin --help

The default api.conf file should suffice for most set ups. Common variables that you may wish to adjust may include:

SMTP_ADDR=localhost:25
SMTP_AUTH=true
SMTP_TLS=false
IMAP_ADDR=localhost:143
IMAP_TLS=false
TLS_CERT=path/to/cert
TLS_KEY=path/to/key
CLIENT_ID=atmailID_from_customer_portal
LICENSE=licensekey_from_customer_portal

While debugging, you may wish to enable the VERBOSE variable. This will allow for more output to your defined LOG_FILE=. This can be done by passing the variable a Boolean value as seen below.

VERBOSE=true

A restart of the apiserver will be required after making changes to the api.conf.

[root@localhost ~]# systemctl restart apiserver
[root@localhost ~]# systemctl status apiserver
● apiserver.service - atmail-api - jmap api for atmail webmail
   Loaded: loaded (/usr/lib/systemd/system/apiserver.service; enabled; vendor preset: disabled)
  Drop-In: /etc/systemd/system/apiserver.service.d
           └─depends.conf
   Active: active (running) since Wed 2017-07-19 14:40:43 AEST; 4s ago
     Docs: http://www.atmail.com/
  Process: 10289 ExecStop=/bin/kill -s QUIT $MAINPID (code=exited, status=0/SUCCESS)
 Main PID: 10292 (apiserver)
   CGroup: /system.slice/apiserver.service
           └─10292 /usr/bin/apiserver -config /etc/atmail/api/api.conf

Jul 19 14:40:43 localhost.localdomain systemd[1]: apiserver.service: main process exited, code=exited, status=2/INVALIDARGUMENT
Jul 19 14:40:43 localhost.localdomain systemd[1]: Unit apiserver.service entered failed state.
Jul 19 14:40:43 localhost.localdomain systemd[1]: apiserver.service failed.
Jul 19 14:40:43 localhost.localdomain systemd[1]: Started atmail-api - jmap api for atmail webmail.
Jul 19 14:40:43 localhost.localdomain systemd[1]: Starting atmail-api - jmap api for atmail webmail...

Ad hoc tasks can be performed with the apiadmin command line tool. Further documentation on this tool can be found here.

Comments


Contact our support team


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