<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="th">
	<id>https://wiki.thnic.or.th/index.php?action=history&amp;feed=atom&amp;title=%E0%B8%89%E0%B8%9A%E0%B8%B1%E0%B8%9A%E0%B9%80%E0%B8%95%E0%B9%87%E0%B8%A1_-_%E0%B8%AD%E0%B8%98%E0%B8%B4%E0%B8%9A%E0%B8%B2%E0%B8%A2%E0%B8%AD%E0%B8%A2%E0%B9%88%E0%B8%B2%E0%B8%87%E0%B8%A5%E0%B8%B0%E0%B9%80%E0%B8%AD%E0%B8%B5%E0%B8%A2%E0%B8%94%E0%B8%97%E0%B8%B5%E0%B8%A5%E0%B8%B0%E0%B8%82%E0%B8%B1%E0%B9%89%E0%B8%99%E0%B8%95%E0%B8%AD%E0%B8%99</id>
	<title>ฉบับเต็ม - อธิบายอย่างละเอียดทีละขั้นตอน - ประวัติรุ่นแก้ไข</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.thnic.or.th/index.php?action=history&amp;feed=atom&amp;title=%E0%B8%89%E0%B8%9A%E0%B8%B1%E0%B8%9A%E0%B9%80%E0%B8%95%E0%B9%87%E0%B8%A1_-_%E0%B8%AD%E0%B8%98%E0%B8%B4%E0%B8%9A%E0%B8%B2%E0%B8%A2%E0%B8%AD%E0%B8%A2%E0%B9%88%E0%B8%B2%E0%B8%87%E0%B8%A5%E0%B8%B0%E0%B9%80%E0%B8%AD%E0%B8%B5%E0%B8%A2%E0%B8%94%E0%B8%97%E0%B8%B5%E0%B8%A5%E0%B8%B0%E0%B8%82%E0%B8%B1%E0%B9%89%E0%B8%99%E0%B8%95%E0%B8%AD%E0%B8%99"/>
	<link rel="alternate" type="text/html" href="https://wiki.thnic.or.th/index.php?title=%E0%B8%89%E0%B8%9A%E0%B8%B1%E0%B8%9A%E0%B9%80%E0%B8%95%E0%B9%87%E0%B8%A1_-_%E0%B8%AD%E0%B8%98%E0%B8%B4%E0%B8%9A%E0%B8%B2%E0%B8%A2%E0%B8%AD%E0%B8%A2%E0%B9%88%E0%B8%B2%E0%B8%87%E0%B8%A5%E0%B8%B0%E0%B9%80%E0%B8%AD%E0%B8%B5%E0%B8%A2%E0%B8%94%E0%B8%97%E0%B8%B5%E0%B8%A5%E0%B8%B0%E0%B8%82%E0%B8%B1%E0%B9%89%E0%B8%99%E0%B8%95%E0%B8%AD%E0%B8%99&amp;action=history"/>
	<updated>2026-10-23T12:01:10Z</updated>
	<subtitle>ประวัติรุ่นแก้ไขของหน้านี้ในวิกิ</subtitle>
	<generator>MediaWiki 1.46.2</generator>
	<entry>
		<id>https://wiki.thnic.or.th/index.php?title=%E0%B8%89%E0%B8%9A%E0%B8%B1%E0%B8%9A%E0%B9%80%E0%B8%95%E0%B9%87%E0%B8%A1_-_%E0%B8%AD%E0%B8%98%E0%B8%B4%E0%B8%9A%E0%B8%B2%E0%B8%A2%E0%B8%AD%E0%B8%A2%E0%B9%88%E0%B8%B2%E0%B8%87%E0%B8%A5%E0%B8%B0%E0%B9%80%E0%B8%AD%E0%B8%B5%E0%B8%A2%E0%B8%94%E0%B8%97%E0%B8%B5%E0%B8%A5%E0%B8%B0%E0%B8%82%E0%B8%B1%E0%B9%89%E0%B8%99%E0%B8%95%E0%B8%AD%E0%B8%99&amp;diff=48&amp;oldid=prev</id>
		<title>Nattawut: Created page with &quot;&#039;&#039;&#039;การติดตั้ง Postfix กับ SMTPUTF8 ที่เปิดใช้งาน, Cyrus SASL และ OpenSSL&#039;&#039;&#039;  == สรุปสาระสำคั...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.thnic.or.th/index.php?title=%E0%B8%89%E0%B8%9A%E0%B8%B1%E0%B8%9A%E0%B9%80%E0%B8%95%E0%B9%87%E0%B8%A1_-_%E0%B8%AD%E0%B8%98%E0%B8%B4%E0%B8%9A%E0%B8%B2%E0%B8%A2%E0%B8%AD%E0%B8%A2%E0%B9%88%E0%B8%B2%E0%B8%87%E0%B8%A5%E0%B8%B0%E0%B9%80%E0%B8%AD%E0%B8%B5%E0%B8%A2%E0%B8%94%E0%B8%97%E0%B8%B5%E0%B8%A5%E0%B8%B0%E0%B8%82%E0%B8%B1%E0%B9%89%E0%B8%99%E0%B8%95%E0%B8%AD%E0%B8%99&amp;diff=48&amp;oldid=prev"/>
		<updated>2017-02-14T07:11:54Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;&amp;#039;&amp;#039;&amp;#039;การติดตั้ง Postfix กับ SMTPUTF8 ที่เปิดใช้งาน, Cyrus SASL และ OpenSSL&amp;#039;&amp;#039;&amp;#039;  == สรุปสาระสำคั...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;หน้าใหม่&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;การติดตั้ง Postfix กับ SMTPUTF8 ที่เปิดใช้งาน, Cyrus SASL และ OpenSSL&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
