การปรับปรุงเครื่องบริการเมลเพื่อลดปัญหาสแปม

5 ก.ค.52 มีโอกาสตรวจสอบ Mail Server จริงจังอีกครั้ง สรุปว่าได้ดำเนินการปรับปรุงเบื้องต้น ดังนี้ 1)ตรวจสอบ /etc /mail /sendmail.mc ว่ามีนโยบายอะไรที่ตกไปจนส่ง junk mail ออกจากเครื่องบริการ เมื่อตรวจสอบ /var /log /maillog แล้วได้แก้ไขกฎหลายข้อ เช่น เพิ่ม delay_checks, relay_based_on_MX, SMART_HOST, UUCP_MAILER_MAX ลบ accept_unresolvable_domains จากนั้นก็ใช้ m4 สั่งปรับปรุงแฟ้ม sendmail.cf แล้วสั่ง #service sendmail reload และดูข้อมูลความเคลื่อนไหวของ sendmail ด้วย #tail -30 maillog 2)ทบวนการใช้คำสั่งสำหรับดูแลบริการ sendmail มีคำสั่งที่เกี่ยวข้อง ซึ่งแตกต่างกันไปตามหน้าที่ ดังนี้ 1.ตรวจว่าปัจจุบัน sendmail ทำงานอะไรบ้างด้วย #service sendmail status จะพบเลข process สามารถใช้ #cat /var /log /maillog | grep [number of process] ดูว่าข้อมูลของ process นั้นว่าทำอะไรบ้าง 2.ทดสอบส่งอีเมลด้วย echo “abc”| sendmail a@b.com 3.ทดสอบว่า imap หรือ pop3 เปิดบริการอีเมลหรือไม่ ด้วย #telnet localhost 143 หรือ 110 4.ตรวจรุ่นของ sendmail ด้วย #rpm -qa|grep sendmail 3)โปรแกรมกรอง spam 2 บริการคือ การกรองอีเมลขาเข้า inbox ใช้โปรแกรม spamassassin + bayes มี config อยู่ที่ /etc /mail /spamassassin /local.cf ซึ่งมีเว็บเพจที่ช่วยสร้างข้อกำหนด ที่  http://www.yrex.com/spam/spamconfig.php โดยกำหนดเพิ่มว่า required_score 7.5, use_bayes 1, bayes_auto_learn 1 อีกโปรแกรมคือ procmailrc ใช้สำหรับกรอง keyword ก็ยังใช้อยู่ แต่ปัจจุบัน  junk mail พัฒนาคำใหม่ทุกวัน 4)สำหรับผลการปรับปรุง Mail Server ในวันพรุ่งนี้ต้องตรวจ mail log ว่า junk mail เข้ามามากเหมือนเดิมหรือไม่
แหล่งอ้างอิง
+
http://rd.cc.psu.ac.th/content/view/107/46/
+ http://www.thaicert.org/paper/unix_linux/sendmail.php
+ http://www.arnut.com/linux/sendmail.php
+ http://www.yrex.com/spam/spamconfig.php

Author: บุรินทร์ รุจจนพันธุ์

I am Lecturer, Developer, Researcher, Columnist, Writer, Photographer, and Webmaster - L@mpang man

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.