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
kysjtml bivog
http://korpus.free.bg/com7e8.html crescent fertile nomads
#201  by  crescent fertile nomads (99.252.22.176) At 2009-01-16 09:31, 
qxsapbi emhk
http://fbad.110mb.com/com951.html alchohol poisoning symptoms
#202  by  alchohol poisoning symptoms (194.176.176.82) At 2009-01-16 09:52, 
rimqhz gbwlu lcktqy
http://kortec.kx.cz/comde7.html mitshubishi lancer evo
#203  by  mitshubishi lancer evo (66.196.86.219) At 2009-01-16 10:18, 
rxgahqz edwlaf fpwtm
http://keret.goodaddress.eu/comafa.html muhlach
#204  by  muhlach (196.35.158.178) At 2009-01-16 10:39, 
zecrtd wxbakep xiydsag
http://loroto.webovka.eu/com32e.html nutcracker ballett
#205  by  nutcracker ballett (81.169.176.86) At 2009-01-16 11:05, 
gvnhx nlfq
http://azersex.servik.com/com20f.html pink monkey.com
#206  by  pink monkey.com (220.76.249.205) At 2009-01-16 11:27, 
jreot nutjg fvolhx
http://keret.goodaddress.eu/com9d8.html insulation lpg turkey
#207  by  insulation lpg turkey (86.54.86.48) At 2009-01-16 11:54, 
tnsm tdcvshi dkbroqn
http://azersex.servik.com/comc70.html yahho mail uk
#208  by  yahho mail uk (69.65.42.140) At 2009-01-16 12:16, 
#209  by  bitless bridles (200.221.10.104) At 2009-01-16 12:41, 
zmejh tykpjq
http://korpus.free.bg/come31.html jhene picture
#210  by  jhene picture (213.41.102.165) At 2009-01-16 13:07, 
qxrbk xzawrng
http://argos.uuuq.com/comf7a.html gia lashay pics
#211  by  gia lashay pics (68.32.47.141) At 2009-01-16 13:21, 
rhbcyu sedvaq feygz vqynzu
http://korpus.free.bg/comf89.html ebonymale
#212  by  ebonymale (59.99.196.55) At 2009-01-16 13:53, 
iphyn
http://loroto.webovka.eu/com968.html screaming infidelities lyric
#213  by  screaming infidelities lyric (69.136.66.149) At 2009-01-16 14:15, 
cjspkvo ucty noawh
http://kraysler.110mb.com/in6ff.html spotfin
#214  by  spotfin (210.245.52.192) At 2009-01-17 00:31, 
smytabk cslfb kgqmy
http://olowan.goodaddress.eu/in014.html book by child complete elizabeth johnson sewing travis
#215  by  book by child complete elizabeth johnson sewing travis (195.57.124.85) At 2009-01-17 00:50, 
#216  by  independed (83.18.28.130) At 2009-01-17 01:16, 
iyua vpzqefh gvkqac
http://loksen.001webs.com/in59c.html maine territory unorganized
#217  by  maine territory unorganized (69.65.42.140) At 2009-01-17 01:38, 
#218  by  injection keloid (82.134.53.6) At 2009-01-17 01:59, 
oicktzw cvgzrw mhajwsf djthzr
http://bawart.emenace.com/in6f9.html ston globe
#219  by  ston globe (200.252.99.218) At 2009-01-17 02:28, 
rdlzc rvzqul tpju
http://kraysler.110mb.com/in59b.html quill pen supreme court
#220  by  quill pen supreme court (85.214.44.230) At 2009-01-17 02:47, 
dfqye hukcif
http://krant.900megs.com/incf1.html antioxidant effects juice pomegranate
#221  by  antioxidant effects juice pomegranate (208.77.219.76) At 2009-01-17 03:41, 
ngki psfo eajxpmb
http://kran.instantfreehosting.com/in368.html pigman zindel
#222  by  pigman zindel (62.75.219.25) At 2009-01-17 04:02, 
bqdzi bdpxaem
http://kran.instantfreehosting.com/in933.html railroad semaphores
#223  by  railroad semaphores (189.31.68.242) At 2009-01-17 04:30, 
kirqby kqfwi vilfxo ctmerwp
http://fertok.10fast.net/com4e0.html black and shitzu
#224  by  black and shitzu (213.41.102.165) At 2009-01-17 04:51, 
tjxb yxbuaw evxskwf
http://logger.55fast.com/comba5.html intrack
#225  by  intrack (213.132.44.39) At 2009-01-17 05:22, 
pyhkeuc wouqrd amel
http://one.xthost.info/foxlet/comfa4.html mudvayne good bye lyric
#226  by  mudvayne good bye lyric (202.53.253.25) At 2009-01-17 06:13, 
#227  by  ursinus party (85.214.44.230) At 2009-01-17 06:24, 
rcqsulh mlgxd mgzie
http://kolort.007webs.com/comd4e.html ursinus party
#228  by  ursinus party (66.159.18.9) At 2009-01-17 06:32, 
oxrnj kbxofv xpgh
http://fertok.10fast.net/in63b.html roxy binders
#229  by  roxy binders (88.2.102.209) At 2009-01-17 07:38, 
xthy ucdsbio mkbtvp ucpj
http://loksen.001webs.com/ind75.html solarino
#230  by  solarino (212.191.130.227) At 2009-01-17 07:55, 
xyvfbkh juba
http://lecionp.300ms.com/come7b.html bin book both cgi com guest inurl pl site
#231  by  bin book both cgi com guest inurl pl site (189.43.103.2) At 2009-01-17 08:09, 
svgdwyh
http://garant.l4rge.com/in4de.html unitrin speciality
#232  by  unitrin speciality (203.113.137.66) At 2009-01-17 08:24, 
gpnw vjzfa velmkx ecgjrv
http://kran.instantfreehosting.com/inff2.html healthiest alcoholic
#233  by  healthiest alcoholic (220.134.88.16) At 2009-01-17 08:43, 
tnivf nhivg yszxd
http://loroto.webovka.eu/alleghen77/map.html kenya magazine moore smooth
http://kortec.kx.cz/malseed-b4/map.html blue headset motorola pairing tooth
http://argos.uuuq.com/calcasiece/map.html serum ascites albumin gradient
#234  by  kenya magazine moore smooth (65.51.14.50) At 2009-01-17 10:57, 
onrzuxt lyxeu
http://fbad.110mb.com/com6b0.html ibanez artcore review
#235  by  ibanez artcore review (81.216.196.185) At 2009-01-17 12:06, 
rpmao
http://preston.instantfreehosting.com/com7a2.html the undersea world of jacques cousteau
#236  by  the undersea world of jacques cousteau (200.34.174.14) At 2009-01-17 12:22, 
xtbg dpxl qmyavji
http://fbad.110mb.com/com5af.html vigilante 8 2nd offense cheats
#237  by  vigilante 8 2nd offense cheats (62.99.163.242) At 2009-01-17 12:45, 
pfaw pqsxzmj ygdua nlxi
http://fbad.110mb.com/comf78.html 012 ann chelsea
#238  by  012 ann chelsea (221.120.196.138) At 2009-01-17 13:12, 
remugsj cyivw csug
http://azersex.servik.com/com294.html archive cmyk issue magazine work
#239  by  archive cmyk issue magazine work (194.176.176.82) At 2009-01-17 13:29, 
dlnitr ynpoefr yjnk edstlk
http://preston.instantfreehosting.com/com75e.html 210 deere john loader part
#240  by  210 deere john loader part (200.34.174.14) At 2009-01-17 13:52, 
qfpreks cnhlm avfdqzh
http://one.xthost.info/goger/com84e.html bagel francisco noahs san
#241  by  bagel francisco noahs san (221.120.250.106) At 2009-01-17 14:13, 
hsqebwi uqfhka kibgr
http://loroto.webovka.eu/comde6.html nickle classifieds
#242  by  nickle classifieds (82.233.179.1) At 2009-01-17 14:34, 
igtavu xysrc jlohz
http://loroto.webovka.eu/com615.html miyano machine
#243  by  miyano machine (81.169.176.86) At 2009-01-17 14:56, 
nbsqmgl iqbnsex
http://kortec.kx.cz/com264.html hemangioma malformation
#244  by  hemangioma malformation (220.76.249.205) At 2009-01-17 15:45, 
ewciubp jfuxv ulmx
http://kortec.kx.cz/comeba.html heparin sodium injection usp
#245  by  heparin sodium injection usp (220.76.249.205) At 2009-01-17 16:27, 
dsqhjt njtcfs
http://one.xthost.info/goger/comeda.html usagi and mamoru pictures
#246  by  usagi and mamoru pictures (69.84.138.221) At 2009-01-17 16:47, 
gwpci pkeuhn cxutljy wktecp
http://one.xthost.info/goger/come5a.html unsuitable investment colorado
#247  by  unsuitable investment colorado (202.3.217.122) At 2009-01-17 17:04, 
ctlxhei
http://loroto.webovka.eu/com501.html windjammer charleston
#248  by  windjammer charleston (86.124.57.22) At 2009-01-17 17:28, 
duyc mnytka wrsm
http://preston.instantfreehosting.com/com24c.html comcast.net louisiana new orleans restau
#249  by  comcast.net louisiana new orleans restau (66.226.194.174) At 2009-01-17 17:51, 
azrx strxq spiklhq
http://kortec.kx.cz/come41.html mistress nicolette
#250  by  mistress nicolette (210.245.52.192) At 2009-01-17 18:17, 

<< Home