== สรุปสาระสำคัญของ mail server ==&lt;br /&gt;
คู่มือนี้ใช้สำหรับการติดตั้ง mail server ที่สามารถรับ mail ที่เป็น SMTPUTF8 ได้ นอกจากนี้ยังป้องการการตีกลับของอีเมลหากผู้ส่งส่งไปยัง mail server&lt;br /&gt;
&lt;br /&gt;
ที่ไม่รองรับ SMTPUTF8 รวมถึง IMAP และ POP3 ที่ใช้ Courier ด้วย ผู้ใช้จะถูกเพิ่มเป็น local user ถึงแม้ว่าจะ login ผ่าน SSH หรือไม่ก็ตาม mail ทั้งหมดจะถูกเก็บไว้ที่ /home/user&lt;br /&gt;
&lt;br /&gt;
Squirrel-mail ที่ถูกแก้ไขนี้จะถูกติดตั้งในการส่งและรับ email (จะต้องมีการทดสอบ)&lt;br /&gt;
&lt;br /&gt;
email client สามารถนำมาใช้ได้ โดยใช้ username ที่ไม่ได้เป็น EAI address&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
ใช้ Ubuntu 14.04 (Trusty)&lt;br /&gt;
&lt;br /&gt;
== ข้อสังเกต ความต้องการและการตั้งค่าเริ่มต้น ==&lt;br /&gt;
&lt;br /&gt;
* คุณต้องแน่ใจว่าไม่มีการติดตั้ง Postfix หรือใช้ apt-get ติดตั้งส่วนเสริมของ mail software เพราะว่ามันจะทำการติดตั้ง Postfix ตัวเก่าที่ไม่รองรับ SMTPUTF8&lt;br /&gt;
* ถ้าคุณได้ติดตั้งส่วนเสริมของ mail software หลังจากการติดตั้ง คุณต้องทดสอบให้แน่ใจว่า server ของคุณสามารถส่งกลับมาเป็น SMTPUTF8&lt;br /&gt;
* DNS ของคุณควรต้องติดตั้งให้พร้อมก่อนการตั้งค่า&lt;br /&gt;
* hostname คือ ชื่อโดเมนของคุณ เช่น domain.com &lt;br /&gt;
* mail.hostname คือ ชื่อ Mail server ของคุณ เช่น mail.domain.com&lt;br /&gt;
&lt;br /&gt;
 &amp;#039;&amp;#039;&amp;#039;แก้ไข hostname &amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;#039;&amp;#039;ถ้าคุณใช้ international domain ให้คุณใช้ในรูปแบบ punycode&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
