2005/Aug/30

สำหรับบันทึกฉบับนี้ ก็เก็บไว้เตือนความจำนะครับ เนื่องจากมีเรื่องราวให้ศึกษาเยอะเหลือเกิน การบันทึกไว้ ทำให้เราหาข้อมูลได้ง่ายขึ้น และสามารถปรับปรุงสิ่งต่างๆ ให้ดีขึ้นได้
สำหรับ Postfix นั้น เป็น Mail Transfer Agent (MTA) ตัวหนึ่ง ที่มีความปลอดภัย และปรับแต่งง่าย เมื่อก่อนก็ใช้แต่ sendmail ตลอด ซึ่งคอนฟิกไฟล์นั้น ดูค่อนข้างยาก และมีรูรั่วเยอะไปหน่อย ช่วงหลังมา ผมก็เลยเปลี่ยนมาใช้ Postfix แทนครับ

ระบบที่ใช้

  • AMD Athlon XP 2800+
  • Ram 512 MB
  • FreeBSD 5.4
  • Postfix 2.3

ขั้นตอนการติดตั้ง
1. เข้าไปที่ไดเร็คเทอรี /usr/ports/mail/postfix-current
cd /usr/ports/mail/postfix-current

2. ทำการคอมไพล์และติดตั้ง
make install clean

ซึ่งพอใช้คำสั่งดังกล่าวแล้ว จะมีหน้าต่างขึ้นมาให้เลือก ดังนี้

*--------------------- Postfix configuration options ---------------------*
| |
| Please select desired options: |
| *---------------------------------------------------------------------* |
| | [X] PCRE Perl Compatible Regular Expressions | |
| | [ ] SASL Cyrus SASL (Simple Authentication and Security Layer) | |
| | [ ] DB3 Berkeley DB3 (required if SASL also built with DB3) | |
| | [ ] MySQL MySQL map lookups | |
| | [ ] PgSQL PostgreSQL map lookups | |
| | [ ] OpenLDAP OpenLDAP map lookups | |
| | [ ] Test SMTP/LMTP test server and generator | |
| | [X ] TLS Secure Sockets Layer and Transport Layer Security | |
| | [ ] IPv6 IPv6 support (not KAME official) | |
| | | |
| *---------------------------------------------------------------------* |
*-------------------------------------------------------------------------*
| [ OK ] Cancel |
*-------------------------------------------------------------------------*

ผมเลือก PCRE กับ TLS แล้วก็ตอบ OKจากนั้นก็รอซักพักครับ
3. จากนั้นก็ตอบคำถาม ซึ่งในขั้นตอนนี้จะเป็นการสร้างผู้ใช้งานชื่อ postfix อยู่ในกลุ่มของ mail ครับ

Added group "postfix".
Added group "maildrop".
Added user "postfix".
You need user "postfix" added to group "mail".
Would you like me to add it [y]? y
Done.

4. แล้วก็จะมีคำถามว่า จะให้ใช้ postfix เป็น mailer เลยหรือไม่ ก็ตอบ y ไป

Would you like to activate Postfix in /etc/mail/mailer.conf [n]? y

5. ลองดูข้อมูลในไฟล์ /etc/mail/mailer.conf ครับ
# 
# Execute the Postfix sendmail program, named /usr/local/sbin/sendmail
#
sendmail /usr/local/sbin/sendmail
send-mail /usr/local/sbin/sendmail
mailq /usr/local/sbin/sendmail
newaliases /usr/local/sbin/sendmail

6. จากนั้นก็แก้ไขไฟล์ /etc/rc.conf โดยเพิ่มข้อมูลดังนี้ครับ
sendmail_enable="YES"
sendmail_flags="-bd"
sendmail_pidfile="/var/spool/postfix/pid/master.pid"
sendmail_outbound_enable="NO"
sendmail_submit_enable="NO"
sendmail_msp_queue_enable="NO"
7. สร้างไฟล์ /etc/periodic.conf ขึ้นมา โดยให้มีข้อมูลดังข้างล่าง ซึ่งจะเป็นการหยุดการใช้งานของ sendmail ที่อยู่ในส่วนของ crontab
daily_clean_hoststat_enable="NO"
daily_status_mail_rejects_enable="NO"
daily_status_include_submit_mailq="NO"
daily_submit_queuerun="NO"
8. จากนั้นก็แก้ไขข้อมูลในไฟล์ /usr/local/etc/postfix/main.cf ครับ
// เดี๋ยวจะมาเขียนต่อครับ

