ผลต่างระหว่างรุ่นของ "ฉบับย่อ - การติดตั้งแบบรวดเร็ว"

จาก Wiki_EAI
ไปยังการนำทาง ไปยังการค้นหา
 
(ไม่แสดง 15 รุ่นระหว่างกลางโดยผู้ใช้คนเดียวกัน)
แถว 1: แถว 1:
 
สร้าง directories และติดตั้ง libraries ที่จำเป็น
 
สร้าง directories และติดตั้ง libraries ที่จำเป็น
<syntaxhighlight lang="bash">
+
<source lang="bash">
 
sudo apt-get update
 
sudo apt-get update
 
sudo apt-get install courier-imap courier-imap-ssl  courier-pop courier-pop-ssl  icu-devtools libicu-dev libsasl2-dev libssl-dev libsasl2-modules sasl2-bin
 
sudo apt-get install courier-imap courier-imap-ssl  courier-pop courier-pop-ssl  icu-devtools libicu-dev libsasl2-dev libssl-dev libsasl2-modules sasl2-bin
 
sudo mkdir -p /etc/skel/Maildir/{cur,new,tmp}
 
sudo mkdir -p /etc/skel/Maildir/{cur,new,tmp}
 
sudo apt-get build-dep postfix
 
sudo apt-get build-dep postfix
</syntaxhighlight>
+
</source>
 +
ตอบ:
 +
Web Admin - No
 +
Internet Site
  
  Web Admin
+
ดาวน์โหลดและสร้าง postfix-3.x
 +
<syntaxhighlight lang="bash">
 +
tar -xzvf postfix-3.0.2.tar.gz
 +
cd postfix-3.0.2
 +