ตัวอย่าง: mail.วีคลาส.ไทย punycode equivalent ควรจะเป็น mail.xn--42c0eeo3bp.xn--o3cw4h&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo hostname mail.domain.com&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
ปิดและเปิด server ใหม่ เพื่อปรับปรุง hostname&lt;br /&gt;
&lt;br /&gt;
หลังจากปิดและเปิด server ใหม่แล้ว ให้ใช้คำสั่งต่อไปนี้จะแสดง hostname เพื่อดูว่า hostname เปลี่ยนแล้ว&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
hostname&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== ติดตั้ง Postfix จาก source และ libraries ที่จำเป็น (Cyrus  SASL, OPENSSL)  ==&lt;br /&gt;
&lt;br /&gt;
ใช้คำสั่ง get เพื่อดาวน์โหลด Postfix เวอร์ชั่น 3.0.1 หรือเวอร์ชั่นที่ใหม่กว่าเพื่อเปิดใช้งาน SMTPUTF8 คุณสามารถโหลดได้จาก http://www.postfix.org/download.html ในตัวอย่างด้านล่าง เราดาวน์โหลด postfix-3.0.1.tar.gz เวอร์ชั่นของคุณอาจจะแตกต่างออกไป ขณะนี้การติดตั้ง Postfix ด้วย apt-get นั้นจะทำการติดตั้ง Postfix เวอร์ชั่นเก่าที่ยังไม่รองรับ SMTPUTF8  ซึ่งอาจจะมีการเปลี่ยนแปลงในภายหลัง คุณสามารถดูคู่มือต้นฉบับได้จาก http://www.linuxfromscratch.org/blfs/view/cvs/server/postfix.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
ติดตั้ง libraries ที่จำเป็นสำหรับ users และ directory&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt-get update&lt;br /&gt;
sudo apt-get install icu-devtools libicu-dev libsasl2-dev libssl-dev  &lt;br /&gt;
sudo apt-get build-dep postfix&lt;br /&gt;
sudo groupadd -g 32 postfix &lt;br /&gt;
sudo groupadd postdrop &lt;br /&gt;
sudo useradd -c &amp;quot;Postfix Daemon User&amp;quot; -d /var/spool/postfix -g postfix  -s /bin/false -u 32 postfix &lt;br /&gt;
sudo chown -v postfix:postfix /var/mail&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
ดาวน์โหลด Postfix 3.0.1 หรือเวอร์ชั่นที่ใหม่กว่า&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
tar -xzvf postfix-3.0.1.tar.gz&lt;br /&gt;
cd postfix-3.0.1&lt;br /&gt;
sed -i &amp;#039;s/.\x08//g&amp;#039; README_FILES/*&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Compile ด้วย openssl และ sasl auth &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
make CCARGS=&amp;quot;-DUSE_TLS -I/usr/include/openssl/  \&lt;br /&gt;
             -DUSE_SASL_AUTH -DUSE_CYRUS_SASL -I/usr/include/sasl&amp;quot; \			&lt;br /&gt;
             AUXLIBS=&amp;quot;-lssl -lcrypto -lsasl2&amp;quot; makefiles &amp;amp;&amp;amp; make&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
ติดตั้ง Postfix&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo sh postfix-install -non-interactive   daemon_directory=/usr/lib/postfix  \&lt;br /&gt;
                    manpage_directory=/usr/share/man  \&lt;br /&gt;
                    html_directory=/usr/share/doc/postfix-3.0.1/html  \&lt;br /&gt;
                    readme_directory=/usr/share/doc/postfix-3.0.1/readme&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== การตั้งค่า Postfix ==&lt;br /&gt;
&lt;br /&gt;
สร้าง Mails Alias สำหรับ root หรือ  postmaster เพื่อส่งไปยังผู้ใช้งานจริง (YourLogin)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo vi /etc/aliases&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
copy และ paste ตัว code ด้านล่าง โดยเปลี่ยน YourLogin เป็น user ของคุณเองแล้วทำการ save และ quit&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
MAILER-DAEMON:    postmaster&lt;br /&gt;
postmaster:       root&lt;br /&gt;
root:             YourLogin&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
ต่อจากนั้น&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo newaliases&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
แก้ไข mail.domain.tld, domain.tld,  yourotherdomain.tld (yourotherdomain.tld ไม่จำเป็นต้องใส่ก็ได้)&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;vim&amp;quot;&amp;gt;&lt;br /&gt;
sudo postconf -e &amp;#039;myhostname  = mail.domain.tld&amp;#039;&lt;br /&gt;
sudo postconf -e &amp;#039;mydomain    = domain.tld&amp;#039;&lt;br /&gt;
sudo postconf -e &amp;#039;myorigin    = $mydomain&amp;#039;&lt;br /&gt;
sudo postconf -e &amp;#039;inet_interfaces = all&amp;#039;&lt;br /&gt;
sudo postconf -e &amp;#039;mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 192.168.0.0/24&amp;#039;&lt;br /&gt;
sudo postconf -e &amp;#039;alias_database = hash:/etc/aliases&amp;#039;&lt;br /&gt;
sudo postconf -e &amp;#039;alias_maps = hash:/etc/aliases&amp;#039;&lt;br /&gt;
sudo postconf -e &amp;#039;mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain, yourotherdomain.tld&amp;#039;&lt;br /&gt;
sudo postconf -e &amp;#039;smtputf8_enable = yes&amp;#039;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
ขั้นตอนสุดท้าย start Postfix ในครั้งแรก&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo /usr/sbin/postfix start&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
@TODO &lt;br /&gt;
Enable Postfix service to run at startup&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
ลองใช้งานและส่ง mail โดยใช้ Telnet ส่ง mail ไปยัง server อื่นๆ เช่น gmail&lt;br /&gt;
&lt;br /&gt;
== ทดสอบว่าคุณมีการเปิดการใช้งาน SMTPUTF8 หรือไม่ ==&lt;br /&gt;
&lt;br /&gt;
ป้อนคำสั่งในหน้า console ซึ่งคำสั่งจะทำการเชื่อมต่อไปยัง SMTP &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
 telnet localhost 25&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
