EAI Study
เนื้อหา
What is EAI
Internationalized Email Installation
Base Installation
Supports SMTPUTF8, SMTP Auth (unencrypted & TLS), imap/pop3 (unencrypted &TLS)
Ubuntu
- Short Version - Quick installation (This does not work with NON-ASCII username, can use alias instead)
- Long version - Step by step with explanations (Recommended)
- Sample Config File [ http://tool.ts8.se.in.th/wikieai_en/files/vclass.info_main.cf]
Centos
Freebsd
Upgrade installation 1
Configure Postfix to automatically add SMTPUTF8 when sending to EAI Address using Pipe Filter
Make sure you have a working Mail server using the base installation
Install php5-cli, the script is using PHP
sudo apt-get install php5-cli
get the script and place it in /etc/postfix
cd /etc/postfix
sudo wget https://raw.githubusercontent.com/padillareyj/eaifilter/master/eai-add-smtputf8.php
Update ownership and permission
cd /etc/postfix
sudo chown root:root eai-add-smtputf8.php
sudo chmod +x eai-add-smtputf8.php
Update your master.cf, the following will filter all incoming mail coming from port 25 and resend to port 10025(accessible locally only), It will append the SMPTUTF8 in MAIL FROM command is executed. MAIL FROM: <MAIL> SMPTUTF8
smtp inet n - - - - smtpd -o content_filter=eaifilter -o receive_override_options=no_header_body_checks
eaifilter unix - n n - - pipe flags=RXhu user=nobody argv=/etc/postfix/eai-add-smtputf8.php -f ${sender} -d ${recipient}
127.0.0.1:10025 inet n - n - - smtpd
-o content_filter=
-o receive_override_options=no_unknown_recipient_checks,no_header_body_checks,no_milters
-o smtpd_helo_required=no
-o smtpd_helo_restrictions=
-o smtpd_data_restrictions=
-o smtpd_client_restrictions=
-o smtpd_sender_restrictions=
-o smtpd_recipient_restrictions=permit_mynetworks,reject
-o mynetworks_style=host
-o in_flow_delay=0
Update main.cf
content_filter =eaifilter:[127.0.0.1]:10025
Upgrade installation 2
Configure Postfix to modify sender's email address when sending to Non-EAI enabled mail server using Pipe Filter Make sure you have a working Mail server using the base installation and skipped Upgrade installation 1.
Install php5-cli, the script is using PHP
sudo apt-get install php5-cli
get the script and place it in /etc/postfix
https://github.com/padillareyj/eaifilter/blob/master/eaifilter.php
This filter will check outgoing mail server, if the server does not support SMTPUTF8, it rewrites the address of the sender to a non-ascii format base on alias mapping.
smtp inet n - - - - smtpd -o content_filter=eaifilter -o receive_override_options=no_header_body_checks
eaifilter unix - n n - - pipe flags=RXhu user=nobody argv=/etc/postfix/eaifilter.php -f ${sender} -d ${recipient}
127.0.0.1:10025 inet n - n - - smtpd
-o content_filter=
-o receive_override_options=no_unknown_recipient_checks,no_header_body_checks,no_milters
-o smtpd_helo_required=no
-o smtpd_helo_restrictions=
-o smtpd_data_restrictions=
-o smtpd_client_restrictions=
-o smtpd_sender_restrictions=
-o smtpd_recipient_restrictions=permit_mynetworks,reject
-o mynetworks_style=host
-o in_flow_delay=0
Update main.cf
content_filter =eaifilter:[127.0.0.1]:10025
Upgrade installation 3
Multiple virtual domain support Info:
Info:
- You need to have at least a base installation
- MySQL does not work for Virtual Domains, the domain and user return as garbled text in the authentication.
- Virtual Alias Domain is used instead (it works).
- This should work for Ubuntu, Centos and Freebsd
sudo postconf "virtual_alias_domains = yourdomain1.com yourdomain2.com yourdomain3.com youretc.com โดเมนคุณ.ไทย"
sudo postconf "virtual_alias_maps = hash:/etc/postfix/virtual"
edit or create /etc/postfix/virtual
yourdomain1.com DOMAIN
someuser@yourdomain1.com user1
yourdomain2.com DOMAIN
anotheruser@yourdomain2.com user2
yourdomain3.com DOMAIN
admin@yourdomain3.com user3
youretc.com DOMAIN
admin@youretc.com user1
โดเมนคุณ.ไทย DOMAIN
แอดมิน@โดเมนคุณ.ไทย user1
Update your changes
sudo postmap /etc/postfix/virtual
Installation | LOCAL EAI | SEND TO NON-EAI AS EAI | RECEIVE EAI MAIL | REPLY TO EAI WITH NON-EAI MAIL CLIENT | REPLY TO EAI BY NON-EAI WEBMAIL | REPLY TO EAI BY MODIFIED WEBMAIL | RECEIVE/REPLY/SEND using Gmail as a Client |
---|---|---|---|---|---|---|---|
Base Installation | NO | NO | YES | NO | NO | YES | YES |
Upgrade installation 1 | NO | NO | YES | YES * | YES* | YES | YES |
Upgrade installation 2 | YES | YES | YES | YES* | YES* | YES | YES |
Upgrade installation 3 | - | - | - | - | YES | YES |
*This will work only if the Mail client will allow a NON-ASCII character or the NON-ASCII character email address will not become garbled.
List of EAI Enabled Mail Client
Outlook 2016 - (Base Installation)Send to EAI as NON EAI (address is copy pasted) - Yes - using Coremail Server as EAI (Receiving) (Base Installation)Receive from EAI as NON EAI - Yes - using Coremail Server as EAI (Receiving) (Base Installation)Reply From EAI as NON EAI - No (The EAI email address is garbled when received) using Coremail Server (Receiving)
List of EAI Enabled Webmail
As the time of writing, there are no Webmail that works.
NONE
NONE
Configuring Gmail to work as a EAI Client
Gmail is the best option to use as a Client.
Configuring Outlook 2016
More Settings-> Outgoing Server -> Checked - My Outgoing server(SMTP) requires authentication More Settings-> Advance -> POP3 110, SMTP 25 , Use the following type of encrypted connection TLS