ผลต่างระหว่างรุ่นของ "การศึกษาเรื่อง EAI/en"
Photchanan (คุย | มีส่วนร่วม) (สร้างหน้าด้วย " More Settings-> Outgoing Server -> Checked - My Outgoing server(SMTP) requires authentication More Settings-> Advance -> POP3 110, SMTP 25 , Use the fo...") |
Photchanan (คุย | มีส่วนร่วม) (สร้างหน้าด้วย "Update ownership and permission <syntaxhighlight lang="bash"> cd /etc/postfix sudo chown root:root eai-add-smtputf8.php sudo chmod +x eai-add...") |
||
แถว 5: | แถว 5: | ||
*[[How to allow EAI - our solution]] | *[[How to allow EAI - our solution]] | ||
+ | |||
+ | ==Internationalized Email Installation == | ||
<div class="mw-translate-fuzzy"> | <div class="mw-translate-fuzzy"> | ||
− | == | + | ===Base Installation=== |
− | + | Supports SMTPUTF8, SMTP Auth (unencrypted & TLS), imap/pop3 (unencrypted &TLS) | |
− | |||
− | |||
− | |||
</div> | </div> | ||
− | + | ==== 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 == | |
− | + | *[[Centos - base installation]] | |
− | *[[Centos - | + | *[[Centos - FAQs]] |
− | *[[Centos - | ||
− | |||
− | + | == Freebsd == | |
− | + | *[[Freesbsd - Long version - Step by step with explanations]] | |
− | *[[Freesbsd - | ||
− | |||
− | + | ===Upgrade installation 1=== | |
− | |||
− | |||
− | + | Configure Postfix to automatically add SMTPUTF8 when sending to EAI Address using Pipe Filter | |
− | 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 | |
− | |||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
sudo apt-get install php5-cli | sudo apt-get install php5-cli | ||
</syntaxhighlight> | </syntaxhighlight> | ||
− | |||
− | + | get the script and place it in /etc/postfix | |
− | get | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
cd /etc/postfix | cd /etc/postfix | ||
sudo wget https://raw.githubusercontent.com/padillareyj/eaifilter/master/eai-add-smtputf8.php | sudo wget https://raw.githubusercontent.com/padillareyj/eaifilter/master/eai-add-smtputf8.php | ||
</syntaxhighlight> | </syntaxhighlight> | ||
− | |||
− | + | Update ownership and permission | |
− | |||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
cd /etc/postfix | cd /etc/postfix | ||
แถว 71: | แถว 50: | ||
sudo chmod +x eai-add-smtputf8.php | sudo chmod +x eai-add-smtputf8.php | ||
</syntaxhighlight> | </syntaxhighlight> | ||
− | |||
− | + | 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 | |
− | |||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
smtp inet n - - - - smtpd -o content_filter=eaifilter -o receive_override_options=no_header_body_checks | smtp inet n - - - - smtpd -o content_filter=eaifilter -o receive_override_options=no_header_body_checks | ||
แถว 90: | แถว 67: | ||
-o in_flow_delay=0 | -o in_flow_delay=0 | ||
</syntaxhighlight> | </syntaxhighlight> | ||
− | |||
− | + | Update main.cf | |
− | |||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
content_filter =eaifilter:[127.0.0.1]:10025 | content_filter =eaifilter:[127.0.0.1]:10025 | ||
</syntaxhighlight> | </syntaxhighlight> | ||
− | |||
− | + | ===Upgrade installation 2=== | |
− | |||
Configure Postfix to modify sender's email address when sending to Non-EAI enabled mail server using Pipe Filter | 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 | |
− | |||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
sudo apt-get install php5-cli | sudo apt-get install php5-cli | ||
</syntaxhighlight> | </syntaxhighlight> | ||
− | |||
− | + | get the script and place it in /etc/postfix | |
− | get | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
https://github.com/padillareyj/eaifilter/blob/master/eaifilter.php | https://github.com/padillareyj/eaifilter/blob/master/eaifilter.php | ||
</syntaxhighlight> | </syntaxhighlight> | ||
− | |||
− | + | 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. | |
− | |||
− | |||
− | |||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
smtp inet n - - - - smtpd -o content_filter=eaifilter -o receive_override_options=no_header_body_checks | smtp inet n - - - - smtpd -o content_filter=eaifilter -o receive_override_options=no_header_body_checks | ||
แถว 142: | แถว 107: | ||
-o in_flow_delay=0 | -o in_flow_delay=0 | ||
</syntaxhighlight> | </syntaxhighlight> | ||
− | |||
− | + | Update main.cf | |
− | |||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
content_filter =eaifilter:[127.0.0.1]:10025 | content_filter =eaifilter:[127.0.0.1]:10025 | ||
</syntaxhighlight> | </syntaxhighlight> | ||
− | |||
− | + | ===Upgrade installation 3=== | |
− | |||
Multiple virtual domain support | 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. |
− | * MySQL | + | * Virtual Alias Domain is used instead (it works). |
− | * | + | * This should work for Ubuntu, Centos and Freebsd |
− | * | ||
− | |||
− | |||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
sudo postconf "virtual_alias_domains = yourdomain1.com yourdomain2.com yourdomain3.com youretc.com โดเมนคุณ.ไทย" | sudo postconf "virtual_alias_domains = yourdomain1.com yourdomain2.com yourdomain3.com youretc.com โดเมนคุณ.ไทย" | ||
sudo postconf "virtual_alias_maps = hash:/etc/postfix/virtual" | sudo postconf "virtual_alias_maps = hash:/etc/postfix/virtual" | ||
</syntaxhighlight > | </syntaxhighlight > | ||
− | |||
− | + | edit or create '''/etc/postfix/virtual''' | |
− | |||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
yourdomain1.com DOMAIN | yourdomain1.com DOMAIN | ||
someuser@yourdomain1.com user1 | someuser@yourdomain1.com user1 | ||
− | |||
− | |||
yourdomain2.com DOMAIN | yourdomain2.com DOMAIN | ||
anotheruser@yourdomain2.com user2 | anotheruser@yourdomain2.com user2 | ||
− | |||
− | |||
yourdomain3.com DOMAIN | yourdomain3.com DOMAIN | ||
admin@yourdomain3.com user3 | admin@yourdomain3.com user3 | ||
− | |||
− | |||
youretc.com DOMAIN | youretc.com DOMAIN | ||
admin@youretc.com user1 | admin@youretc.com user1 | ||
− | |||
− | |||
โดเมนคุณ.ไทย DOMAIN | โดเมนคุณ.ไทย DOMAIN | ||
แอดมิน@โดเมนคุณ.ไทย user1 | แอดมิน@โดเมนคุณ.ไทย user1 | ||
</syntaxhighlight > | </syntaxhighlight > | ||
− | |||
− | + | Update your changes | |
− | |||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
sudo postmap /etc/postfix/virtual | sudo postmap /etc/postfix/virtual | ||
</syntaxhighlight > | </syntaxhighlight > | ||
− | |||
− | |||
<!-- | <!-- | ||
− | |||
<div lang="th" dir="ltr" class="mw-content-ltr"> | <div lang="th" dir="ltr" class="mw-content-ltr"> | ||
แถว 262: | แถว 206: | ||
</div> | </div> | ||
− | |||
[[Category: EAI]] | [[Category: EAI]] | ||
− |
รุ่นแก้ไขเมื่อ 17:45, 12 กรกฎาคม 2564
เนื้อหา
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