Giter Site home page Giter Site logo

andrewnimmo / autodiscover-email-settings Goto Github PK

View Code? Open in Web Editor NEW

This project forked from monogramm/autodiscover-email-settings

1.0 1.0 0.0 314 KB

:whale: :wrench: Provides Autodiscover capabilities for IMAP/POP/SMTP/LDAP services on Microsoft Outlook/Apple Mail and Autoconfig capabilities for Thunderbird

License: MIT License

Dockerfile 6.38% JavaScript 14.63% HTML 61.35% Shell 17.64%

autodiscover-email-settings's Introduction

Autodiscover Autodiscover Email Settings

Build Status Codacy Badge Docker Pulls Docker layers

This service is created to autodiscover your provider email settings.

It provides IMAP/POP/SMTP/LDAP Autodiscover capabilities on Microsoft Outlook/Apple Mail, Autoconfig capabilities for Thunderbird, and Configuration Profiles for iOS/Apple Mail.

A simple support page is also available at the root of the autodiscover domain.

General settings

General settings

DNS settings

autoconfig              IN      A      {{$AUTODISCOVER_IP}}
autodiscover            IN      A      {{$AUTODISCOVER_IP}}
imap                    IN      CNAME  {{$MX_DOMAIN}}.
smtp                    IN      CNAME  {{$MX_DOMAIN}}.
@                       IN      MX 10  {{$MX_DOMAIN}}.
@                       IN      TXT    "mailconf=https://autoconfig.{{$DOMAIN}}/mail/config-v1.1.xml"
_imaps._tcp             IN      SRV    0 0 {{IMAP_PORT}} {{MX_DOMAIN}}.
_pop3s._tcp             IN      SRV    0 0 {{POP_PORT}} {{MX_DOMAIN}}.
_submission._tcp        IN      SRV    0 0 {{SMTP_PORT}} {{MX_DOMAIN}}.
_autodiscover._tcp      IN      SRV    0 0 443 autodiscover.{{$DOMAIN}}.
_ldap._tcp              IN      SRV    0 0 {{LDAP_PORT}} {{LDAP_HOST}}.

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
IMAP_PORT Port for your IMAP server
POP_PORT Port for your POP server
SMTP_PORT Port for your SMTP server
LDAP_HOST The hostname of your LDAP server
LDAP_PORT Port for your LDAP server

Usage

traefik can proxy your containers on docker, on docker swarm, and on a wide range of orchestrators. You can also achieve this with another proxy like Nginx for instance.

docker

version: '2'

services:
  autodiscover-example-com:
    image: monogramm/autodiscover-email-settings:latest
    container_name: autodiscover
    environment:
      - COMPANY_NAME=Company
      - SUPPORT_URL=https://autodiscover.example.com
      - DOMAIN=example.com
      # IMAP configuration (host mandatory to enable)
      - IMAP_HOST=imap.example.com
      - IMAP_PORT=993
      - IMAP_SOCKET=SSL
      # POP configuration (host mandatory to enable)
      - POP_HOST=pop3.example.com
      - POP_PORT=995
      - POP_SOCKET=SSL
      # SMTP configuration (host mandatory to enable)
      - SMTP_HOST=smtp.example.com
      - SMTP_PORT=587
      - SMTP_SOCKET=STARTTLS
      # MobileSync/ActiveSync configuration (url mandatory to enable)
      - MOBILESYNC_URL=https://sync.example.com
      - MOBILESYNC_NAME=sync.example.com
      # LDAP configuration (host mandatory to enable)
      - LDAP_HOST=ldap.example.com
      - LDAP_PORT=636
      - LDAP_SOCKET=SSL
      - LDAP_BASE=dc=ldap,dc=example,dc=com
      - LDAP_USER_FIELD=uid
      - LDAP_USER_BASE=ou=People,dc=ldap,dc=example,dc=com
      - LDAP_SEARCH=(|(objectClass=PostfixBookMailAccount))
      # Apple mobile config identifiers (identifier mandatory to enable)
      - PROFILE_IDENTIFIER=com.example.autodiscover
      - PROFILE_UUID=92943D26-CAB3-4086-897D-DC6C0D8B1E86
      - MAIL_UUID=7A981A9E-D5D0-4EF8-87FE-39FD6A506FAC
      - LDAP_UUID=6ECB6BA9-2208-4ABF-9E60-4E9F4CD7309E
    labels:
      - "traefik.port=8000"
      - "traefik.frontend.rule=Host:autoconfig.example.com,autodiscover.example.com"

docker swarm

version: '3'

services:
  autodiscover-example-com:
    image: monogramm/autodiscover-email-settings:latest
    container_name: autodiscover
    environment:
      - COMPANY_NAME=Company
      - SUPPORT_URL=https://autodiscover.example.com
      - DOMAIN=example.com
      # IMAP configuration (host mandatory to enable)
      - IMAP_HOST=imap.example.com
      - IMAP_PORT=993
      - IMAP_SOCKET=SSL
      # POP configuration (host mandatory to enable)
      - POP_HOST=pop3.example.com
      - POP_PORT=995
      - POP_SOCKET=SSL
      # SMTP configuration (host mandatory to enable)
      - SMTP_HOST=smtp.example.com
      - SMTP_PORT=587
      - SMTP_SOCKET=STARTTLS
      # MobileSync/ActiveSync configuration (url mandatory to enable)
      - MOBILESYNC_URL=https://sync.example.com
      - MOBILESYNC_NAME=sync.example.com
      # LDAP configuration (host mandatory to enable)
      - LDAP_HOST=ldap.example.com
      - LDAP_PORT=636
      - LDAP_SOCKET=SSL
      - LDAP_BASE=dc=ldap,dc=example,dc=com
      - LDAP_USER_FIELD=uid
      - LDAP_USER_BASE=ou=People,dc=ldap,dc=example,dc=com
      - LDAP_SEARCH=(|(objectClass=PostfixBookMailAccount))
      # Apple mobile config identifiers (identifier mandatory to enable)
      - PROFILE_IDENTIFIER=com.example.autodiscover
      - PROFILE_UUID=92943D26-CAB3-4086-897D-DC6C0D8B1E86
      - MAIL_UUID=7A981A9E-D5D0-4EF8-87FE-39FD6A506FAC
      - LDAP_UUID=6ECB6BA9-2208-4ABF-9E60-4E9F4CD7309E
    deploy:
      replicas: 1
      labels:
        - "traefik.port=8000"
        - "traefik.frontend.rule=Host:autoconfig.example.com,autodiscover.example.com"

Credits

Inspired from https://github.com/sylvaindumont/autodiscover.xml, but without the few restrictions mentioned in the original project notes and with a simple support page to allow manual setup and iOS profile download.

The original project was inspired from https://github.com/johansmitsnl/docker-email-autodiscover, but with https://github.com/Tiliq/autodiscover.xml instead of https://github.com/gronke/email-autodiscover to allow a much lighter () image based of node on alpine instead of apache on debian ()

Notes

The above autoconfiguration methods assume the following:

  • If username does not contain @, full email address will be generated based on domain settings

Links

License

This project is distributed under the MIT License

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.