---
name: automx
version: 0.9
origin: mail/automx
comment: Handles mail account profile requests from mail clients
arch: freebsd:9:x86:64
www: http://www.automx.org/en/
maintainer: crees@FreeBSD.org
prefix: /usr/local
licenselogic: single
licenses:
- GPLv3
flatsize: 276049
desc: "automx makes setting up a mail account easy. All your users need to provide
  \nis real name, mail address and password. Their mail client and automx will \nsafely
  handle the rest.\n\nautomx runs on your server and handles mail account profile
  requests from \nyour mail clients. Put an end to endless phone calls trying to coach
  users to \nconfigure settings, whose dialogs they can't find. Stop wasting your
  time \nwriting Tutorials nobody reads.\n\nautomx unifies Microsofts and Mozillas
  mail account provisioning standards in \none powerful Open Source tool. Choose from
  many backends, including LDAP and \nSQL, and let automx create standard and individualized
  profiles for multiple \ndomains on the fly!\n\nWWW: http://www.automx.org/en/\n"
deps:
  ap22-mod_wsgi: {origin: www/mod_wsgi, version: 2.8_2}
  apache22: {origin: www/apache22, version: 2.2.25}
  libxslt: {origin: textproc/libxslt, version: 1.1.28_1}
  libxml2: {origin: textproc/libxml2, version: 2.8.0_2}
  expat: {origin: textproc/expat2, version: 2.1.0}
  bash: {origin: shells/bash, version: 4.2.45}
  libgpg-error: {origin: security/libgpg-error, version: 1.12}
  libgcrypt: {origin: security/libgcrypt, version: 1.5.3}
  python27: {origin: lang/python27, version: 2.7.5_2}
  python2: {origin: lang/python2, version: 2}
  python: {origin: lang/python, version: '2.7,2'}
  perl: {origin: lang/perl5.14, version: 5.14.4}
  wget: {origin: ftp/wget, version: 1.14_2}
  libidn: {origin: dns/libidn, version: 1.27}
  py27-lxml: {origin: devel/py-lxml, version: 3.2.3}
  py27-distribute: {origin: devel/py-distribute, version: 0.6.35}
  pkgconf: {origin: devel/pkgconf, version: 0.9.2_1}
  pcre: {origin: devel/pcre, version: 8.33}
  gettext: {origin: devel/gettext, version: 0.18.3}
  apr: {origin: devel/apr1, version: 1.4.8.1.5.2}
  gdbm: {origin: databases/gdbm, version: 1.10}
  db42: {origin: databases/db42, version: 4.2.52_5}
  libiconv: {origin: converters/libiconv, version: 1.14_1}
categories:
- mail
message: |
  5. Web Server Configuration

     Finally configure the web server. It will accept configuration requests
     from mail clients, pass the information to automx and in turn will
     respond with account profiles once automx has figured out the details.

     First enable the wsgi module. Follow your OS documentation to find out
     how it needs to be done.

     automx is able to provision mail clients following the Mozilla
     autoconfig schema as well as mail clients following the Microsoft
     autodiscover schema. Both schemas have different requirements regarding
     hostname, port and level of security when a request is sent to the
     configuration server:

     Microsoft
            Mail clients following the Microsoft autodiscover schema require
            a https connection. The web server must identify itself as
            autodiscover.example.com on port 443 and it must use a valid
            server certificate that is trusted by the mail client requesting
            configuration.

     Mozilla
            Mail clients following the Mozilla autoconfig schema can use
            either a http or a https connection. The web server must
            identify itself as autoconfig.example.com on port 80 or 443. If
            it connects on 443 a valid server certificate that is trusted by
            the mail client requesting configuration has to be used.

     Here is a simple example that configures an autoconfig and an
     autodiscover service - both use the same automx script:
  <VirtualHost *:80>

    ServerName example.com
    ServerAlias autoconfig.example.com
    ServerAdmin webmaster@example.com

    <IfModule mod_wsgi.c>
      WSGIScriptAlias /mail/config-v1.1.xml /usr/local/lib/automx/automx.wsgi
      <Directory "/usr/local/lib/automx">
        Order allow,deny
        Allow from all
      </Directory>
    </IfModule>

  </VirtualHost>

  <VirtualHost *:443>

    ServerName example.com:443
    ServerAlias autoconfig.example.com:443
    ServerAdmin webmaster@example.com

    <IfModule mod_wsgi.c>
      WSGIScriptAlias /Autodiscover/Autodiscover.xml /usr/local/lib/automx/automx.
  wsgi
      WSGIScriptAlias /autodiscover/autodiscover.xml /usr/local/lib/automx/automx.
  wsgi
      <Directory "/usr/local/lib/automx">
        Order allow,deny
        Allow from all
      </Directory>
    </IfModule>

  </VirtualHost>

  [Note] ISPs

            In an advanced environment with thousands of domains, you can redirect
            mail clients via DNS entries to your ISP automx provisioning server for
            Microsoft clients and a web server instance with a wild card ServerName
            autoconfig.* to serve the Mozilla schema.
         autoconfig.example.com.       IN    A     192.168.2.1
         autodiscover.example.com.     IN    A     192.168.2.1

     automx comes with a little utility that helps testing proper operation.
     The next section explains how to use it.

  6. Testing And Debugging automx

     The automx-test utility sends configuration requests for Microsoft and
     Mozilla clients to the web server:
  $ automx-test user@example.com  1

     1

      The domainpart in the address determines the list of hostnames that
      will be queried. In this example autoconfig.example.com and
      autodiscover.example.com will be contacted.

     You should see the web server header and get XML results from the
     server.

     If things go wrong, the error.log is your friend. It will indicate
     configuration issues, if python modules are missing, if your database
     can not be queried or anything else that might go wrong.
     [Note] Note

            If you split error logs by port, e.g. port 80 and 443, you need to
            check both. Autoconfig requests will mostly show up in the port 80
            error.log, whereas autodiscover will only show up in your 443
            error.log.