ควรจะแสดงผลลัพธ์ดังนี้&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
Trying 127.0.0.1...&lt;br /&gt;
Connected to localhost.&lt;br /&gt;
Escape character is &amp;#039;^]&amp;#039;.&lt;br /&gt;
220 YourHostName ESMTP Postfix&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
พิมพ์คำสั่งด้านล่างแล้วกด enter&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
EHLO localhost&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
เมื่อพบว่ามี &amp;#039;&amp;#039;&amp;#039;250 SMTPUTF8&amp;#039;&amp;#039;&amp;#039; อยู่ แสดงว่า server ของคุณ สามารถรับและส่ง mail จากที่อยู่ email สากลได้&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
250-YourHostName&lt;br /&gt;
250-PIPELINING&lt;br /&gt;
250-SIZE 10240000&lt;br /&gt;
250-VRFY&lt;br /&gt;
250-ETRN&lt;br /&gt;
250-ENHANCEDSTATUSCODES&lt;br /&gt;
250-8BITMIME&lt;br /&gt;
250-DSN&lt;br /&gt;
250 SMTPUTF8&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
หากไม่พบ 250 SMTPUTF8 ให้ลองเอา Postfix ออกและลองใหม่อีกครั้ง เพราะอาจจะมีการติดตั้งส่วนเสริม software ของ Postfix ที่เป็นตัวเก่าเหลืออยู่&lt;br /&gt;
&lt;br /&gt;
== เปิดใช้งาน SMTP Auth ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt-get install libsasl2-modules sasl2-bin&lt;br /&gt;
sudo cp /etc/default/saslauthd /etc/default/saslauthd-postfix&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
แก้ไขไฟล์  /etc/default/saslauthd-postfix โดยกำหนดตัวแปลต่อไปนี้ START, NAME และ OPTIONS&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
START=yes&lt;br /&gt;
DESC=&amp;quot;SASL Auth. Daemon for Postfix&amp;quot;&lt;br /&gt;
NAME=&amp;quot;saslauthd-postf&amp;quot;      # max. 15 char.&lt;br /&gt;
# Option -m sets working dir for saslauthd (contains socket)&lt;br /&gt;
OPTIONS=&amp;quot;-c -m /var/spool/postfix/var/run/saslauthd&amp;quot;        # postfix/smtp in chroot()&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo rm -rf /run/saslauthd&lt;br /&gt;
sudo ln -s /var/spool/postfix/var/run/saslauthd   /run/saslauthd&lt;br /&gt;
sudo dpkg-statoverride --add root sasl 710 /var/spool/postfix/var/run/saslauthd&lt;br /&gt;
sudo adduser postfix sasl&lt;br /&gt;
cd /etc/pam.d&lt;br /&gt;
sudo cp other smtp&lt;br /&gt;
sudo service saslauthd  restart&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo mkdir /etc/sasl2 &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;	&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
สร้าง หรือ แก้ไขไฟล์ /etc/sasl2/smtpd.conf ใช้เฉพาะวิธีการแบบ PLAIN เท่านั้น&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
pwcheck_method: saslauthd&lt;br /&gt;
mech_list: PLAIN LOGIN&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
ปรับปรุงการตั้งค่า Postfix&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo postconf -e &amp;#039;smtpd_sasl_path = smtpd&amp;#039;&lt;br /&gt;
sudo postconf -e &amp;#039;smtpd_sasl_auth_enable = yes&amp;#039;&lt;br /&gt;
sudo postfix reload&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
สร้าง user ที่เราสามารถทดสอบการ authentication ได้ แทนที่ AnyUserName ด้วย user ของคุณ&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo useradd -m AnyUserName  -s /usr/sbin/nologin&lt;br /&gt;
sudo passwd AnyUserName &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
สร้าง Auth key ของคุณ แทนที่ username ด้วย username  ของคุณ และแทนที่ password ด้วย password ของคุณ&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
perl -MMIME::Base64 -e &amp;#039;print encode_base64(&amp;quot;username\0username\0password&amp;quot;);&amp;#039;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
แทนที่ dGVzdAB0ZXN0AHRlc3Q=  ด้วย key ที่คุณสร้างขึ้น&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
	&lt;br /&gt;
