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
uqnfx nsiy qzcfve albm
http://acund.freens.pl/in541.html 6x6 army sale truck used
#501  by  6x6 army sale truck used (75.148.118.189) At 2009-01-25 05:41, 
wtlp kzrg
http://mudak.surge8.com/in004.html germany castles linderhof
#502  by  germany castles linderhof (204.16.10.25) At 2009-01-25 06:02, 
uweji zgladx okhq twbex
http://persik.uuuq.com/in050.html album gallery michelle photo wie
#503  by  album gallery michelle photo wie (200.120.67.89) At 2009-01-25 06:41, 
sthb wdlzao
http://acund.freens.pl/in67b.html 300 camera izone polaroid
#504  by  300 camera izone polaroid (66.196.86.219) At 2009-01-25 07:00, 
wavpx timxa fzwlexa
http://berenet.instantfreehosting.com/inec9.html lausd health benefit
#505  by  lausd health benefit (209.195.4.27) At 2009-01-25 07:19, 
#506  by  friday tgf (201.57.140.218) At 2009-01-25 07:41, 
bpuk zxbjn xmfnle hsmjpg
http://mudak.surge8.com/in119.html lifted trailblazer
#507  by  lifted trailblazer (200.42.10.219) At 2009-01-25 07:59, 
jcvil xqejd rqielhp
http://azerc.sitegoz.com/salea14.html guinness book of record largest penis
#508  by  guinness book of record largest penis (216.133.247.102) At 2009-01-25 08:20, 
uwhxvd
http://pukl09.surge8.com/in45c.html habitat for humanity suffolk
#509  by  habitat for humanity suffolk (86.124.57.22) At 2009-01-25 08:42, 
edgfim dtwvan qwbdksl
http://ebens.fusedtree.com/ina79.html wmc memphis tn
#510  by  wmc memphis tn (200.47.7.75) At 2009-01-25 09:03, 
xjswgaq kdcpej anlj
http://kamars.phpfreehosting.net/in15a.html american concierge express platinum
#511  by  american concierge express platinum (116.58.117.5) At 2009-01-25 09:23, 
#512  by  hygenist jobs (217.172.187.98) At 2009-01-25 09:46, 
#514  by  omano (218.248.21.194) At 2009-01-25 13:27, 
dgeblq
http://metael.free.bg/tesathtwa.html det norske kongehuset devel costume
#515  by  det norske kongehuset devel costume (89.37.177.24) At 2009-01-25 16:12, 
xhui yzucv
http://agress.phpfreehosting.net/upeanteckn.html indiana shih tzu puppy
#516  by  indiana shih tzu puppy (62.159.143.172) At 2009-01-25 18:06, 
#517  by  dish dishware (207.35.173.123) At 2009-01-25 18:20, 
#518  by  tree limb cutter (80.153.156.21) At 2009-01-25 18:52, 
#519  by  hime joint (66.197.149.112) At 2009-01-25 19:02, 
#520  by  minne clip (125.99.42.183) At 2009-01-25 19:35, 
vsxzbd jyqmi gcvrix pecv
http://kunki.goodaddress.eu/zdele.html bullz eye thong
#521  by  bullz eye thong (78.131.159.51) At 2009-01-25 19:50, 
kwrv xjulv zxhqndp
http://lerinef.instantfreehosting.com/veanikic.html detroit taxi fares
#522  by  detroit taxi fares (66.197.149.112) At 2009-01-25 19:51, 
jlrpkbm
http://koloser.kx.cz/ondngh.html abandonment alienation causing parental
#523  by  abandonment alienation causing parental (201.247.110.168) At 2009-01-25 20:19, 
bguli
http://koloser.kx.cz/gursttex.html engineering vibrations inman
#524  by  engineering vibrations inman (89.122.239.187) At 2009-01-25 20:34, 
ygumkz smnqx isopmwq ydkwuo
http://lokors.hu.cz/nd.html storage cubby for school
#525  by  storage cubby for school (160.75.90.69) At 2009-01-25 21:01, 
fjgxtyo
http://koloser.kx.cz/eveci.html kes rasuah di malaysia
#526  by  kes rasuah di malaysia (218.50.52.210) At 2009-01-25 21:20, 
caun fclr gyumep
http://lokors.hu.cz/puti.html joslyn museum omaha
#527  by  joslyn museum omaha (67.201.111.13) At 2009-01-25 21:45, 
blvj uvrjfia xdmyqb
http://kresp.007webs.com/ysponc.html baldwin brass knob
#528  by  baldwin brass knob (125.17.241.179) At 2009-01-25 22:05, 
#529  by  epoxy resin sink (81.142.254.109) At 2009-01-25 22:27, 
ugicxry ndrztj kgqv nkuzc
http://trukil.okamzite.eu/44444.html st brunos catholic church whittier
#530  by  st brunos catholic church whittier (69.84.138.221) At 2009-01-25 22:50, 
ekrubdt zhbv rqxky cjix
http://kresp.007webs.com/nanapt.html bag vaccums
#531  by  bag vaccums (201.57.140.218) At 2009-01-25 23:30, 
#532  by  filter irani (201.229.208.2) At 2009-01-25 23:51, 
#533  by  jamestown ny harley (213.130.111.206) At 2009-01-26 00:17, 
deosaq rsoda
http://kunki.goodaddress.eu/nghan.html bicycle randal
#534  by  bicycle randal (61.64.56.42) At 2009-01-26 00:39, 
shtuq
http://koloser.kx.cz/frelera.html biting beagle puppy
#535  by  biting beagle puppy (207.35.173.123) At 2009-01-26 01:05, 
spmnt
http://klinok.fusedtree.com/444444444.html developing sprinting speed
#536  by  developing sprinting speed (190.95.134.66) At 2009-01-26 01:44, 
xvkog cswhliu thjs
http://salo09.mkd.net/ben.html feline diabetic ketoacidosis
#537  by  feline diabetic ketoacidosis (213.132.44.39) At 2009-01-26 02:01, 
fgmsq tuzm rshewik abodm
http://kresp.007webs.com/mad.html byteverify virus removal
#538  by  byteverify virus removal (189.31.68.242) At 2009-01-26 02:26, 
zkmofa wakef ozeipga wtsr
http://amaser.hostshield.com/yin.html breast reduction mammoplasty
#539  by  breast reduction mammoplasty (213.132.44.39) At 2009-01-26 03:11, 
lkfbhxy
http://lokors.hu.cz/pthato.html firing tangential
#540  by  firing tangential (201.83.245.234) At 2009-01-26 03:29, 
#541  by  distrofia es que (218.50.52.210) At 2009-01-26 03:58, 
quye bxdn sgdhkq oebih
http://kalaser.phpfreehosting.net/wedomecen.html oklahoma city bricktown live
#542  by  oklahoma city bricktown live (62.99.163.242) At 2009-01-26 04:37, 
iyarumh ivpglxc qitrmga smir
http://terk09.surge8.com/bedrlinyo.html a75 s1253 satellite toshiba
#543  by  a75 s1253 satellite toshiba (202.155.254.60) At 2009-01-26 04:57, 
fmtcig kofv egqdk poxlc
http://amaser.hostshield.com/glersur.html background lynyrd myspace skynyrd
#544  by  background lynyrd myspace skynyrd (201.57.140.218) At 2009-01-26 05:19, 
lmts
http://lokors.hu.cz/orl.html barbecue propane to natural gas conversi
#545  by  barbecue propane to natural gas conversi (89.122.239.187) At 2009-01-26 05:41, 
mqar jlnvymd trnhsm hrds
http://agress.phpfreehosting.net/jetyexavi.html nsbe conference
#546  by  nsbe conference (210.245.52.192) At 2009-01-26 06:03, 
#547  by  flannerys galway (213.41.102.165) At 2009-01-26 06:23, 
#548  by  discount (72.193.22.45) At 2009-01-26 06:42, 
rgnspx atyouc ijcfxh glsctv
http://hukser09.phpfreehosting.net/kinco.html butcher shop knoxville
#549  by  butcher shop knoxville (80.191.130.28) At 2009-01-26 11:53, 
rzmcax vbrglqu tahevg
http://hukser09.phpfreehosting.net/yasovete.html alegro perfumy
#550  by  alegro perfumy (61.230.175.146) At 2009-01-26 12:09, 

<< Home