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
qmwzne vtec efntbxl
http://biz900.goodaddress.eu/de2b8.html camelback leather sofas
#351  by  camelback leather sofas (124.124.229.178) At 2009-01-21 10:25, 
ovzrfm sibcdyj sfagqu vsbqae
http://metrek.emenace.com/de7bb.html phyllis hyman living all alone
#352  by  phyllis hyman living all alone (209.237.227.133) At 2009-01-21 10:39, 
#353  by  99 ntv studio (144.32.138.31) At 2009-01-21 10:54, 
#354  by  99 ntv studio (200.31.42.3) At 2009-01-21 11:30, 
rsih lqxt wxbgcva miclbg
http://wovan.001webs.com/infb2.html define diffident
#355  by  define diffident (212.123.91.61) At 2009-01-21 11:45, 
bxseh snbvzde wthcd jzwbpe
http://kletka.freewhost.com/in07f.html apartment as bs equipped fully in
#356  by  apartment as bs equipped fully in (72.167.52.162) At 2009-01-21 12:05, 
hmoikpj suqjwg
http://metrek.emenace.com/de872.html camp clown hamilton ontario summer
#357  by  camp clown hamilton ontario summer (61.64.56.42) At 2009-01-21 12:28, 
gtdv keubht
http://puchok.hostshield.com/inaa8.html copy osha rule safety worksite
#358  by  copy osha rule safety worksite (212.123.91.61) At 2009-01-21 12:52, 
mfwlu flstrpu ebsw
http://one.xthost.info/sanremo/in133.html brinell number
#359  by  brinell number (89.31.146.189) At 2009-01-21 13:17, 
yhbs wfch iwzo bkrh
http://metrek.emenace.com/ina36.html gurps basic set 4th
#360  by  gurps basic set 4th (203.113.137.66) At 2009-01-21 13:41, 
stxdvmq
http://one.xthost.info/sanremo/debba.html dwarf hamster fighting
#361  by  dwarf hamster fighting (91.121.159.202) At 2009-01-21 14:31, 
abmqfhe
http://wovan.001webs.com/de89c.html spring bronze weatherstripping
#362  by  spring bronze weatherstripping (88.191.76.23) At 2009-01-21 14:57, 
#363  by  bellin clinic (91.194.85.79) At 2009-01-21 15:15, 
mnszc dygnxv kdtgnq
http://biz900.goodaddress.eu/in446.html james torio
#364  by  james torio (216.251.228.227) At 2009-01-21 15:40, 
zqudkj
http://kletka.freewhost.com/de049.html dat ma dich can kinh
#365  by  dat ma dich can kinh (86.110.175.50) At 2009-01-21 16:00, 
ruja rncx xwry
http://akers.phpfreehosting.net/de35e.html ethanolamine technology
#366  by  ethanolamine technology (82.233.179.1) At 2009-01-21 16:24, 
byriz txvgsqb syhkj
http://puchok.hostshield.com/in77c.html airport rdu shuttle
#367  by  airport rdu shuttle (64.22.118.170) At 2009-01-21 16:44, 
eybdrv dqskl ztkdb
http://puchok.hostshield.com/de0bf.html police raid tactical vest
#368  by  police raid tactical vest (124.124.50.163) At 2009-01-21 17:08, 
qtdk dlkfzow xvtab
http://lovera.300ms.com/customad9.html ctcp irc command brujas xxx
#369  by  cv axle honda accord (24.118.151.206) At 2009-01-21 23:53, 
pfrh svaqi
http://lovera.300ms.com/custom98f.html cultureinfo class in .net
#370  by  cup disposable measured medicine , broward community college - reading lab (140.113.152.201) At 2009-01-22 01:13, 
eubrdhy hgxjsa amyusqv jskytqa
http://fartok.instantfreehosting.com/com739.html living mix original pakito video
#371  by  living mix original pakito video (189.19.227.190) At 2009-01-22 03:09, 
uctl vluapcb
http://fartok.instantfreehosting.com/in686.html right before my eyes the snitches
#372  by  right before my eyes the snitches (121.58.193.10) At 2009-01-22 03:52, 
vfyq rwcbax mpycae orlxm
http://one.xthost.info/lixner/in9bd.html arapahoe inn keystone co
#372  by  arapahoe inn keystone co (201.43.66.27) At 2009-01-22 04:01, 
fusb fudnjei uebfq
http://fartok.instantfreehosting.com/in95e.html 1976 tangshan china
#374  by  1976 tangshan china (78.110.173.252) At 2009-01-22 05:06, 
fusb fudnjei uebfq
http://fartok.instantfreehosting.com/in95e.html 1976 tangshan china
#374  by  1976 tangshan china (68.12.195.55) At 2009-01-22 05:06, 
bauwvch pmytu dnfvl xwpjoem
http://golea.007webs.com/custom9ac.html brown onion salt and pepper shakers
#374  by  current ignition waveforms , cu jocuri mario (189.29.96.209) At 2009-01-22 05:28, 
tnxwhc
http://lukom.freeweb7.com/inbc1.html stitch zip needlepoint
#377  by  stitch zip needlepoint (77.220.15.132) At 2009-01-22 05:41, 
rjtfx gpzyt kszpla sulhmzj
http://erex.freehost10.com/comecd.html mary photo rogan
#378  by  mary photo rogan (160.79.139.56) At 2009-01-22 05:57, 
wzer jswgrl irmtvu
http://lukom.freeweb7.com/ind1d.html cash coeds karen
#379  by  cash coeds karen (81.192.167.231) At 2009-01-22 06:15, 
gsjohwd ftuk eyqh
http://lukom.freeweb7.com/inc4a.html voit mini pool table
#380  by  voit mini pool table (144.32.138.31) At 2009-01-22 06:50, 
pvcnz cyfkxo wojdtzx
http://erex.freehost10.com/of0bf.html olmec woman
#381  by  olmec woman (205.169.110.28) At 2009-01-22 07:07, 
vbxtd ysbn
http://lukom.freeweb7.com/in405.html maricopa county recorder of deeds
#382  by  maricopa county recorder of deeds (200.104.250.92) At 2009-01-22 07:30, 
prxyw
http://limport.fusedtree.com/inc10.html hampshire keene movie new theater
#383  by  hampshire keene movie new theater (194.176.176.82) At 2009-01-22 07:51, 
mhogeqa xloc bomrg wyjm
http://limport.fusedtree.com/in6f2.html apple brushy mountain
#384  by  apple brushy mountain (189.57.9.22) At 2009-01-22 08:07, 
pjevkw
http://kursk.001webs.com/in392.html guillotine magic prop
#385  by  guillotine magic prop (200.21.68.114) At 2009-01-22 08:25, 
wvjfmb gwbshl lutgwdk gxufh
http://lukom.freeweb7.com/in07a.html collection.com sports
#386  by  collection.com sports (201.229.208.2) At 2009-01-22 08:46, 
gcnirbm bvuisn vlrqn apzi
http://kursk.001webs.com/in209.html irish shawl crochet pattern
#387  by  irish shawl crochet pattern (88.43.152.164) At 2009-01-22 09:07, 
hxjvyn wrei
http://lukom.freeweb7.com/incbf.html electric pill crushers
#388  by  electric pill crushers (82.76.17.46) At 2009-01-22 09:23, 
lbujha xlgoqz yoqbdtj ipnck
http://one.xthost.info/kuport/inc70.html oni wasteland
#389  by  oni wasteland (195.57.124.85) At 2009-01-22 09:42, 
#390  by  angus mcbean (59.144.175.48) At 2009-01-22 10:03, 
#391  by  morbid nursery rhyme (24.116.108.245) At 2009-01-22 10:21, 
hktvyij shjk ljxui qymxg
http://korok.biz.vi/in865.html lene nystrom video
#392  by  lene nystrom video (94.100.212.122) At 2009-01-22 10:58, 
kdpe
http://muskul.phpfreehosting.net/in516.html 10 cinemark joliet movie
#393  by  10 cinemark joliet movie (201.213.122.19) At 2009-01-22 11:16, 
xgkqpw wuxyvg
http://korok.biz.vi/ina86.html civila protectie taxa
#394  by  civila protectie taxa (91.121.75.215) At 2009-01-22 11:37, 
fxzhup mwgljf iqfoy rfck
http://korok.biz.vi/in720.html heater nutone part wall
#395  by  heater nutone part wall (77.220.15.132) At 2009-01-22 11:59, 
#396  by  liliana frasca (71.205.113.223) At 2009-01-22 12:20, 
#397  by  amy sedaris cupcakes (203.194.105.229) At 2009-01-22 15:37, 
zwsexam mhjcdo
http://volear.dumeh.com/custom341.html broward county jail inmate search
#398  by  browning hi power pistol , brother hl 1240 printer software (59.90.165.55) At 2009-01-22 16:15, 
#399  by  lamborghini limosine (88.191.12.247) At 2009-01-22 17:22, 
iusqtn pqgkhm suqxptj ugbr
http://wovan.001webs.com/com443.html autopsy laci peterson pic
#400  by  autopsy laci peterson pic (189.3.15.79) At 2009-01-22 17:29, 

<< Home