telnet 	localhost 25&lt;br /&gt;
EHLO localhost&lt;br /&gt;
AUTH PLAIN dGVzdAB0ZXN0AHRlc3Q=	&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
คุณควรจะได้รับข้อความว่า  Authentication successful&lt;br /&gt;
&lt;br /&gt;
จบการตั้งค่า Postfix ด้วยการอนุญาติให้เฉพาะผู้ใช้ที่ทำการ authenticate ทำการส่งไปยัง SMTP ได้&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo postconf -e &amp;#039;broken_sasl_auth_clients = yes&amp;#039;&lt;br /&gt;
sudo postconf -e &amp;#039;smtpd_sasl_security_options = noanonymous&amp;#039;&lt;br /&gt;
sudo postconf -e &amp;#039;smtpd_sasl_local_domain = $mydomain&amp;#039;&lt;br /&gt;
sudo postconf -e &amp;#039;smtpd_recipient_restrictions = permit_sasl_authenticated, permit_mynetworks, reject_unauth_destination&amp;#039;&lt;br /&gt;
sudo postconf -e &amp;#039;smtpd_relay_restrictions =  permit_mynetworks permit_sasl_authenticated reject_unauth_destination reject_sender_login_mismatch&amp;#039;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== เปิดใช้งาน TLS ==&lt;br /&gt;
&lt;br /&gt;
สร้าง certificates&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cd /etc/postfix&lt;br /&gt;
&lt;br /&gt;
sudo openssl req -new -outform PEM -out smtpd.cert \&lt;br /&gt;
   -newkey rsa:2048 -nodes -keyout smtpd.key -keyform PEM \&lt;br /&gt;
   -days 365 -x509&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