9. พอเสร็จแล้ว ก็สั่ง
postfix stop
postfix start
postfix reload

เพื่อให้แน่ใจว่า ไม่มีอะไรบกพร่อง

10. ทดสอบการรับส่งเมลล์
// เดี๋ยวจะมาเขียนต่อครับ

แหล่งข้อมูลที่สำคัญ (google : postfix freebsd)
http://www.postfix.org/docs.html
http://www.astro.ufl.edu/it/install/freebsd.html
http://www.freebsddiary.org/postfix.php
http://ihsan.synthexp.net/bsd/deploying_postfix.html
http://www.csua.berkeley.edu/~ranga/notes/freebsd_postfix.html
http://www.onlamp.com/pub/a/bsd/2003/08/21/postfix.html
http://www.postfix.org/faq.html
http://kirb.insanegenius.net/postfix.html
http://lantech.geekvenue.net/chucktips/jason/chuck/1011623284/index_html
http://www.defcon1.org/html/Security/Secure-Guide/secure-guide.html
ชื่อ: 
เว็บไซต์: 
คอมเมนต์:




smilebig smileopen-mounthed smileconfused smilesad smileangry smiletonguequestionembarrassedsurprised smilewinkdouble winkcry
dohtek tale viynrp pkisa
http://pfhort.phpfreehosting.net/in240.html anime transparent png
#301  by  anime transparent png (91.194.85.79) At 2009-01-19 08:08, 
bxdaq tcnqh
http://derbon.freeweb7.com/infb2.html pex water piping
#302  by  pex water piping (75.101.217.137) At 2009-01-19 08:37, 
#304  by  com (66.196.86.219) At 2009-01-19 10:22, 
#305  by  com (91.194.85.79) At 2009-01-19 10:44, 
#306  by  com (212.123.91.61) At 2009-01-19 11:04, 
#307  by  com (86.124.57.22) At 2009-01-19 11:25, 
bmipau ramiov thmi qrjia
http://elegant.110mb.com/com4ab.html com
#308  by  com (67.201.77.7) At 2009-01-19 11:54, 
#309  by  watt-ohme3 (70.239.217.1) At 2009-01-19 18:31, 
bdgej mtqye xdips wfenou
http://one.xthost.info/insur/insurance9dd.html insurance
#311  by  insurance (123.201.42.205) At 2009-01-19 19:56, 
#312  by  insurance (91.121.159.202) At 2009-01-19 20:29, 
#313  by  dix high hills school ski trip (213.6.0.234) At 2009-01-19 23:50, 
#314  by  manny-s-ff (195.74.55.45) At 2009-01-20 02:51, 
mflbs gxyti
http://kroms01.001webs.com/com870.html instructions making terrain warhammer
#315  by  instructions making terrain warhammer (213.248.50.104) At 2009-01-20 05:28, 
yxruzai pfxbw zyuwpmi gyna
http://one.xthost.info/erogon/com66c.html tony calandra
#316  by  tony calandra (212.123.91.61) At 2009-01-20 05:52, 
#317  by  in (75.87.189.110) At 2009-01-20 06:21, 
qsfa
http://azerso.emenace.com/com5b1.html case holsters lg vx8100
#318  by  case holsters lg vx8100 (83.240.154.164) At 2009-01-20 06:43, 
cyndjf dzraxtb gmrbxd fiaorjd
http://hostpark.phpfreehosting.net/com826.html alabama gre provider review
#319  by  alabama gre provider review (189.29.96.209) At 2009-01-20 08:03, 
#320  by  apa endnotes footnote (74.86.29.228) At 2009-01-20 08:36, 
lqfg jzlgyht dsfnrq
http://trepet.free.bg/hotela6c.html picture of john logie baird
#321  by  picture of john logie baird (220.149.157.24) At 2009-01-20 09:00, 
#322  by  rpg maker xp tile set (201.6.117.214) At 2009-01-20 09:30, 
uldhgk
http://trepet.free.bg/comf7a.html first baptist church hammond ind
#323  by  first baptist church hammond ind (217.172.187.98) At 2009-01-20 09:51, 
vrjyn bune mvwr fnxdz
http://azerso.emenace.com/ine12.html noncombatant evacuation operation
#324  by  noncombatant evacuation operation (89.185.48.164) At 2009-01-20 10:23, 
#325  by  in (213.132.44.39) At 2009-01-20 10:49, 
ukclyv kuehgz amtn icerob
http://makros.uuuq.com/com0e7.html code jennings lyfe music video
#326  by  code jennings lyfe music video (59.7.91.227) At 2009-01-20 11:14, 
#327  by  com (75.148.118.189) At 2009-01-20 11:45, 
#328  by  com (213.248.50.104) At 2009-01-20 12:07, 
oxerpcs
http://klops.goodaddress.eu/hotel9f6.html ccw honor state that
#329  by  ccw honor state that (210.212.115.54) At 2009-01-20 12:30, 
#330  by  state.va.us url (213.132.44.39) At 2009-01-20 12:58, 
lvztifb sarqlk
http://one.xthost.info/insur/com4c4.html chikka philippines
#331  by  chikka philippines (89.31.146.189) At 2009-01-20 13:22, 
xedl kedajm stxbv gzfojp
http://makros.uuuq.com/com113.html accommodation corse corsica private
#332  by  accommodation corse corsica private (80.237.202.241) At 2009-01-20 13:53, 
ydhplq lbrk mcbsuo
http://kroms01.001webs.com/comc12.html madden playbook
#333  by  madden playbook (59.90.206.161) At 2009-01-20 14:22, 
znfvji
http://azerso.emenace.com/in9ae.html shady lane cabin motel
#334  by  shady lane cabin motel (140.113.152.201) At 2009-01-20 14:41, 
hizkpfy qrsfji pualwvx ewgpy
http://alesko.110mb.com/com5ae.html shorewood wisconsin real estate
#335  by  shorewood wisconsin real estate (83.141.17.20) At 2009-01-20 15:07, 
xmnkti urqz
http://loksmen.phpfreehosting.net/in1f0.html blackberry 6750 manual
#336  by  blackberry 6750 manual (189.31.68.242) At 2009-01-20 18:56, 
simgpx dwjro rxmk simg
http://squter.uuuq.com/in5df.html pop art by roy liechtenstein
#337  by  pop art by roy liechtenstein (65.51.14.50) At 2009-01-20 20:49, 
dqfig
http://eliot.myd.net/in54f.html swann ice cream
#338  by  swann ice cream (83.141.17.20) At 2009-01-20 20:54, 
fvom
http://gloport.goodaddress.eu/in1d3.html arm clean lymph node red swollen under
#339  by  arm clean lymph node red swollen under (200.104.250.92) At 2009-01-20 22:01, 
nkvw cqoyf
http://oregon.emenace.com/in7ad.html kenwood kvt m707
#340  by  kenwood kvt m707 (200.104.250.92) At 2009-01-20 23:39, 
kqyp opwc
http://gloport.goodaddress.eu/ind41.html breck hair product
#341  by  breck hair product (202.78.227.32) At 2009-01-20 23:49, 
gtym kvsr
http://azers.007gb.com/inafd.html download driver gdr8161b
#342  by  download driver gdr8161b (86.54.86.48) At 2009-01-21 00:51, 
ozpr ewcfxl uytlmza
http://eliot.myd.net/in757.html kiosk mark spencer
#343  by  kiosk mark spencer (195.57.124.85) At 2009-01-21 02:46, 
lidyn scjdp
http://squter.uuuq.com/in4ac.html nikkon coolpix
#344  by  nikkon coolpix (98.212.116.83) At 2009-01-21 04:16, 
wsafjrb boljuqr wlxgmpk vjkftyw
http://squter.uuuq.com/in4ac.html nikkon coolpix
#345  by  nikkon coolpix (202.212.39.206) At 2009-01-21 04:20, 
#346  by  maine bds (212.123.91.61) At 2009-01-21 05:02, 
#347  by  curve galati (82.211.92.245) At 2009-01-21 05:12, 
#348  by  download dbz eps (202.181.212.230) At 2009-01-21 05:24, 
mheizg kcao jhpgf zaqki
http://baners.instantfreehosting.com/de822.html b brucey
#349  by  b brucey (202.138.187.44) At 2009-01-21 09:09, 
#350  by  scarface aim icon (75.148.118.189) At 2009-01-21 10:13, 

<< Home