人妖在线一区,国产日韩欧美一区二区综合在线,国产啪精品视频网站免费,欧美内射深插日本少妇

新聞動(dòng)態(tài)

如何在Linux下安裝Sendmail服務(wù)器軟件的方法

發(fā)布日期:2022-04-15 14:28 | 文章來源:站長之家

1、從www.sendmail.org下載最新的版本(這個(gè)snedmail倒是有必要升級(jí)為最新的版本,因?yàn)樗纳?jí)主要是安全漏洞問題)。這里說明的是用的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…
  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í)候自動(dòng)轉(zhuǎn)發(fā)到atan@fbsd.rd.xxx.com
  26、啟動(dòng)sendmail: /usr/sbin/sendmail -bd -q30m
  排錯(cuò):如果有問題導(dǎo)致啟動(dòng)不了,大部分問題和DNS配置有關(guān),可以使用nslookup檢查DNS是否正常。挨個(gè)檢查/etc/mail中的文件內(nèi)容也是排錯(cuò)的好辦法。另外,修改配置,不建議直接編輯sendmail.cf文件,建議使用m4宏編譯工具,因?yàn)橛行в邪踩┒椿蜻^時(shí)的宏在編譯的時(shí)候會(huì)有提示,這樣以免造成相關(guān)安全問題。

  通過上面文章,我們應(yīng)該了解了在Linux下安裝Sendmail服務(wù)器的方法,希望對(duì)你們有幫助!

美國服務(wù)器租用

版權(quán)聲明:本站文章來源標(biāo)注為YINGSOO的內(nèi)容版權(quán)均為本站所有,歡迎引用、轉(zhuǎn)載,請(qǐng)保持原文完整并注明來源及原文鏈接。禁止復(fù)制或仿造本網(wǎng)站,禁止在非www.sddonglingsh.com所屬的服務(wù)器上建立鏡像,否則將依法追究法律責(zé)任。本站部分內(nèi)容來源于網(wǎng)友推薦、互聯(lián)網(wǎng)收集整理而來,僅供學(xué)習(xí)參考,不代表本站立場,如有內(nèi)容涉嫌侵權(quán),請(qǐng)聯(lián)系alex-e#qq.com處理。

實(shí)時(shí)開通

自選配置、實(shí)時(shí)開通

免備案

全球線路精選!

全天候客戶服務(wù)

7x24全年不間斷在線

專屬顧問服務(wù)

1對(duì)1客戶咨詢顧問

在線
客服

在線客服:7*24小時(shí)在線

客服
熱線

400-630-3752
7*24小時(shí)客服服務(wù)熱線

關(guān)注
微信

關(guān)注官方微信
頂部