ตอบคำถามต่อไปนี้เมื่อได้รับแจ้ง&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
ปรับปรุงการตั้งค่า Postfix&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo postconf -e &amp;#039;smtpd_enforce_tls = no&amp;#039;&lt;br /&gt;
sudo postconf -e &amp;#039;smtpd_tls_security_level = may&amp;#039;&lt;br /&gt;
sudo postconf -e &amp;#039;smtpd_tls_loglevel = 1&amp;#039;&lt;br /&gt;
sudo postconf -e &amp;#039;smtpd_use_tls = yes&amp;#039;&lt;br /&gt;
sudo postconf -e &amp;#039;smtpd_tls_key_file  = /etc/postfix/smtpd.key&amp;#039;&lt;br /&gt;
sudo postconf -e &amp;#039;smtpd_tls_cert_file  = /etc/postfix/smtpd.cert&amp;#039;&lt;br /&gt;
sudo postfix reload&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
สามารถทดสอบโดยการ telnet ไปยัง 25 และใช้คำสั่ง EHLO จะพบคำว่า STARTTLS&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
250-PIPELINING&lt;br /&gt;
250-SIZE 10240000&lt;br /&gt;
250-VRFY&lt;br /&gt;
250-ETRN&lt;br /&gt;
250-STARTTLS&lt;br /&gt;
250-AUTH PLAIN LOGIN&lt;br /&gt;
250-AUTH=PLAIN LOGIN&lt;br /&gt;
250-ENHANCEDSTATUSCODES&lt;br /&gt;
250-8BITMIME&lt;br /&gt;
250-DSN&lt;br /&gt;
250 SMTPUTF8&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
พิมพ์คำสั่งด้านล่าง&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
STARTTLS&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
ปรากฎผลลัพธ์ดังนี้&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
220 2.0.0 Ready to start TLS&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== การรับและส่ง email จากอินเทอร์เน็ต ==&lt;br /&gt;
&lt;br /&gt;
*หมายเหตุ การติดตั้ง mail ผ่าน command line อาจจะไปติดตั้งทับ Postfix ของคุณด้วย Postfix ตัวเก่ากว่า&lt;br /&gt;
&lt;br /&gt;
การส่ง email ด้วย telnet&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
telnet localhost 25&lt;br /&gt;
EHLO localhost&lt;br /&gt;
&lt;br /&gt;
MAIL FROM: &amp;lt;youruser@domain.tld&amp;gt; SMTPUTF8&lt;br /&gt;
RCPT TO: &amp;lt;EAI@IDN.idn&amp;gt;&lt;br /&gt;
data&lt;br /&gt;
Subject: A Test&lt;br /&gt;
&lt;br /&gt;
This is the body&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
ใช้เครื่องหมาย &amp;quot;.&amp;quot; เพื่อจบข้อความและทำการส่งข้อความ&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
ในส่วนนี้โปรดตรวจสอบให้แน่ใจว่าสามารถรับและส่ง mail ได้&lt;br /&gt;
&lt;br /&gt;
สามารถส่งข้อความด้วย EAI address และตรวจสอบได้ที่ /var/mail/mail.log ใน log ด้านล่าง &lt;br /&gt;
&amp;lt;br/&amp;gt; หมายเหตุ test@domain.tld คือ ผู้รับ local&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
Aug  3 02:48:49 ip-172-31-21-209 postfix/local[21614]: 7EAD343550: to=&amp;lt;test@domain.tld&amp;gt;, relay=local, delay=0.62, delays=0.62/0/0/0, dsn=2.0.0, status=sent (delivered to mailbox)&lt;br /&gt;
Aug  3 02:48:49 ip-172-31-21-209 postfix/qmgr[21586]: 7EAD343550: removed&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
email จะถูกจัดเก็บไว้ที่ /var/mail/&lt;br /&gt;
&lt;br /&gt;
หากไม่ได้รับ email ให้ลองใช้เครื่องมือ online อื่น เช่น mxtoolbox.com เพื่อตรวจสอบปัญหาที่เกิดขึ้น&lt;br /&gt;
&lt;br /&gt;
== การตั้งค่า Courier authlib, Courier IMAP==&lt;br /&gt;
ขั้นตอนนี้จะทำการเปิดใช้งาน IMAP และ POP3 &lt;br /&gt;
&lt;br /&gt;
ติดตั้ง libtool ซึ่งจำเป็นสำหรับ authlib&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt-get install libtool&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
ติดตั้ง Courier Unicode Library 1.2 ซึ่งสามารถดาวน์โหลดได้จาก http://sourceforge.net/projects/courier/files/courier-unicode &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
tar -jxvf courier-unicode-1.2.tar.bz2&lt;br /&gt;
cd courier-unicode-1.2&lt;br /&gt;
./configure&lt;br /&gt;
make &lt;br /&gt;
sudo make install&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
ดาวน์โหลด authlib ได้จาก http://sourceforge.net/projects/courier/files/authlib/ เวอร์ชั่นล่าสุดคือ 0.66.3 &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
tar -jxvf courier-authlib-0.66.3.tar.bz2&lt;br /&gt;
cd courier-authlib-0.66.3&lt;br /&gt;
./configure --with-authshadow --with-mailuser=postfix --with-mailgroup=postfix&lt;br /&gt;
make &lt;br /&gt;
sudo make install&lt;br /&gt;
sudo make install-configure&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
แก้ไขไฟล์ /usr/local/etc/authlib/authdaemonrc และเปลี่ยนค่า authentication method&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
authmodulelist=&amp;quot;authshadow&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
เฉพาะ authshadow เท่านั้นที่ทำงานร่วมกับชื่อผู้ใช้ที่เป็น non-ASCII สำหรับ authentications ตัวอื่น ๆ เช่น PAM และ  MYSQL จะส่งผลลัพธ์ออกมาเป็นตัวอักษรที่อ่านไม่ออกซึ่งจะทำให้การ authenticate ล้มเหลว&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
ต่อจากนั้นให้ Start&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
 sudo /usr/local/sbin/authdaemond  start&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