sed -i 's/.\x08//g' README_FILES/*
 +
 
 +
make CCARGS="-DUSE_TLS -I/usr/include/openssl/ \
 +
            -DUSE_SASL_AUTH -DUSE_CYRUS_SASL -I/usr/include/sasl" \
 +
            AUXLIBS="-lssl -lcrypto -lsasl2" makefiles && make
 +
 
 +
 
 +
sudo sh postfix-install -non-interactive  daemon_directory=/usr/lib/postfix  \
 +
                    manpage_directory=/usr/share/man  \
 +
                    html_directory=/usr/share/doc/postfix-3.0.1/html  \
 +
                    readme_directory=/usr/share/doc/postfix-3.0.1/readme
 +
</syntaxhighlight >
 +
 
 +
 
 +
การตั้งค่า SASL
 +
<syntaxhighlight lang="bash">
 +
sudo cp /etc/default/saslauthd /etc/default/saslauthd-postfix
 +
</syntaxhighlight >
 +
 
 +
แก้ไขไฟล์ '''/etc/default/saslauthd-postfix''' โดยกำหนดตัวแปลต่อไปนี้ START, NAME และ OPTIONS
 +
<syntaxhighlight lang="bash">
 +
START=yes
 +
DESC="SASL Auth. Daemon for Postfix"
 +
NAME="saslauthd-postf"      # max. 15 char.
 +
# Option -m sets working dir for saslauthd (contains socket)
 +
OPTIONS="-c -m /var/spool/postfix/var/run/saslauthd"        # postfix/smtp in chroot()
 +
</syntaxhighlight >
 +
 
 +
 
 +
<syntaxhighlight lang="bash">
 +
sudo rm -rf /run/saslauthd
 +
sudo ln -s /var/spool/postfix/var/run/saslauthd  /run/saslauthd
 +
sudo dpkg-statoverride --add root sasl 710 /var/spool/postfix/var/run/saslauthd
 +
sudo adduser postfix sasl
 +
cd /etc/pam.d
 +
sudo cp other smtp
 +
sudo mkdir /etc/sasl2
 +
</syntaxhighlight >
 +
 
 +
แก้ไข หรือ สร้างไฟล์ '''/etc/sasl2/smtpd.conf'''
 +
<syntaxhighlight lang="bash">
 +
pwcheck_method: saslauthd
 +
mech_list: PLAIN LOGIN
 +
</syntaxhighlight >
 +
 
 +
Restart SASLAUTHD
 +
<syntaxhighlight lang="bash">
 +
sudo service saslauthd  restart
 +
</syntaxhighlight >
 +
 
 +
 
 +
ปรับปรุงการตั้งค่าของคุณและทำการ reload
 +
<br/> หมายเหตุ: เปลียน SUB.YOURDOMAIN, YOURDOMAIN, YOUROTHERDOMAIN เป็นโดเมนของคุณ (YOUROTHERDOMAIN ไม่จำเป็นต้องใส่ก็ได้)
 +
<syntaxhighlight lang="bash">
 +
sudo postconf compatibility_level=2
 +
sudo postconf -e 'myhostname  = SUB.YOURDOMAIN'
 +
sudo postconf -e 'mydomain    = YOURDOMAIN'
 +
sudo postconf -e 'myorigin    = $mydomain'
 +
sudo postconf -e 'inet_interfaces = all'
 +
sudo postconf -e 'mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 192.168.0.0/24'
 +
sudo postconf -e 'alias_database = hash:/etc/aliases'
 +
sudo postconf -e 'alias_maps = hash:/etc/aliases'
 +
sudo postconf -e 'mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain, YOUROTHERDOMAIN'
 +
sudo postconf -e 'smtputf8_enable = yes'
 +
sudo postconf -e 'smtpd_sasl_path = smtpd'
 +
sudo postconf -e 'smtpd_sasl_auth_enable = yes'
 +
sudo postconf -e 'broken_sasl_auth_clients = yes'
 +
sudo postconf -e 'smtpd_sasl_security_options = noanonymous'
 +
sudo postconf -e 'home_mailbox = Maildir/'
 +
sudo postconf -e 'smtpd_relay_restrictions =  permit_mynetworks permit_sasl_authenticated reject_unauth_destination reject_sender_login_mismatch'
 +
sudo postfix reload
 +
</syntaxhighlight >

รุ่นแก้ไขปัจจุบันเมื่อ 14:00, 14 กุมภาพันธ์ 2560

สร้าง directories และติดตั้ง libraries ที่จำเป็น

sudo apt-get update
sudo apt-get install courier-imap courier-imap-ssl  courier-pop courier-pop-ssl  icu-devtools libicu-dev libsasl2-dev libssl-dev libsasl2-modules sasl2-bin
sudo mkdir -p /etc/skel/Maildir/{cur,new,tmp}
sudo apt-get build-dep postfix

ตอบ:

Web Admin - No
Internet Site

ดาวน์โหลดและสร้าง postfix-3.x

tar -xzvf postfix-3.0.2.tar.gz
cd postfix-3.0.2
sed -i 's/.\x08//g' README_FILES/*

make CCARGS="-DUSE_TLS -I/usr/include/openssl/  \
             -DUSE_SASL_AUTH -DUSE_CYRUS_SASL -I/usr/include/sasl" \			
             AUXLIBS="-lssl -lcrypto -lsasl2" makefiles && make


sudo sh postfix-install -non-interactive   daemon_directory=/usr/lib/postfix  \
                    manpage_directory=/usr/share/man  \
                    html_directory=/usr/share/doc/postfix-3.0.1/html  \
                    readme_directory=/usr/share/doc/postfix-3.0.1/readme


การตั้งค่า SASL

					
sudo cp /etc/default/saslauthd /etc/default/saslauthd-postfix

แก้ไขไฟล์ /etc/default/saslauthd-postfix โดยกำหนดตัวแปลต่อไปนี้ START, NAME และ OPTIONS

					
START=yes
DESC="SASL Auth. Daemon for Postfix"
NAME="saslauthd-postf"      # max. 15 char.
# Option -m sets working dir for saslauthd (contains socket)
OPTIONS="-c -m /var/spool/postfix/var/run/saslauthd"        # postfix/smtp in chroot()


							 
sudo rm -rf /run/saslauthd
sudo ln -s /var/spool/postfix/var/run/saslauthd   /run/saslauthd
sudo dpkg-statoverride --add root sasl 710 /var/spool/postfix/var/run/saslauthd
sudo adduser postfix sasl
cd /etc/pam.d
sudo cp other smtp
sudo mkdir /etc/sasl2

แก้ไข หรือ สร้างไฟล์ /etc/sasl2/smtpd.conf

pwcheck_method: saslauthd
mech_list: PLAIN LOGIN

Restart SASLAUTHD

sudo service saslauthd  restart


ปรับปรุงการตั้งค่าของคุณและทำการ reload
หมายเหตุ: เปลียน SUB.YOURDOMAIN, YOURDOMAIN, YOUROTHERDOMAIN เป็นโดเมนของคุณ (YOUROTHERDOMAIN ไม่จำเป็นต้องใส่ก็ได้)

sudo postconf compatibility_level=2
sudo postconf -e 'myhostname  = SUB.YOURDOMAIN'
sudo postconf -e 'mydomain    = YOURDOMAIN'
sudo postconf -e 'myorigin    = $mydomain'
sudo postconf -e 'inet_interfaces = all'
sudo postconf -e 'mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 192.168.0.0/24'
sudo postconf -e 'alias_database = hash:/etc/aliases'
sudo postconf -e 'alias_maps = hash:/etc/aliases'
sudo postconf -e 'mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain, YOUROTHERDOMAIN'
sudo postconf -e 'smtputf8_enable = yes'			 
sudo postconf -e 'smtpd_sasl_path = smtpd'
sudo postconf -e 'smtpd_sasl_auth_enable = yes'
sudo postconf -e 'broken_sasl_auth_clients = yes'
sudo postconf -e 'smtpd_sasl_security_options = noanonymous'
sudo postconf -e 'home_mailbox = Maildir/'
sudo postconf -e 'smtpd_relay_restrictions =  permit_mynetworks permit_sasl_authenticated reject_unauth_destination reject_sender_login_mismatch'
sudo postfix reload