เค้าโครงของแฟ้ม sendmail.mc นั้น เป็นดังนี้น่ะครับ
VERSIONID
OSTYPE
DOMAIN
FEATURE
local macro definitions
MAILER
LOCAL_CONFIG
LOCAL_RULE_*
LOCAL_RULESETS
ทั้งหมดนี้ จะอยู่ใน /etc/mail/freebsd.mc และโดยแนวทางของ FreeBSD แล้ว เมื่อท่านจะแก้ไข ขอให้แก้ไขที่แฟ้ม /etc/mail/`hostname`.mc แทน ดังนี้
# cp /etc/mail/freebsd.mc /etc/mail/`hostname`.mc
จากนั้นให้เรียก editor ยอดนิยมของท่านมาแก้ไขเอา
จากโครงร่าง ผมขอยกตัวอย่างที่มีมากับระบบมาให้ดูพอเป็นแนวทาง และ เพิ่มเติมบางส่วนเข้าไป เพื่อให้เพื่อนๆ พี่ๆ ได้รู้วิธีการแต่เบื้องต้นไว้ก่อน น่ะ
divert(-1)
divert(0)
VERSIONID(`$FreeBSD: src/etc/sendmail/freebsd.mc,v 1.34.2.1 2007/11/22 16:19:40 gshapiro Exp $')
OSTYPE(freebsd6)
DOMAIN(generic)
FEATURE(access_db, `hash -o -T /etc/mail/access')
FEATURE(blacklist_recipients)
FEATURE(local_lmtp)
FEATURE(mailertable, `hash -o /etc/mail/mailertable')
FEATURE(virtusertable, `hash -o /etc/mail/virtusertable')
dnl Uncomment to allow relaying based on your MX records.
dnl NOTE: This can allow sites to use your server as a backup MX without
dnl your permission.
dnl FEATURE(relay_based_on_MX)
dnl DNS based black hole lists
dnl --------------------------------
dnl DNS based black hole lists come and go on a regular basis
dnl so this file will not serve as a database of the available servers.
dnl For that, visit
dnl http://directory.google.com/Top/Computers/Internet/Abuse/Spam/Blacklists/
dnl Uncomment to activate Realtime Blackhole List
dnl information available at http://www.mail-abuse.com/
dnl NOTE: This is a subscription service as of July 31, 2001
dnl FEATURE(dnsbl)
dnl Alternatively, you can provide your own server and rejection message:
dnl FEATURE(dnsbl, `blackholes.mail-abuse.org', `"550 Mail from " $&{client_addr} " rejected, see http://mail-abuse.org/cgi-bin/lookup?" $&{client_addr}')
dnl Dialup users should uncomment and define this appropriately
dnl define(`SMART_HOST', `your.isp.mail.server')
dnl Uncomment the first line to change the location of the default
dnl /etc/mail/local-host-names and comment out the second line.
dnl define(`confCW_FILE', `-o /etc/mail/sendmail.cw')
define(`confCW_FILE', `-o /etc/mail/local-host-names')
dnl Enable for both IPv4 and IPv6 (optional)
DAEMON_OPTIONS(`Name=IPv4, Family=inet')
DAEMON_OPTIONS(`Name=IPv6, Family=inet6, Modifiers=O')
define(`confBIND_OPTS', `WorkAroundBrokenAAAA')
define(`confNO_RCPT_ACTION', `add-to-undisclosed')
define(`confPRIVACY_FLAGS', `authwarnings,noexpn,novrfy')
MAILER(local)
MAILER(smtp)
บรรทัด ที่ขึ้นต้นด้วย dnl นั้นเป็น comments เพื่ออธิบายบางประเด็น อย่างเรื่องของ SMART_HOST ที่เคยเอ่ยไว้ในตอนแรกเริ่มเรื่องนั้น ก็ยังคงเป็น comment อยู่divert(0)
VERSIONID(`$FreeBSD: src/etc/sendmail/freebsd.mc,v 1.34.2.1 2007/11/22 16:19:40 gshapiro Exp $')
OSTYPE(freebsd6)
DOMAIN(generic)
FEATURE(access_db, `hash -o -T
FEATURE(blacklist_recipients)
FEATURE(local_lmtp)
FEATURE(mailertable, `hash -o /etc/mail/mailertable')
FEATURE(virtusertable, `hash -o /etc/mail/virtusertable')
dnl Uncomment to allow relaying based on your MX records.
dnl NOTE: This can allow sites to use your server as a backup MX without
dnl your permission.
dnl FEATURE(relay_based_on_MX)
dnl DNS based black hole lists
dnl --------------------------------
dnl DNS based black hole lists come and go on a regular basis
dnl so this file will not serve as a database of the available servers.
dnl For that, visit
dnl http://directory.google.com/Top/Computers/Internet/Abuse/Spam/Blacklists/
dnl Uncomment to activate Realtime Blackhole List
dnl information available at http://www.mail-abuse.com/
dnl NOTE: This is a subscription service as of July 31, 2001
dnl FEATURE(dnsbl)
dnl Alternatively, you can provide your own server and rejection message:
dnl FEATURE(dnsbl, `blackholes.mail-abuse.org', `"550 Mail from " $&{client_addr} " rejected, see http://mail-abuse.org/cgi-bin/lookup?" $&{client_addr}')
dnl Dialup users should uncomment and define this appropriately
dnl define(`SMART_HOST', `your.isp.mail.server')
dnl Uncomment the first line to change the location of the default
dnl /etc/mail/local-host-names and comment out the second line.
dnl define(`confCW_FILE', `-o /etc/mail/sendmail.cw')
define(`confCW_FILE', `-o /etc/mail/local-host-names')
dnl Enable for both IPv4 and IPv6 (optional)
DAEMON_OPTIONS(`Name=IPv4, Family=inet')
DAEMON_OPTIONS(`Name=IPv6, Family=inet6, Modifiers=O')
define(`confBIND_OPTS', `WorkAroundBrokenAAAA')
define(`confNO_RCPT_ACTION', `add-to-undisclosed')
define(`confPRIVACY_FLAGS', `authwarnings,noexpn,novrfy')
MAILER(local)
MAILER(smtp)
สำหรับของทดลองที่ มะขาม ทำนั้นมีตามนี้ครับ ให้ สังเกตุความแตกต่างเอาเองน่ะ ไม่ยากหรอก
divert(-1)
divert(0)
VERSIONID(`$FreeBSD: src/etc/sendmail/freebsd.mc,v 1.34.2.3.2.1 2008/11/25 02:59:29 kensmith Exp $')
OSTYPE(freebsd6)
DOMAIN(generic)
FEATURE(access_db, `hash -o -T /etc/mail/access')
dnl FEATURE(blacklist_recipients)
FEATURE(local_lmtp)
FEATURE(mailertable, `hash -o /etc/mail/mailertable')
FEATURE(virtusertable, `hash -o /etc/mail/virtusertable')
dnl
dnl
FEATURE(`accept_unresolvable_domains')dnl
FEATURE(`accept_unqualified_senders')dnl
dnl
dnl Dialup users should uncomment and define this appropriately
dnl define(`SMART_HOST', `your.isp.mail.server')
dnl define(`SMART_HOST', `mail.tint.or.th')
define(`confCW_FILE', `-o /etc/mail/local-host-names')
dnl Enable for both IPv4 and IPv6 (optional)
DAEMON_OPTIONS(`Name=IPv4, Family=inet')
DAEMON_OPTIONS(`Name=IPv6, Family=inet6, Modifiers=O')
define(`confBIND_OPTS', `WorkAroundBrokenAAAA')
define(`confNO_RCPT_ACTION', `add-to-undisclosed')
define(`confPRIVACY_FLAGS', `authwarnings,noexpn,novrfy')
MAILER(local)
MAILER(smtp)
divert(0)
VERSIONID(`$FreeBSD: src/etc/sendmail/freebsd.mc,v 1.34.2.3.2.1 2008/11/25 02:59:29 kensmith Exp $')
OSTYPE(freebsd6)
DOMAIN(generic)
FEATURE(access_db, `hash -o -T
dnl FEATURE(blacklist_recipients)
FEATURE(local_lmtp)
FEATURE(mailertable, `hash -o /etc/mail/mailertable')
FEATURE(virtusertable, `hash -o /etc/mail/virtusertable')
dnl
dnl
FEATURE(`accept_unresolvable_domains')dnl
FEATURE(`accept_unqualified_senders')dnl
dnl
dnl Dialup users should uncomment and define this appropriately
dnl define(`SMART_HOST', `your.isp.mail.server')
dnl define(`SMART_HOST', `mail.tint.or.th')
define(`confCW_FILE', `-o /etc/mail/local-host-names')
dnl Enable for both IPv4 and IPv6 (optional)
DAEMON_OPTIONS(`Name=IPv4, Family=inet')
DAEMON_OPTIONS(`Name=IPv6, Family=inet6, Modifiers=O')
define(`confBIND_OPTS', `WorkAroundBrokenAAAA')
define(`confNO_RCPT_ACTION', `add-to-undisclosed')
define(`confPRIVACY_FLAGS', `authwarnings,noexpn,novrfy')
MAILER(local)
MAILER(smtp)
สิ่งที่ มะขาม ทำก็มีเพียง ๒ FEATURE ที่อยู่ระหว่าง ๒ dnl นั่นแหละครับ หากเพื่อนๆ จะทำ ก็ไปดูรายละเอียดจากแฟ้ม README ที่บอกไว้ที่หัวเรื่องตอนนี้น่ะ แล้วเพิ่ม ลด เอาตามใจชอบ จากนั้น เป็น root น่ะแล้วสั่ง
# cd /etc/mail
# make
# make install
# make start
อันหลังสุดนี้ อาจจะเป็น restart ก็ได้ คงไม่ยากเกินกว่าที่จะเข้าใจน่ะ# make
# make install
# make start
ขอยุติเรื่องของ MTA, sendmail, ไว้แต่เพียงเท่านี้ก่อน หากสงสัยประการใด โปรดอย่ารีรอ ถามมาเลย
อนึ่ง หากจะมีความดีอยู่บ้าง ขออุทิศความดีอันนั้นให้กับ ญาติ ผู้ล่วงลับไปแล้ว ทุกท่าน โดยเฉพาะ เดือนนี้ พฤษภาคม อันเป้นเดือนเกิด ขอให้แม่พ่อ จงมีแต่สุขสบายเถิด
มะไฟ ฅนยาก
มะขาม คินเดินดน
มะขาม คินเดินดน
ขอบคุณคับคุง
ReplyDeleteถึงบางแสนหรือยังละครับเนีย
หวังว่าพรบัช คงจะเป็นจริง
ขอบใจมากครับ
ReplyDeleteกลับมาถึงบ้านโดยสวัสดิภาพแล้ว