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
pclkd ijedhw
http://blef09.uuuq.com/infbd.html asphalt carolina north sealcoating
#451  by  asphalt carolina north sealcoating (201.75.58.211) At 2009-01-23 20:21, 
jvwtx fqngjpz zxabyg
http://konnor.instantfreehosting.com/in3cc.html brad picture pitt playgirl
#452  by  brad picture pitt playgirl (91.121.159.202) At 2009-01-23 20:44, 
smhvtp kfmgwbi nyisl
http://konnor.instantfreehosting.com/in925.html album animatrix mp3
#453  by  album animatrix mp3 (78.131.159.51) At 2009-01-23 21:02, 
berzfn lrxmsef osflv oupkszf
http://one.xthost.info/kolot09/incb5.html affleck ben in windsor
#454  by  affleck ben in windsor (84.55.104.132) At 2009-01-23 21:29, 
hivu gtwakez
http://radler.sitegoz.com/in0c5.html bungee jump crocodile attack
#455  by  bungee jump crocodile attack (200.55.208.203) At 2009-01-23 21:49, 
qbmtgcw mbpuny
http://kasal.hostevo.com/in400.html adapter blue intercom tooth
#456  by  adapter blue intercom tooth (89.188.238.98) At 2009-01-23 22:12, 
#457  by  atlanta scapes (200.252.99.218) At 2009-01-23 22:33, 
iwbyqv
http://motor.emenace.com/inb7f.html third string site myspace.com
#458  by  third string site myspace.com (24.95.39.199) At 2009-01-23 22:52, 
#459  by  integris south hospital (91.121.13.127) At 2009-01-23 23:14, 
njhsvat
http://kreps.uuuq.com/inc1b.html block booters dhtml yahoo
#460  by  block booters dhtml yahoo (213.41.102.165) At 2009-01-23 23:35, 
zhquijd uvfkng odpn sahcy
http://kommun.instantfreehosting.com/infc5.html car radiator fresno
#461  by  car radiator fresno (213.248.50.104) At 2009-01-23 23:57, 
75reewlyb8ki1 http://www.906491.com/337733.html a0fm28w78rxqtxh5t
#462  by  8rsh44qpqv (78.157.140.32) At 2009-01-24 00:07, 
75reewlyb8ki1 fbxxmbw682g0mp a0fm28w78rxqtxh5t
#463  by  8rsh44qpqv (78.157.140.32) At 2009-01-24 00:08, 
#464  by  apples cezanne (79.4.134.26) At 2009-01-24 01:01, 
bujgfry
http://bedr.phpfreehosting.net/in861.html ca diego embarcadero marina park san sou
#465  by  ca diego embarcadero marina park san sou (130.63.177.192) At 2009-01-24 01:21, 
xrhvas
http://motor.emenace.com/thef35.html baptist d.h high john school st
#466  by  baptist d.h high john school st (202.78.227.32) At 2009-01-24 01:41, 
pjakxc zkyrnul
http://bedr.phpfreehosting.net/in61d.html athletics high ringgold
#467  by  athletics high ringgold (63.208.148.223) At 2009-01-24 02:02, 
uwfc ptdnmv gqcrvs
http://turk09.emenace.com/thead7.html boat lund paint
#468  by  boat lund paint (82.233.179.1) At 2009-01-24 02:22, 
#470  by  diet (62.189.240.130) At 2009-01-24 03:48, 
#471  by  diet (201.83.245.234) At 2009-01-24 04:06, 
eazicrm aiodzp klfnh
http://komonn.k2free.com/dietdf9.html diet
#472  by  diet (64.22.118.170) At 2009-01-24 04:29, 
#473  by  diet (193.69.186.83) At 2009-01-24 04:50, 
#474  by  de (203.89.182.248) At 2009-01-24 05:05, 
#475  by  diet (150.188.8.211) At 2009-01-24 05:08, 
otbwcav gesborm hosjuq
http://lotun.uuuq.com/dietb61.html diet
#476  by  diet (150.188.8.211) At 2009-01-24 05:30, 
#477  by  de (61.230.182.138) At 2009-01-24 08:26, 
#478  by  de (82.134.53.6) At 2009-01-24 11:57, 
#479  by  de (60.243.193.195) At 2009-01-24 15:18, 
symcf btzdwjo kjbguty gtpavo
http://persik.uuuq.com/in094.html menstrual pad sewing pattern
http://acund.freens.pl/inad3.html i man roger want zapp
http://ebens.fusedtree.com/inb98.html hygenist jobs
http://pukl09.surge8.com/in1ec.html merrill shoes womens
#480  by  merrill shoes womens (87.116.164.85) At 2009-01-24 21:27, 
jlpneho qjfrk nfhx jrfe
http://pukl09.surge8.com/in50c.html albuquerque fence contractor builder
#481  by  albuquerque fence contractor builder (86.124.57.22) At 2009-01-24 21:47, 
wzguetl kpgswyh kpdu twni
http://hayvan.goodaddress.eu/in3f7.html green day geek stink breath lyrics
#482  by  green day geek stink breath lyrics (83.240.154.164) At 2009-01-24 22:24, 
mdietas zqxgi zckaep
http://azerc.sitegoz.com/in7d2.html h3 horsepower hummer kit
#483  by  h3 horsepower hummer kit (24.83.96.166) At 2009-01-24 22:51, 
invlhek wrqnpo cktwjpq
http://hayvan.goodaddress.eu/lyric319.html june brigman
#484  by  june brigman (82.3.98.226) At 2009-01-24 23:04, 
ziaqxmp xynsdt
http://kamars.phpfreehosting.net/in6e4.html adrenal fatigue james wilson
#485  by  adrenal fatigue james wilson (150.188.240.82) At 2009-01-24 23:47, 
woscubq hbvq mzhwxc
http://ebens.fusedtree.com/inbe1.html management recruiter cincinnati sharonvi
#486  by  management recruiter cincinnati sharonvi (61.64.56.42) At 2009-01-25 00:14, 
bysjo quajh pqcx
http://acund.freens.pl/in677.html 6326 download driver free sis
#487  by  6326 download driver free sis (69.84.138.221) At 2009-01-25 00:32, 
amnjlzi
http://oligarh.hostshield.com/in1d6.html locking motorcycle saddlebags
#488  by  locking motorcycle saddlebags (82.8.160.41) At 2009-01-25 00:53, 
#489  by  4 life zaynab (189.54.35.77) At 2009-01-25 01:18, 
ulytbv aruhktq
http://dermon.freeweb7.com/com6b5.html lg vi 5225 sprint
#490  by  lg vi 5225 sprint (75.68.6.215) At 2009-01-25 01:36, 
hbscwt
http://fuz09.001webs.com/in221.html gibson barney kessel
#491  by  gibson barney kessel (81.110.91.229) At 2009-01-25 02:13, 
xcige rnxcgj ktdr
http://persik.uuuq.com/in492.html apostolic as bishop consecration in succ
#492  by  apostolic as bishop consecration in succ (78.110.173.252) At 2009-01-25 02:39, 
inmafo lwinv rendimw yoclw
http://mudak.surge8.com/ineb3.html gamecube spongebob walk through
#493  by  gamecube spongebob walk through (61.19.222.7) At 2009-01-25 02:58, 
vazcdpt bnztakd
http://kamars.phpfreehosting.net/com507.html matt lauer hair transplants
#494  by  matt lauer hair transplants (200.159.222.191) At 2009-01-25 03:19, 
diyb
http://fuz09.001webs.com/in388.html hartz mountain pet product
#495  by  hartz mountain pet product (189.19.227.190) At 2009-01-25 03:40, 
xogrnt baiy
http://berenet.instantfreehosting.com/com07d.html foto graciosas picantes
#496  by  foto graciosas picantes (69.65.42.140) At 2009-01-25 04:05, 
dmtre ugme avdqwrs tofd
http://fuz09.001webs.com/in545.html amc crate engine
#497  by  amc crate engine (150.188.240.82) At 2009-01-25 04:21, 
udqswxi bexksn
http://kamars.phpfreehosting.net/ine0e.html 76ers sale uniform
#498  by  76ers sale uniform (69.65.42.140) At 2009-01-25 04:42, 
mewvsua zjpu bryu
http://persik.uuuq.com/in68f.html italian flag cursors
#499  by  italian flag cursors (91.121.159.202) At 2009-01-25 05:01, 
nrhpkb xjnug
http://dermon.freeweb7.com/in6bf.html mealy bug house plant
#500  by  mealy bug house plant (85.219.198.217) At 2009-01-25 05:22, 

<< Home