การศึกษาเรื่อง EAI

จาก Wiki_EAI
รุ่นแก้ไขเมื่อ 17:37, 12 กรกฎาคม 2564 โดย Photchanan (คุย | มีส่วนร่วม) (กำหนดให้รุ่นปรับปรุงนี้สำหรับการแปลภาษา)
ไปยังการนำทาง ไปยังการค้นหา
ภาษาอื่น ๆ:
English • ‎ไทย

EAI คืออะไร


การติดตั้งอีเมลภาษาท้องถิ่น

การติดตั้งขั้นพื้นฐาน

รองรับ SMTPUTF8, SMTP Auth (unencrypted & TLS), imap/pop3 (unencrypted &TLS)

Ubuntu

  • ตัวอย่างไฟล์ตั้งค่า [1]

Centos

Freebsd

พัฒนาการติดตั้งครั้งที่ 1

Configure Postfix to automatically add SMTPUTF8 when sending to EAI Address using Pipe Filter

คุณจะต้องมี Mail server ที่ทำการติดตั้งขั้นพื้นฐานไว้แล้ว


ติดตั้ง php5-cli, script จะใช้ PHP

sudo apt-get install php5-cli

get ไฟล์ script แล้ววางไว้ใน /etc/postfix

   cd /etc/postfix
   sudo wget https://raw.githubusercontent.com/padillareyj/eaifilter/master/eai-add-smtputf8.php

ปรับปรุง ownership และ permission

    cd /etc/postfix
    sudo chown root:root eai-add-smtputf8.php
    sudo chmod +x eai-add-smtputf8.php

ปรับปรุง master.cf ของคุณ ซึงจะกรองจดหมายขาเข้าที่มาจากพอร์ต 25 และ ส่งกลับไปยังพอร์ต 10025 (สามารถเข้าถึงจากภายในเท่านั้น) มันจะแนบท้าย SMPTUTF8 ใน MAIL FROM เมื่อคำสั่งถูกดำเนินการ 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


ปรับปรุง main.cf

content_filter =eaifilter:[127.0.0.1]:10025

พัฒนาการติดตั้งครั้งที่ 2

Configure Postfix to modify sender's email address when sending to Non-EAI enabled mail server using Pipe Filter คุณจะต้องมี Mail server ที่ทำการติดตั้งขั้นพื้นฐานและไม่ได้ติดตั้งการพัฒนาการติตตั้งครั้งที่ 1


ติดตั้ง php5-cli, script จะใช้ PHP

sudo apt-get install php5-cli

get ไฟล์ script แล้ววางไว้ใน /etc/postfix

   https://github.com/padillareyj/eaifilter/blob/master/eaifilter.php


ตัวกรองนี้จะตรวจสอบ mail server ขาออก ว่า server รองรับ SMTPUTF8 หรือไม่ แลัวมันจะเขียนที่อยู่ของผู้ส่งในรูปแบบ non-ascii บนพื้นฐานของ 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

ปรับปรุง main.cf

content_filter =eaifilter:[127.0.0.1]:10025


พัฒนาการติดตั้งครั้งที่ 3

Multiple virtual domain support ข้อมูล:

  • คุณจำเป็นต้องมีการติดตั้งขั้นพื้นฐาน
  • MySQL ไม่สามารถทำงานกับ Virtual Domains ได้ domain และ user ส่งคืนข้อความที่อ่านไม่ออกในการตรวจสอบการ login
  • ใช้ Virtual Alias Domain แทน (ใช้งานได้)
  • วิธีนี้น่าจะใช้งานได้กับ Ubuntu, Centos และ Freebsd
sudo postconf "virtual_alias_domains = yourdomain1.com yourdomain2.com yourdomain3.com youretc.com โดเมนคุณ.ไทย"
sudo postconf "virtual_alias_maps = hash:/etc/postfix/virtual"

สร้าง หรือ แก้ไขไฟล์ /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

ปรับปรุงการเปลี่ยนแปลง

sudo postmap /etc/postfix/virtual


การติดตั้ง 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
การติดตั้งขั้นพื้นฐาน NO NO YES NO NO YES YES
พัฒนาการติดตั้งครั้งที่ 1 NO NO YES YES * YES* YES YES
พัฒนาการติดตั้งครั้งที่ 2 YES YES YES YES* YES* YES YES
พัฒนาการติดตั้งครั้งที่ 3 - - - - YES YES

 *วิธีนี้จะใช้ได้กับ Mail client ที่อนุญาตให้ใช้ตัวอักษรที่เป็น NON-ASCII หรือ ที่อยู่ email ที่เป็น NON-ASCII จะไม่กลายเป็นตัวอักษรที่อ่านไม่ออก

รายการของ EAI ที่เปิดใช้งาน 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)

รายการของ EAI ที่เปิดใช้งาน Webmail

ณ เวลาที่เขียนนี้ ยังไม่มี webmail ตัวไหนที่สามารถใช้งานได้

NONE

การตั้งค่า Gmail เพื่อให้ทำงานเป็น EAI Client

Gmail เป็นตัวเลือกที่ดีที่สุดที่จะใช้เป็น Client

NONE

การตั้งค่า 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

รายการของ Scripts

xx