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

Uploaded Source

Built Distribution

myl_discovery-0.5.3-py3-none-any.whl (30.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: myl-discovery-0.5.3.tar.gz
  • Upload date:
  • Size: 44.0 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.3.tar.gz
Algorithm Hash digest
SHA256 b1009ad54aa5466549a7c64f1cb6724f45b2988e25b395333c1fa0a5779bd4f9
MD5 c26b08bce67065a6735ae880a6961b83
BLAKE2b-256 f21c00d3382f9ef6847b4a1337f56f4754e1dcd494a9aa7383cdf5363f33fa4a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for myl_discovery-0.5.3-py3-none-any.whl
Algorithm Hash digest
SHA256 976bd697026ca6a53e4ae7333d62d6e31b6d08c93d7c961f9d91f51af12e13df
MD5 28d072efa630b97747bc0f70e58ec3bb
BLAKE2b-256 2ceb00afebb6547b82845320e898f543ba5c424f76148eccf371e384bdec790b

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