ตรวจสอบว่าโปรแกรมทำงานอยู่หรือไม่&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo ps -ef |grep authdaemond&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
ควรจะแสดงค่าดังต่อไปนี้&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
 26393 26392  0 10:26 ?        00:00:00 /usr/local/libexec/courier-authlib/authdaemond&lt;br /&gt;
 26394 26393  0 10:26 ?        00:00:00 /usr/local/libexec/courier-authlib/authdaemond&lt;br /&gt;
 26395 26393  0 10:26 ?        00:00:00 /usr/local/libexec/courier-authlib/authdaemond&lt;br /&gt;
 26396 26393  0 10:26 ?        00:00:00 /usr/local/libexec/courier-authlib/authdaemond&lt;br /&gt;
 26397 26393  0 10:26 ?        00:00:00 /usr/local/libexec/courier-authlib/authdaemond&lt;br /&gt;
 26398 26393  0 10:26 ?        00:00:00 /usr/local/libexec/courier-authlib/authdaemond&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
ติดตั้ง courier imap ซึ่งจะรองรับทั้ง IMAP และ POP3&lt;br /&gt;
&lt;br /&gt;
ดาวน์โหลดได้จาก http://sourceforge.net/projects/courier/files/imap&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
tar -jxvf courier-imap-4.16.2.tar.bz2&lt;br /&gt;
cd courier-imap-4.16.2&lt;br /&gt;
./configure&lt;br /&gt;
make&lt;br /&gt;
sudo make install&lt;br /&gt;
sudo make install-configure&lt;br /&gt;
&lt;br /&gt;
cd /usr/lib/courier-imap/libexec&lt;br /&gt;
sudo  ./pop3d.rc start&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
ตรวจสอบว่า imap ทำงานอยู่หรือไม่&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo  netstat -ntlp | grep 110&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;การเปิดใช้งาน SSL ด้วย self signed certificate&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cd /usr/lib/courier-imap/etc&lt;br /&gt;
sudo vi pop3d.cnf&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
ปรับเปลี่ยนได้ตามต้องการจากนั้นให้ save และ quit&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;vim&amp;quot;&amp;gt;&lt;br /&gt;
[ req_dn ]&lt;br /&gt;
C=US&lt;br /&gt;
ST=NY&lt;br /&gt;
L=New York&lt;br /&gt;
O=Courier Mail Server&lt;br /&gt;
OU=Automatically-generated POP3 SSL key&lt;br /&gt;
CN=localhost&lt;br /&gt;
emailAddress=postmaster@example.com&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
ต่อไปให้สร้าง certificates&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
 cd ../share&lt;br /&gt;
 sudo ./mkpop3dcert&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
ตอนนี้สามารถ run pop ด้วย ssl และ listen ที่พอร์ต 995&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cd /usr/lib/courier-imap/libexec&lt;br /&gt;
sudo ./pop3d-ssl.rc start&lt;br /&gt;
sudo  netstat -tulpn |grep 995&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
ขั้นตอนสุดท้ายเปิดการใช้งาน  pop3 และ pop3s ที่ init&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo ln -s /usr/lib/courier-imap/libexec/pop3d    /etc/init.d/&lt;br /&gt;
sudo ln -s /usr/lib/courier-imap/libexec/pop3d-ssl    /etc/init.d/&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
update-rc.d pop3d defaults&lt;br /&gt;
update-rc.d pop3d-ssl defaults&lt;br /&gt;
&lt;br /&gt;
@TODO&lt;br /&gt;
*Run level for ubuntu*&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
ต่อด้วย Imap&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo /usr/lib/courier-imap/libexec/imapd.rc start&lt;br /&gt;
sudo netstat -ntlp | grep 143&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
แก้ไข imapd&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo vi /usr/lib/courier-imap/etc/imapd&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
เปลี่ยนเป็น yes&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;vim&amp;quot;&amp;gt;&lt;br /&gt;
IMAPDSTART=yes&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
เปิดการใช้งาน imap SSL โดยใช้ self generated certificates&lt;br /&gt;
&lt;br /&gt;
แก้ไขการตั้งค่าและปรับเปลี่ยนให้สอดคล้องกัน&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;vim&amp;quot;&amp;gt;&lt;br /&gt;
sudo vi /usr/lib/courier-imap/etc/imapd.cnf&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
สร้าง certificate&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;vim&amp;quot;&amp;gt;&lt;br /&gt;
 sudo /usr/lib/courier-imap/share/mkimapdcert&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
