Skip to main content

email autodiscovery

Project description

myl-discovery

Email autoconfig library

Installation

pip install myl-discovery

Usage

from myldiscovery import autodiscover
autodiscover("me@example.com")
# {'imap': {'server': 'mail.example.com', 'port': 993, 'starttls': False},
#  'smtp': {'server': 'mail.example.com', 'port': 587, 'starttls': False}}

Development

Autodiscovery

autoconfig

curl -L https://mail.example.com/mail/config-v1.1.xml

Response:

<?xml version="1.0" encoding="UTF-8"?>
<clientConfig version="1.1">
	<emailProvider id="example.com">
	    <domain>example.com</domain>

	    <displayName>example.com Email</displayName>
	    <displayShortName>%EMAILLOCALPART%</displayShortName>
	    <incomingServer type="imap">
			<hostname>mail.example.com</hostname>
			<port>143</port>
			<socketType>STARTTLS</socketType>
			<authentication>password-cleartext</authentication>
			<username>%EMAILADDRESS%</username>
		</incomingServer>
	    <outgoingServer type="smtp">
			<hostname>mail.example.com</hostname>
			<port>587</port>
			<socketType>STARTTLS</socketType>
			<authentication>password-cleartext</authentication>
			<username>%EMAILADDRESS%</username>
	    </outgoingServer>
		<documentation url="https://autodiscover.example.com">
			<descr lang="en">Generic settings page</descr>
			<descr lang="fr">Paramètres généraux</descr>
			<descr lang="es">Configuraciones genéricas</descr>
			<descr lang="de">Allgemeine Beschreibung der Einstellungen</descr>
			<descr lang="ru">Страница общих настроек</descr>
		</documentation>
	</emailProvider>
</clientConfig>

autodiscover

curl -L mail.example.com/autodiscover/autodiscover.xml

Response:

<?xml version="1.0" encoding="utf-8" ?>
<Autodiscover xmlns="http://schemas.microsoft.com/exchange/autodiscover/responseschema/2006">
        <Response xmlns="http://schemas.microsoft.com/exchange/autodiscover/responseschema/2006">
                <User>
                        <DisplayName>example.com Email</DisplayName>
                </User>
                <Account>
                        <AccountType>email</AccountType>
                        <Action>settings</Action>
                        <ServiceHome>https://autodiscover.example.com</ServiceHome>

                        <Protocol>
                                <Type>IMAP</Type>
                                <TTL>1</TTL>

                                <Server>mail.example.com</Server>
                                <Port>143</Port>

                                <LoginName></LoginName>

                                <DomainRequired>on</DomainRequired>
                                <DomainName>example.com</DomainName>

                                <SPA>off</SPA>
                                <Encryption>TLS</Encryption>
                                <AuthRequired>on</AuthRequired>
                        </Protocol>
                </Account>
                <Account>
                        <AccountType>email</AccountType>
                        <Action>settings</Action>
                        <ServiceHome>https://autodiscover.example.com</ServiceHome>

                        <Protocol>
                                <Type>SMTP</Type>
                                <TTL>1</TTL>

                                <Server>mail.example.com</Server>
                                <Port>587</Port>

                                <LoginName></LoginName>

                                <DomainRequired>on</DomainRequired>
                                <DomainName>example.com</DomainName>

                                <SPA>off</SPA>
                                <Encryption>TLS</Encryption>
                                <AuthRequired>on</AuthRequired>
                        </Protocol>
                </Account></Response>
</Autodiscover>

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

myl-discovery-0.5.1.tar.gz (43.8 kB view details)

Uploaded Source

Built Distribution

myl_discovery-0.5.1-py3-none-any.whl (30.8 kB view details)

Uploaded Python 3

File details

Details for the file myl-discovery-0.5.1.tar.gz.

File metadata

  • Download URL: myl-discovery-0.5.1.tar.gz
  • Upload date:
  • Size: 43.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.1 CPython/3.11.4

File hashes

Hashes for myl-discovery-0.5.1.tar.gz
Algorithm Hash digest
SHA256 da3a971b5bd6e997c9532f2ee18ba849a7ecf046023ec3b79d68aed9b6a47edb
MD5 21feb40ee83527ea7846526d00141cfd
BLAKE2b-256 ce9d182ceb8442b399e8959356eed49a8f9d334d52050838aa2c4b877f85a84e

See more details on using hashes here.

File details

Details for the file myl_discovery-0.5.1-py3-none-any.whl.

File metadata

File hashes

Hashes for myl_discovery-0.5.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f7c21d1d46c07d26f43b166393ea11048247e83d1515ce20f20b4673686277fd
MD5 783c28ee462de9ce328c1018b055ed58
BLAKE2b-256 541860d0d341c46c409fa88a4b400df98f82d8de942f05778933d78bdafed186

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page