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 hashes)

Uploaded Source

Built Distribution

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

Uploaded Python 3

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