• Stars
    star
    133
  • Rank 271,618 (Top 6 %)
  • Language
    PHP
  • Created over 9 years ago
  • Updated almost 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Use HTTP and DNS to provide MX server configuration profiles to native mail clients like Outlook and Thunderbird.

E-Mail Autoconfigure

Some E-Mail clients gather configuration information before setting up mail accounts. This project allows to provide clients like Outlook and Thunderbird the proper mail server configuration, so that users can simply enter their email and password to setup a new mail account.

Installation

Apache Webserver

You need an Apache webserver with PHP5 preconfigures. You can then configure your Virtual Host like this

<VirtualHost *:443>
  ServerName autodiscover.{{$DOMAIN}}
  ServerAlias autodiscover.{{$DOMAIN}} autoconfig.{{$DOMAIN}}

  <Location />
    Options -Indexes
    AllowOverride All
  </Location>

  ...
</VirtualHost>

Now copy settings.json.sample to your Virtual Host directory root and apply your configuration variables.

Autoconfig for multiple domains on the same server

When a user puts his E-Mail address [email protected] into his mail client, it will probably do a GET request on https://autodiscover.example.org/autodiscover/autodiscover.xml

If you have multiple domains hosted on your mailserver, you can redirect those requests to your main-autoconfig server. Add this configuration to your existing Virtual Host configuration:

<VirtualHost *:443>
  ServerName example.org
  SSLEngine On
  ...

  RewriteEngine On
  RewriteCond %{HTTP_HOST} ^autodiscover\. [NC]
  RewriteRule ^/(.*)      https://autodiscover.{{$DOMAIN}}/$1 [L,R=301,NE]

  RewriteCond %{HTTP_HOST} ^autoconfig\. [NC]
  RewriteRule ^/(.*)      https://autoconfig.{{$DOMAIN}}/$1 [L,R=301,NE]
  ...
</VirtualHost>

<VirtualHost *:80>
  ServerName example.org
  
  RewriteEngine On
  RewriteCond %{HTTP_HOST} ^autodiscover\. [NC]
  RewriteRule ^/(.*)      https://autodiscover.{{$DOMAIN}}/$1 [L,R=301,NE]

  RewriteCond %{HTTP_HOST} ^autoconfig\. [NC]
  RewriteRule ^/(.*)      https://autoconfig.{{$DOMAIN}}/$1 [L,R=301,NE]
  ...
</VirtualHost>

DNS Setup

For the case you are using Bind and have the autoconfig HTTP server running on the same IP your www. subdomain resolves to, you can use this DNS records to configure your nameserver

autoconfig              IN      CNAME   www
autodiscover            IN      CNAME   www

@                       IN      MX 10   {{$MX_DOMAIN}}.
@                       IN      TXT     "mailconf=https://autoconfig.{{$DOMAIN}}/mail/config-v1.1.xml"
_imaps._tcp             SRV 0 1 993     {{$MX_DOMAIN}}.
_submission._tcp        SRV 0 1 465     {{$MX_DOMAIN}}.
_autodiscover._tcp      SRV 0 0 443     autodiscover.{{$DOMAIN}}.

Instead of a CNAME, you can of course also choose an A-record

autoconfig              IN      A      {{$AUTODISCOVER_IP}}
autodiscover            IN      A      {{$AUTODISCOVER_IP}}

Replace above variables with data according to this table

Variable Description
MX_DOMAIN The hostname name of your MX server
DOMAIN Your apex/bare/naked Domain
AUTODISCOVER_IP IP of the Autoconfig HTTP

ToDo

  • Allow other authentication methods (currently always required)
  • Support nginx HTTP server
  • Add client support table
  • Create a Makefile for easy installation

More Repositories

1

systemd-iptables

Example of a persistent firewall based on systemd for Debian Jessie.
Shell
64
star
2

raspberry-provisioning

Toolchain for headless provisioning of Raspbian on Raspberry Pi
Python
13
star
3

OpenVPN-linux-push

Allow OpenVPN server to push nameservers to linux client.
Shell
10
star
4

ansible-dhparam

Ansible Role that generates Diffie-Hellman Parameters (dhparam)
9
star
5

py-jail

A Python libc wrapper for FreeBSD jails
Python
4
star
6

ansible-firewall

Simple iptables wrapper role to harden microservices
Shell
3
star
7

kendo-template-loader

Async Kendo Template Loader
JavaScript
3
star
8

ansible-nginx-site

Ansible Role to dynamically configure a Nginx virtual host that integrates with existing vhosts
3
star
9

ansible-openldap

Ansible role to provision OpenLDAP (slapd)
3
star
10

ansible-mountpoint

Ansible role to create a mountpoint that persists reboots
2
star
11

jitsi-conferencemapper-api

Jitsi ConferenceMapper API
Python
2
star
12

py-freebsd_sysctl

Native FreeBSD Sysctl bindings for Python 3
Python
2
star
13

ansible-radicale

Ansible Role: Radicale - a simple calendar and contact server
2
star
14

jquery.imagecrop

upload and crop images with this jQuery plugin
JavaScript
2
star
15

qubes-git-proxy

Qubes RPC Git SSH Proxy
Shell
2
star
16

py-zfs

Python wrapper for FreeBSD libzfs
Python
1
star
17

bash-emailtime

Sets email file timestamps to received date in current maildir folder
1
star
18

defectdojo_cli

Just a test
Python
1
star
19

dotfiles

Minimal set of dotfiles
Shell
1
star
20

ansible-gogs

Ansible role to provision Gogs (Go Git Service)
1
star
21

polymer-freegeoip-lookup

Polymer element for client geolocation lookup with freegeoip.net
HTML
1
star
22

polymer-unit-convert

Polymer element for unit conversion
HTML
1
star
23

pwn4j

Reconnaissance with Neo4J
Python
1
star
24

polymer-openweathermap

Polymer element that queries data from OpenWeatherMap API
HTML
1
star
25

node-commit-status-reporter

GitHub Statuses reporting utility written in TypeScript
TypeScript
1
star
26

php-sc-waveform-base64

encode a SoundCloud waveform with base64
PHP
1
star
27

jquery.create

jQuery elementCreate plugin
JavaScript
1
star