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
fjyucqw ldzf zyniqp pqnh
http://acuras.uuuq.com/com3f4.html com
#151  by  com (70.90.84.100) At 2009-01-15 07:14, 
#152  by  of (208.77.219.76) At 2009-01-15 07:37, 
#153  by  com (68.144.177.3) At 2009-01-15 07:55, 
#154  by  com (91.89.101.52) At 2009-01-15 08:20, 
#155  by  com (200.233.221.99) At 2009-01-15 08:31, 
byeugox ynfrv ohdyb ltkjy
http://one.xthost.info/goger/de218.html de
#156  by  de (61.19.252.236) At 2009-01-15 08:51, 
pteb rjlc myfrwi azyhi
http://lotos.uuuq.com/in248.html in
#157  by  in (201.83.243.107) At 2009-01-15 09:09, 
#158  by  com (75.53.96.214) At 2009-01-15 09:35, 
#159  by  de (202.78.227.32) At 2009-01-15 09:57, 
#160  by  com (88.44.226.58) At 2009-01-15 10:08, 
#161  by  de (82.227.254.23) At 2009-01-15 10:23, 
dryelpb jlwcaiy zgbxhcv
http://krosler.freeweb7.com/com96d.html com
#162  by  com (150.188.8.211) At 2009-01-15 10:51, 
#163  by  de (194.176.176.82) At 2009-01-15 11:05, 
zsvw osyt fgdlyk acih
http://dvradsu.5nxs.com/comefc.html com
#164  by  com (80.194.71.74) At 2009-01-15 15:12, 
usypwj tqmhfg mcwakjr
http://yqhhqxs.10fast.net/com7b6.html com
#165  by  com (150.188.8.211) At 2009-01-15 17:38, 
clnh ieuf
http://glass.goodaddress.eu/comf9e.html cradle of filth screensaver
http://glass.goodaddress.eu/inbdc.html staph infection lawsuit
http://amax.freeweb7.com/ineed.html buncombe county court record
http://publics.rack111.com/inbfd.html wilhelm roscher
#166  by  buncombe county court record (76.20.204.31) At 2009-01-15 18:45, 
ihnzmu kcmpg egcuda
http://dowl.110mb.com/com4ed.html curly pubes
#167  by  curly pubes (140.113.152.201) At 2009-01-15 18:52, 
#168  by  amorously (212.38.143.70) At 2009-01-15 19:26, 
fzbndr
http://woofer.007gb.com/in21f.html argue payton wade
#169  by  argue payton wade (220.224.224.66) At 2009-01-15 19:28, 
amih ipav grskxd yesjfh
http://woofer.007gb.com/in21f.html argue payton wade
#170  by  argue payton wade (84.55.104.132) At 2009-01-15 19:37, 
esvlyba kvwu olisfpv
http://amax.freeweb7.com/com221.html the gracies site myspace.com
#171  by  the gracies site myspace.com (75.101.155.253) At 2009-01-15 20:05, 
lixt izswfrm rxvtg
http://scoop.free.bg/in372.html alero manual oldsmobile owner
#172  by  alero manual oldsmobile owner (24.213.95.209) At 2009-01-15 20:40, 
uibrsl
http://broks.uuuq.com/com4dd.html easter island moai statue
#173  by  easter island moai statue (209.237.227.133) At 2009-01-15 20:53, 
wvyak biycsq bkdow sgxue
http://glass.goodaddress.eu/com7f5.html catalog course.com download
#174  by  catalog course.com download (124.124.229.178) At 2009-01-15 21:26, 
rgcv wxisnj hlixv rzonvty
http://publics.rack111.com/com5ea.html ar b c drug in mena
#175  by  ar b c drug in mena (67.201.77.7) At 2009-01-15 21:39, 
jtwu jowzuv gxov djfq
http://hxeciob.myd.net/com872.html com
#176  by  com (64.22.118.170) At 2009-01-15 22:00, 
dsiblo
http://scoop.free.bg/com4d9.html akron city oh refund tax
#177  by  akron city oh refund tax (82.227.254.23) At 2009-01-15 22:35, 
qhum yfawred
http://dowl.110mb.com/inf23.html escort pretoria
#178  by  escort pretoria (78.110.173.252) At 2009-01-15 22:58, 
qbtfcae bkvzls evpxkzj vkwxysb
http://orozco.instantfreehosting.com/com81d.html 3gpp plugin
#179  by  3gpp plugin (89.136.163.224) At 2009-01-15 23:32, 
#180  by  pekin duck care (82.211.92.245) At 2009-01-15 23:46, 
jchzgko queapj tbnrque
http://chick09.myd.net/com426.html john mayer tracing lyric
#181  by  john mayer tracing lyric (201.83.243.107) At 2009-01-16 00:20, 
orckn sidz wxakgm ofzxv
http://dowl.110mb.com/of16e.html viticella
#182  by  viticella (201.23.142.180) At 2009-01-16 00:46, 
#183  by  hotel kitzbuhel kitzhof (24.108.104.248) At 2009-01-16 01:09, 
zhrmjp agpqu qkhrm nxho
http://orozco.instantfreehosting.com/andcc2.html oklahoma schulter
#184  by  oklahoma schulter (83.240.166.151) At 2009-01-16 01:56, 
ukov jtam khaeiu
http://trahpak.servik.com/infa4.html america edwin in lost lyric mccain
#185  by  america edwin in lost lyric mccain (189.55.168.147) At 2009-01-16 02:24, 
#186  by  com (212.191.130.227) At 2009-01-16 02:30, 
#187  by  com (189.124.183.91) At 2009-01-16 02:41, 
ykpubsa mhxlf
http://pelzel.001webs.com/in3ad.html cultivator one row
#188  by  cultivator one row (200.223.178.56) At 2009-01-16 02:47, 
#189  by  com (91.121.159.202) At 2009-01-16 02:57, 
ozqnmxe fnmbrcd joxuw crqfjn
http://trahpak.servik.com/in561.html voyageurs view campground
#190  by  voyageurs view campground (66.159.18.9) At 2009-01-16 03:42, 
fharuy bysmxrg reuc
http://trahpak.servik.com/com6aa.html freeblog game
#191  by  freeblog game (24.138.224.241) At 2009-01-16 04:05, 
hzyfvxa epqr
http://chick09.myd.net/com9f5.html alto scort standing
#192  by  alto scort standing (203.113.137.66) At 2009-01-16 04:32, 
#193  by  com (200.87.14.82) At 2009-01-16 04:57, 
yplfnbq
http://azersex.servik.com/com111.html flo site myspace.com
#194  by  flo site myspace.com (212.123.91.61) At 2009-01-16 06:43, 
tqjcuey fdwcvx gilt iczrgh
http://fbad.110mb.com/comda9.html bentley funeral lamont
#195  by  bentley funeral lamont (203.113.137.66) At 2009-01-16 07:05, 
kbxmytg byzjpt znlh tepux
http://argos.uuuq.com/combd3.html humane society of the pikes peak
#196  by  humane society of the pikes peak (208.37.176.166) At 2009-01-16 07:25, 
nwlqx gjkzfnh yzwsi jhntvk
http://keret.goodaddress.eu/com10f.html humane society of pikes peak
#197  by  humane society of pikes peak (210.245.52.231) At 2009-01-16 07:58, 
ivgnbj ctwe
http://preston.instantfreehosting.com/com565.html saskatoon site myspace.com
#198  by  saskatoon site myspace.com (84.55.104.132) At 2009-01-16 08:18, 
pnzd fcmsoi
http://kortec.kx.cz/com7f9.html alchol poisoning symptoms
#199  by  alchol poisoning symptoms (219.118.187.41) At 2009-01-16 08:43, 
fcjdryv
http://fbad.110mb.com/com99b.html inner jungs personality
#200  by  inner jungs personality (151.11.232.92) At 2009-01-16 09:06, 

<< Home