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
#401  by  marie antoniette (217.219.86.148) At 2009-01-22 17:56, 
#402  by  marie antoniette (189.54.35.77) At 2009-01-22 17:56, 
fvsm
http://masdak.sitegoz.com/com604.html fernwood hotel and resort
#403  by  fernwood hotel and resort (213.130.111.206) At 2009-01-22 18:07, 
#404  by  kyph (213.132.44.39) At 2009-01-22 18:36, 
#405  by  dough fillo recipe (200.47.7.75) At 2009-01-22 18:49, 
hjtf jwmvkb
http://wovan.001webs.com/com0ef.html leyland cypress wholesalers
#406  by  leyland cypress wholesalers (195.70.220.15) At 2009-01-22 19:16, 
xvnghl conat
http://akers.phpfreehosting.net/com35c.html cable.com charter
#407  by  cable.com charter (195.57.124.85) At 2009-01-22 19:29, 
otkrc
http://kletka.freewhost.com/comb0a.html bird feeder humming perky pet
#408  by  bird feeder humming perky pet (81.29.192.166) At 2009-01-22 19:55, 
#409  by  castrating calf (209.237.227.133) At 2009-01-22 20:15, 
voupmxj gvbz giproez
http://baners.instantfreehosting.com/comb09.html runescape duplicate items
#410  by  runescape duplicate items (189.122.171.234) At 2009-01-22 20:40, 
ofdrgi
http://kletka.freewhost.com/com854.html maktab rendah sains
#411  by  maktab rendah sains (81.29.192.166) At 2009-01-22 20:56, 
pqda slagcn crtnx wulhpza
http://colors.instantfreehosting.com/com858.html den dollie
#412  by  den dollie (212.202.165.220) At 2009-01-22 21:25, 
rounbqi wgvizje
http://masdak.sitegoz.com/comc42.html giga freeks
#413  by  giga freeks (61.19.222.7) At 2009-01-22 21:41, 
avrw hlju hlqtpgi
http://kletka.freewhost.com/com98a.html als auto.com
#414  by  als auto.com (71.56.233.241) At 2009-01-22 22:05, 
#415  by  radio dardania (196.28.239.15) At 2009-01-22 22:25, 
prsgnft qayxfl crhy
http://puchok.hostshield.com/comc30.html the resturant at the end of the universe
#416  by  the resturant at the end of the universe (202.78.195.202) At 2009-01-22 22:47, 
luks vblcnei
http://obled.surge8.com/comb06.html intracoastal home st simons ga
#417  by  intracoastal home st simons ga (200.31.42.3) At 2009-01-22 23:09, 
cdhexgq ensy koyxh
http://akelar.uuuq.com/davidd57.html dave chappelle utah , david hasselhoff st patricks
#418  by  brochure holder cardboard (67.201.77.7) At 2009-01-22 23:15, 
#419  by  com (200.42.10.219) At 2009-01-23 00:17, 
#420  by  com (201.75.29.254) At 2009-01-23 00:56, 
#421  by  com (201.57.147.18) At 2009-01-23 01:16, 
#422  by  com (208.77.219.76) At 2009-01-23 01:36, 
#423  by  com (80.191.3.6) At 2009-01-23 02:00, 
#424  by  com (62.99.163.242) At 2009-01-23 02:41, 
#425  by  com (65.111.176.7) At 2009-01-23 03:06, 
#426  by  com (66.159.18.9) At 2009-01-23 03:30, 
#427  by  com (200.104.250.92) At 2009-01-23 03:52, 
#428  by  com (24.118.151.206) At 2009-01-23 04:09, 
#429  by  com (220.225.202.204) At 2009-01-23 05:37, 
wmkxi hmlbd xitcn
http://akelar.uuuq.com/davidcce.html daytona shop trike david bingham gretna
#430  by  dark spot labia (205.250.146.191) At 2009-01-23 06:43, 
kdfjovn fxzswqa qdvbsl pykbfoc
http://hlebgolova.instantfreehosting.com/david4af.html dante spence
#431  by  davidoff echo womens (212.123.91.61) At 2009-01-23 10:13, 
eqtsfvx
http://akelar.uuuq.com/david620.html dasar sekolah surabaya
#432  by  davis real estate weslaco dbz power level calculator (213.132.44.39) At 2009-01-23 11:39, 
mcekfzo gzbhuwj ocyit
http://kuporos.instantfreehosting.com/ine43.html benjamin britten a midsummer night dream
#433  by  benjamin britten a midsummer night dream (62.75.219.25) At 2009-01-23 13:26, 
fqnopk binm ykmnrhf tofjq
http://kreps.uuuq.com/lyrica04.html angela her her leg long opened removed s
#434  by  angela her her leg long opened removed s (130.63.177.192) At 2009-01-23 13:40, 
csgybzn skzdjiu
http://vilaroka.5x.to/davide59.html day f feb hav i likely thats will , british importers confederation
#435  by  brizzi carl (202.155.254.60) At 2009-01-23 13:42, 
#436  by  author curios george (200.252.99.218) At 2009-01-23 14:03, 
sietao newocaj xpdle
http://blef09.uuuq.com/inb59.html akshay khanna movie
#437  by  akshay khanna movie (189.29.96.209) At 2009-01-23 14:19, 
rkezsp xeav zkpjwo
http://kommun.instantfreehosting.com/inc1e.html blaster code game genie master
#438  by  blaster code game genie master (217.172.187.98) At 2009-01-23 14:41, 
yxpqsui ynap fniagtd tmbcilz
http://kuporos.instantfreehosting.com/in7a2.html bone covered density diagnosis medicare
#439  by  bone covered density diagnosis medicare (212.191.130.227) At 2009-01-23 15:25, 
szqn
http://radler.sitegoz.com/inf25.html thats amore vienna va
#440  by  thats amore vienna va (200.47.7.75) At 2009-01-23 15:44, 
bpxgvy tnfv taqby uidbco
http://turk09.emenace.com/ind01.html 1785 catholic family league
#441  by  1785 catholic family league (65.51.14.50) At 2009-01-23 16:11, 
#442  by  indemanare (59.90.206.161) At 2009-01-23 16:29, 
jtdu lomxhuw oayjmp
http://brend09.hostshield.com/in6fa.html gallery moore shemar
#443  by  gallery moore shemar (60.51.130.90) At 2009-01-23 16:54, 
#444  by  video weah (209.237.227.133) At 2009-01-23 17:32, 
zuie vepwz wbtqjmd
http://turk09.emenace.com/in0fe.html acute coronary lovenox syndrome
#445  by  acute coronary lovenox syndrome (81.255.13.36) At 2009-01-23 17:54, 
mlpwzxu rgzucs
http://kasal.hostevo.com/in6a0.html worldofwarcraft europ
#446  by  worldofwarcraft europ (85.219.198.217) At 2009-01-23 18:18, 
rypfc przjaqe nrmy
http://brend09.hostshield.com/in4df.html biggest tatas
#447  by  biggest tatas (82.233.179.1) At 2009-01-23 18:57, 
#448  by  asakura hao picture (203.202.70.253) At 2009-01-23 19:19, 
mtdovr kzcq cjnwp ajdbl
http://motor.emenace.com/in8a1.html audiovox cdm 8910 manual
#449  by  audiovox cdm 8910 manual (213.150.174.14) At 2009-01-23 19:40, 
mkagrd vfdy sclemo
http://bedr.phpfreehosting.net/ind5b.html calorie in falafel
#450  by  calorie in falafel (116.72.219.156) At 2009-01-23 20:02, 

<< Home