怎么在Linux下安裝Sendmail服務(wù)器軟件

本篇內(nèi)容介紹了“怎么在Linux下安裝Sendmail服務(wù)器軟件”的有關(guān)知識,在實(shí)際案例的操作過程中,不少人都會遇到這樣的困境,接下來就讓小編帶領(lǐng)大家學(xué)習(xí)一下如何處理這些情況吧!希望大家仔細(xì)閱讀,能夠?qū)W有所成!

十載的丘北網(wǎng)站建設(shè)經(jīng)驗(yàn),針對設(shè)計(jì)、前端、開發(fā)、售后、文案、推廣等六對一服務(wù),響應(yīng)快,48小時(shí)及時(shí)工作處理。網(wǎng)絡(luò)營銷推廣的優(yōu)勢是能夠根據(jù)用戶設(shè)備顯示端的尺寸不同,自動調(diào)整丘北建站的顯示方式,使網(wǎng)站能夠適用不同顯示終端,在瀏覽器中調(diào)整網(wǎng)站的寬度,無論在任何一種瀏覽器上瀏覽網(wǎng)站,都能展現(xiàn)優(yōu)雅布局與設(shè)計(jì),從而大程度地提升瀏覽體驗(yàn)。創(chuàng)新互聯(lián)從事“丘北網(wǎng)站設(shè)計(jì)”,“丘北網(wǎng)站推廣”以來,每個(gè)客戶項(xiàng)目都認(rèn)真落實(shí)執(zhí)行。

1、從www.sendmail.org下載最新的版本(這個(gè)snedmail倒是有必要升級為最新的版本,因?yàn)樗纳壷饕前踩┒磫栴})。這里說明的是用的sendmail-8.12.2.tar.gz
2、cd /usr/local/src/
3、把文件下載到:/usr/local/src中
4、tar zxvf sendmail-8.12.2.tar.gz
5、cd /usr/local/src/sendmail-8.12.2
6、chmod go-w / /etc /etc/mail /usr /var /var/spool /var/spool/mqueue
7、chown root / /etc /etc/mail /usr /var /var/spool /var/spool/mqueue
8、cd /usr/local/src/sendmail-8.12.2/sendmail
9、sh Build
10、cd /usr/local/src/sendmail-8.12.2/cf/cf
11、建立文件sendmail.mc內(nèi)容如下,你可根據(jù)需要修改相應(yīng)部分。
divert(-1)
dnl This is the macro config file used to generate the /etc/sendmail.cf
dnl file. If you modify thei file you will have to regenerate the
dnl /etc/sendmail.cf by running this macro config through the m4
dnl preprocessor:
dnl m4 /etc/sendmail.mc > /etc/sendmail.cf
dnl You will need to have the Sendmail-cf pacage installed for this to work.
include(`/usr/local/src/sendmail-8.12.2/cf')
define(`confDEF_USER_ID',`8:12')
OSTYPE(`linux')
undefine(`UUCP_RELAY')
undefine(`BITNET_RELAY')
define(`confTO_CONNECT', `1m')
define(`confTRY_NULL_MX_LIST',true)
define(`confDONT_PROBE_INTERFACES',true)
define(`PROCMAIL_MAILER_PATH',`/usr/bin/procmail')
define(`SMART_HOST',compaq.rd.xxx.com)
<---這條用于(非HUB)缺省使用HUB發(fā)送郵件
MASQUERADE_AS(`rd.xxx.com')
<-------------------------
FEATURE(`masquerade_entire_domain')
<---這三條用于郵件地址偽裝
FEATURE(`masquerade_envelope')
<-------------------------
FEATURE(`smrsh',`/usr/sbin/smrsh')
FEATURE(`mailertable',`hash -o /etc/mail/mailertable')
FEATURE(`virtusertable',`hash -o /etc/mail/virtusertable')
FEATURE(redirect)
FEATURE(always_add_domain)
FEATURE(use_cw_file)
FEATURE(local_procmail)
FEATURE(`access_db')
FEATURE(`blacklist_recipients')
FEATURE(`accept_unresolvable_domains')
MAILER(smtp)
MAILER(procmail)
dnl We strongly recommend to comment this one out if you want to protect
dnl yourself from spam. However, the laptop and users on computers that do
dnl not hav 24x7 DNS do need this.
dnl FEATURE(`relay_based_on_MX')
12、sh Build install-cf
13、groupadd smmsp
14、useradd smmsp
15、cd cd /usr/local/src/sendmail-8.12.2/sendmail
16、sh Build install
17、cd /usr/local/src/sendmail-8.12.2/makemap
18、sh Build clean
19、sh Build all
20、sh Build install
21、cd /usr/local/src/sendmail-8.12.2/
22、在本域DNS主數(shù)據(jù)庫文件中增加MX紀(jì)錄:
rd.xxx.com. IN MX 0 compaq
注意修改相應(yīng)部分。那個(gè)0是有幾個(gè)郵件集中器的時(shí)候用于標(biāo)記先后順序的。當(dāng)有好幾個(gè)MX的時(shí)候,建議順序?qū)憺?0、20、30&hellip;
23、在/etc/mail目錄下創(chuàng)建access文件,內(nèi)容類似如下:
127.0.0.1 RELAY
21.9.22 RELAY
211.99.221.238 RELAY
然后:makemap hash access.db < access
24、創(chuàng)建文件/etc/mail/local-host-names,其內(nèi)容為本機(jī)的擁有的域名信息。
rd.xxx.com
compaq.rd.xxx.com
25、創(chuàng)建文件/etc/mail/aliases,內(nèi)容類似:
MAILER-DAEMON: postmaster
postmaster: root
bin: root
daemon: root
nobody: root
運(yùn)行newaliases創(chuàng)建數(shù)據(jù)庫。
創(chuàng)建別名文件的意義之一在于當(dāng)郵件發(fā)往域中其他郵件服務(wù)器的用戶而不是mail HUB用戶的時(shí)候用。
比如增加一條:
atan: atan@fbsd
則導(dǎo)致郵件發(fā)往mail HUB的時(shí)候自動轉(zhuǎn)發(fā)到atan@fbsd.rd.xxx.com
26、啟動sendmail: /usr/sbin/sendmail -bd -q30m
排錯(cuò):如果有問題導(dǎo)致啟動不了,大部分問題和DNS配置有關(guān),可以使用nslookup檢查DNS是否正常。挨個(gè)檢查/etc/mail中的文件內(nèi)容也是排錯(cuò)的好辦法。另外,修改配置,不建議直接編輯sendmail.cf文件,建議使用m4宏編譯工具,因?yàn)橛行в邪踩┒椿蜻^時(shí)的宏在編譯的時(shí)候會有提示,這樣以免造成相關(guān)安全問題。

“怎么在Linux下安裝Sendmail服務(wù)器軟件”的內(nèi)容就介紹到這里了,感謝大家的閱讀。如果想了解更多行業(yè)相關(guān)的知識可以關(guān)注創(chuàng)新互聯(lián)網(wǎng)站,小編將為大家輸出更多高質(zhì)量的實(shí)用文章!

分享題目:怎么在Linux下安裝Sendmail服務(wù)器軟件
分享地址:http://bm7419.com/article12/igcedc.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供自適應(yīng)網(wǎng)站、小程序開發(fā)品牌網(wǎng)站建設(shè)、微信小程序企業(yè)網(wǎng)站制作、外貿(mào)網(wǎng)站建設(shè)

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來源: 創(chuàng)新互聯(lián)

成都網(wǎng)頁設(shè)計(jì)公司