Skip to main content

Read the README file

Project description

Email Address Internationalization

IDN-EAI

An internationalized domain name (IDN) is an Internet domain name that contains at least one label that is displayed in software applications, in whole or in part, in a language-specific script or alphabet, such as Arabic, Chinese, Cyrillic, Devanagari, Hebrew or the Latin alphabet-based characters with diacritics or ligatures, such as French. These writing systems are encoded by computers in multibyte Unicode. Internationalized domain names are stored in the Domain Name System (DNS) as ASCII strings using Punycode transcription.

EAI is the protocol that allows email addresses with IDNs in the domain part and/or Unicode (non-ASCII) characters in the Local part of the Mailbox name. Email software and services need to make specific changes to support EAI, since EAI mail is conceptually a separate mail stream from legacy ASCII mail.

Installation

You can install the idn-eai module from PyPI:

pip install idn-eai

The module is supported on Python 3.7

Features

  • API for finding out whether remote mail server is supporting utf-8 or not.
  • Based on the returned string, we will able to find out the SMTPUTF8 support on remote mail server
    • "TRUE" : SMTPUTF8 is supported on remote mail server
    • "FALSE" : SMTPUTF8 is not supported on remote mail server
    • "EXCEPTION" : When domain is invalid or unable to resolve
  • The internationalized domain name (IDN) homograph attack is a way a malicious party may deceive computer users about what remote system they are communicating with, by exploiting the fact that many different characters look alike in Hindi language (i.e., they are homographs, hence the term for the attack, although technically homoglyph is the more accurate term for different characters that look alike).
  • Phonics is a method for teaching people how to read and write an alphabetic language. It is done by demonstrating the relationship between the sounds of the spoken language (phonemes), and the letters or groups of letters (graphemes) or syllables of the written language. This is also known as the Alphabetic principle or the Alphabetic code.

The overriding goal for this package is to provide API for IDN & EAI related stuffs.

API Modules

Instructions on how to use them in your own application are linked below.

Module Functions
eai.eaichecker smtputf8_check(domain)
eai.idn_services generate_homograph_variants(word)
eai.idn_services generate_similar_phonic_variants(word)

Examples

  • smtputf8_check(gmail.com) will return TRUE string
  • smtputf8_check(yahoo.com) will return FALSE string
  • smtputf8_check(jsds.ins) will return EXCEPTION string
  • generate_homograph_variants(मुद्रा) will return मुद्गा,मुद्रा,मुद्ना as comma-separated string
  • generate_similar_phonic_variants(मुद्रा) will return मुद्रा,मूद्रा as comma-separated string

Environment

This code is tested on python 3.7

# python -v
Python 3.7.3 (default, Apr 24 2020, 18:51:23) 
[Clang 11.0.3 (clang-1103.0.32.62)] on darwin

Developer:

License

MIT

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

idn-eai-1.0.0.tar.gz (4.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

idn_eai-1.0.0-py3-none-any.whl (5.8 kB view details)

Uploaded Python 3

File details

Details for the file idn-eai-1.0.0.tar.gz.

File metadata

  • Download URL: idn-eai-1.0.0.tar.gz
  • Upload date:
  • Size: 4.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.7.3

File hashes

Hashes for idn-eai-1.0.0.tar.gz
Algorithm Hash digest
SHA256 4e84187d63acda9222763190a68f1d5f1e323e480599bc839c3fe80842a4bd3f
MD5 565f2e0b7792d39a089baa2fb295f25f
BLAKE2b-256 902942a1a71716739715bab3373145edfa8ce38f5e012e036a53f782483d9c36

See more details on using hashes here.

File details

Details for the file idn_eai-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: idn_eai-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 5.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.7.3

File hashes

Hashes for idn_eai-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 69038cfcea2f73c71fdc649cd4cfaf7bc4c35ce5d9e6dff7712110c400125f7c
MD5 67877308899650a6b96d473c77c4c3ed
BLAKE2b-256 7c3f5672cfc357355d157bcc8038348a5a2eea09e78ab7caadccfbc779762f1d

See more details on using hashes here.

Supported by

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