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.2.tar.gz (43.8 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: myl-discovery-0.5.2.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.2.tar.gz
Algorithm Hash digest
SHA256 e0a83e216d821c1fb0b6d1cd0a00c71463275b4b605d6340f2df74ffd5bf3712
MD5 fda04cab31246bafc726998315e4e225
BLAKE2b-256 9cb1e2ae45778de543074e13ceebea99a2e72d86d6935f9800fd5664d00fcffe

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for myl_discovery-0.5.2-py3-none-any.whl
Algorithm Hash digest
SHA256 b7b3264630731774147ad3accd71528d3c9e46e3426418977f66c4b318ad105b
MD5 aa09552c56c005543d5461a107f5acb6
BLAKE2b-256 ae3d39eb391519b3dae6b91b7d11cd997951d32aa183acebbdafa271caf5b6ec

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