ต่อไป start และ ตรวจสอบ imap-ssl &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo /usr/lib/courier-imap/libexec/imapd-ssl.rc start&lt;br /&gt;
sudo netstat -ntlp |grep 993&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
ขั้นตอนสุดท้ายเปิดใช้งานที่ startup&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
@TODO&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
ตั้งค่า Postfix ให้ใช้ Maildir เป็นที่เก็บ Mail&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo postconf -e &amp;#039;home_mailbox = Maildir/&amp;#039;&lt;br /&gt;
sudo postfix reload&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
ปรับเปลี่ยน Skeleton และสร้างโฟลเดอร์สำหรับผู้ใช้งานที่เราสร้างขึ้นก่อนหน้านี้ จากในตัวอย่างเราใช้ชื่อผู้ใช้งาน test&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo mkdir -p /etc/skel/Maildir/{cur,new,tmp}&lt;br /&gt;
&lt;br /&gt;
sudo mkdir -p /home/test/Maildir/{cur,new,tmp}&lt;br /&gt;
sudo chown test.test /home/test/Maildir/{,cur,new,tmp}&lt;br /&gt;
sudo chmod 0700 /home/test/Maildir/{,cur,new,tmp}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== ทดสอบ IMAP และ POP3 ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
telnet localhost imap&lt;br /&gt;
ok login username password&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
telnet localhost pop3&lt;br /&gt;
User username&lt;br /&gt;
Pass password&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== ติดตั้ง Squirrel-mail ==&lt;br /&gt;
&lt;br /&gt;
ติดตั้งและแก้ไข Squirrel mail&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cd /var/www/html&lt;br /&gt;
wget http://interlab.ait.ac.th/eai-wiki/files/squirrelmail.zip&lt;br /&gt;
unzip squirrelmail.zip&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
แก้ไขไฟล์ config และเปลี่ยนค่า &amp;#039;&amp;#039;&amp;#039;attachchment_dir&amp;#039;&amp;#039;&amp;#039; และ &amp;#039;&amp;#039;&amp;#039;data_dir&amp;#039;&amp;#039;&amp;#039; โดยอย่าลืมสร้างโฟลเดอร์&lt;br /&gt;
เปลี่ยน ownership เป็น &amp;#039;&amp;#039;&amp;#039;apache user&amp;#039;&amp;#039;&amp;#039; ของคุณและอนุญาติให้สามารถทำการเขียนได้&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
vi /var/www/html/squirrelmail/config/config.php &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
การเข้าถึง squirrelmail&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
http://your-domain/squirrelmail/&lt;br /&gt;
&amp;lt;/syntaxhighlight &amp;gt;&lt;br /&gt;
&lt;br /&gt;
== ข้อผิดพลาด ==&lt;br /&gt;
&lt;br /&gt;
สิ่งนี้เกิดขึ้นเมื่อทำการ login เข้าสู่  IMAP&lt;br /&gt;
&lt;br /&gt;
  error while loading shared libraries: libcourier-unicode.so.1: cannot open shared object file: No such file or directory&lt;br /&gt;
&lt;br /&gt;
วิธีการแก้ปัญหา &amp;#039;&amp;#039;sudo vi /etc/ld.so.conf&amp;#039;&amp;#039;  แล้วเพิ่ม&lt;br /&gt;
&lt;br /&gt;
 /usr/local/lib&lt;br /&gt;
&lt;br /&gt;
จากนั้นให้ run &amp;#039;&amp;#039;sudo ldconfig&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
== ลิงค์ที่เกี่ยวข้อง ==&lt;br /&gt;
Mail server จะไม่รับและส่ง email จากภายนอก&lt;br /&gt;
&lt;br /&gt;
== แหล่งที่มา ==&lt;br /&gt;
&lt;br /&gt;
http://postfix.org/&lt;br /&gt;
&lt;br /&gt;
https://kiranjith.wordpress.com/2010/03/15/12-postfix-installing-and-configuring-courier-auth-libs-courier-imap-and-pop3/&lt;br /&gt;
&lt;br /&gt;
http://www.linuxfromscratch.org/blfs/view/cvs/server/postfix.html&lt;br /&gt;
&lt;br /&gt;
http://www.postfix.org/SASL_README.html&lt;br /&gt;
https://wiki.debian.org/PostfixAndSASL&lt;/div&gt;</summary>
		<author><name>Nattawut</name></author>
	</entry>
</feed>