<?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=6._%E0%B8%95%E0%B8%B1%E0%B9%89%E0%B8%87%E0%B8%84%E0%B9%88%E0%B8%B2_postfix_CentOS_7</id>
	<title>6. ตั้งค่า postfix CentOS 7 - ประวัติรุ่นแก้ไข</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.thnic.or.th/index.php?action=history&amp;feed=atom&amp;title=6._%E0%B8%95%E0%B8%B1%E0%B9%89%E0%B8%87%E0%B8%84%E0%B9%88%E0%B8%B2_postfix_CentOS_7"/>
	<link rel="alternate" type="text/html" href="https://wiki.thnic.or.th/index.php?title=6._%E0%B8%95%E0%B8%B1%E0%B9%89%E0%B8%87%E0%B8%84%E0%B9%88%E0%B8%B2_postfix_CentOS_7&amp;action=history"/>
	<updated>2026-10-23T07:41:45Z</updated>
	<subtitle>ประวัติรุ่นแก้ไขของหน้านี้ในวิกิ</subtitle>
	<generator>MediaWiki 1.46.2</generator>
	<entry>
		<id>https://wiki.thnic.or.th/index.php?title=6._%E0%B8%95%E0%B8%B1%E0%B9%89%E0%B8%87%E0%B8%84%E0%B9%88%E0%B8%B2_postfix_CentOS_7&amp;diff=356&amp;oldid=prev</id>
		<title>Titipong: Created page with &quot;1. แก้ไขไฟล์ /etc/postfix/main.cf โดยเปิดการใช้งานหรือเพิ่มค่า configure ตามด้านล่...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.thnic.or.th/index.php?title=6._%E0%B8%95%E0%B8%B1%E0%B9%89%E0%B8%87%E0%B8%84%E0%B9%88%E0%B8%B2_postfix_CentOS_7&amp;diff=356&amp;oldid=prev"/>
		<updated>2020-10-26T16:38:34Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;1. แก้ไขไฟล์ /etc/postfix/main.cf โดยเปิดการใช้งานหรือเพิ่มค่า configure ตามด้านล่...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;หน้าใหม่&lt;/b&gt;&lt;/p&gt;&lt;div&gt;1. แก้ไขไฟล์ /etc/postfix/main.cf โดยเปิดการใช้งานหรือเพิ่มค่า configure ตามด้านล่าง *(สังเกตุหัวข้อ virtual_alias_domains ที่เพิ่มเป็น Domain ภาษาไทย )&lt;br /&gt;
 &amp;#039;&amp;#039;&amp;#039;# vi /etc/postfix/main.cf&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
 &amp;#039;&amp;#039;&amp;#039;inet_interfaces = all&lt;br /&gt;
 inet_protocols = ipv4&lt;br /&gt;
 mydestination =  localhost, localhost.localdomain&lt;br /&gt;
 alias_database = hash:/etc/aliases&lt;br /&gt;
 sendmail_path = /usr/sbin/sendmail.postfix&lt;br /&gt;
 newaliases_path = /usr/bin/newaliases.postfix&lt;br /&gt;
 mailq_path = /usr/bin/mailq.postfix&lt;br /&gt;
 meta_directory = /etc/postfix&lt;br /&gt;
 shlib_directory = no&lt;br /&gt;
 myhostname = &amp;#039;&amp;#039;&amp;#039;[[mail.eai.in.th]]&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
 mydomain = &amp;#039;&amp;#039;&amp;#039;[[eai.in.th]]&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
 myorigin = $mydomain&lt;br /&gt;
 readme_directory = no&lt;br /&gt;
 mynetworks = 127.0.0.1&lt;br /&gt;
 message_size_limit = 30720000&lt;br /&gt;
 smtpd_sasl_auth_enable = yes&lt;br /&gt;
 smtpd_sasl_type = dovecot&lt;br /&gt;
 smtpd_sasl_path = private/auth&lt;br /&gt;
 smtpd_sasl_authenticated_header = yes&lt;br /&gt;
 broken_sasl_auth_clients = yes&lt;br /&gt;
 smtpd_use_tls = yes&lt;br /&gt;
 smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination&lt;br /&gt;
 smtpd_tls_cert_file = /etc/pki/tls/certs/&amp;#039;&amp;#039;&amp;#039;[[eai.crt]]&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
 smtpd_tls_key_file = /etc/pki/tls/certs/&amp;#039;&amp;#039;&amp;#039;[[eai.key]]&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
 smtpd_tls_security_level = may&lt;br /&gt;
 smtpd_tls_auth_only = yes&lt;br /&gt;
 smtpd_tls_loglevel = 1&lt;br /&gt;
 alias_maps = hash:/etc/aliases	&lt;br /&gt;
 virtual_mailbox_base = /home/vmail&lt;br /&gt;
 virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailboxes.cf&lt;br /&gt;
 virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysql-virtual_domains.cf&lt;br /&gt;
 virtual_uid_maps = static:5000&lt;br /&gt;
 virtual_gid_maps = static:5000&lt;br /&gt;
 virtual_alias_domains = &amp;#039;&amp;#039;&amp;#039;[[อีเอไอ.ไทย]]&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
 virtual_transport = dovecot&lt;br /&gt;
 virtual_alias_maps = proxy:mysql:/etc/postfix/mysql-virtual_forwardings.cf, mysql:/etc/postfix/mysql-virtual_email2email.cf&lt;br /&gt;
 smtputf8_enable = yes&lt;br /&gt;
 proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2. แก้ไขไฟล์ /etc/postfix/master.cf โดยเพิ่มคำสั่งลงด้านล่างสุดของไฟล์ (ระวังเรื่องช่องว่างหน้าคำสั่ง )&lt;br /&gt;
 &amp;#039;&amp;#039;&amp;#039;# vi /etc/postfix/master.cf&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
 &amp;#039;&amp;#039;&amp;#039;dovecot   unix  -       n       n       -       -       pipe&lt;br /&gt;
     flags=DRhu user=vmail:vmail argv=/usr/libexec/dovecot/deliver -f ${sender} -d ${recipient}&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. แก้ไขไฟล์ /etc/postfix/master.cf เปิดใช้งาน หรือ เพิ่ม เพียงแค่คำสั่งด้าานล่าง นอกเหนือจากนั้น ให้ปิดการใช้งาน #&lt;br /&gt;
&lt;br /&gt;
 &amp;#039;&amp;#039;&amp;#039;smtps     inet  n       -       -       -       -       smtpd&lt;br /&gt;
 		-o syslog_name=postfix/smtps&lt;br /&gt;
 		-o smtpd_tls_wrappermode=yes&lt;br /&gt;
 		-o smtpd_sasl_auth_enable=yes&lt;br /&gt;
 		-o smtpd_client_restrictions=permit_sasl_authenticated,reject&lt;br /&gt;
 		-o smtpd_relay_restrictions=permit_sasl_authenticated,reject&lt;br /&gt;
 		-o milter_macro_daemon_name=ORIGINATING&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 &amp;#039;&amp;#039;&amp;#039;4. ตั้งให้ postfix auto startup และทำการ restart postfix &lt;br /&gt;
 &amp;#039;&amp;#039;&amp;#039;# systemctl enable postfix.service&lt;br /&gt;
 # systemctl restart postfix.service&amp;#039;&amp;#039;&amp;#039;&lt;/div&gt;</summary>
		<author><name>Titipong</name></author>
	</entry>
</feed>