OK

If you continue browsing this website, you accept the use of cookies to build visit statistics. Know more

Make users' life easier with automx

Dec. 16, 2012

You already know Modoboa but what is automx?

automx makes setting up a mail account easy. All your users need to provide is real name, mail address and password. Their mail client and automx will safely handle the rest.

As you may already know, Modoboa is totally compatible with automx and can provide information about all hosted domains and accounts. The only requirements are:

  • A working Modoboa installation
  • A copy of automx installed on your server

We will not cover the installation of Modoboa here. Please refer to the official documentation if you need to.

Setting up automx is pretty simple, go to its installation section and choose the proper option.

Now, here comes the funny part! The configuration of automx must be modified to allow him fetching data from Modoboa's database.

Open automx configuration file (generally /etc/automx.conf) and modify its content as follows:

[automx]
provider = <your main domain>
domains = *

debug = yes
logfile = /path/to/automx.log

[global]
backend = sql
action = settings

host = driver://user:password@your_db_server/dbname

Depending on the database server you use, the query that fetchs information from Modoboa's database will differ.

MySQL users:

query = SELECT CONCAT(first_name, ' ', last_name) AS display_name, email FROM auth_user WHERE email='%s'

PostgreSQL users:

query = SELECT first_name || ' ' || last_name AS display_name, email FROM auth_user WHERE email='%s'

Then, automx needs to know which fields it must use:

result_attrs = display_name, email

The last thing to add concerns the services your platform offers (ie. SMTP and IMAP):

smtp = yes
smtp_server = your.server
smtp_port = 587
smtp_encryption = starttls
smtp_auth = plaintext
smtp_expiration_date = 20121231
smtp_refresh_ttl = 6
smtp_default = yes
smtp_auth_identity = ${email}

imap = yes
imap_server = your.server
imap_port = 143
imap_encryption = starttls
imap_auth = plaintext
imap_expiration_date = 20121231
imap_refresh_ttl = 6
imap_auth_identity = ${email}

Obviously, this is just an example of two working configurations. Feel free to modify it.

Restart automx and you're done! Nice, isn't it?