特黄特色三级在线观看免费,看黄色片子免费,色综合久,欧美在线视频看看,高潮胡言乱语对白刺激国产,伊人网成人,中文字幕亚洲一碰就硬老熟妇

學(xué)習(xí)啦 > 學(xué)習(xí)電腦 > 操作系統(tǒng) > Linux教程 > Linux怎么安裝配置Postfix

Linux怎么安裝配置Postfix

時(shí)間: 春健736 分享

Linux怎么安裝配置Postfix

  Postfix是一款用法靈活的電子郵件應(yīng)用程序,那么大家知道Linux怎么安裝配置Postfix嗎?今天學(xué)習(xí)啦小編與大家分享下Linux安裝配置Postfix的具體操作步驟,有需要的朋友不妨了解下。

  Linux安裝配置Postfix方法

  postfix的產(chǎn)生是為了替代傳統(tǒng)的sendmail.相較于sendmail,postfix在速度,性能和穩(wěn)定性上都更勝一籌?,F(xiàn)在目前非常多的主流郵件服務(wù)其實(shí)都在采用postfix. 當(dāng)我們需要一個(gè)輕量級(jí)的的郵件服務(wù)器是,postfix不失為一種選擇。

  1. postfix是免費(fèi)的:

  postfix想要作用的范圍是廣大的Internet用戶,試圖影響大多數(shù)的Internet上的電子郵件系統(tǒng),因此它是免費(fèi)的。

  2. 更快:

  postfix在性能上大約比sendmail快三倍。一部運(yùn)行postfix的臺(tái)式PC每天可以收發(fā)上百萬封郵件。

  3. 兼容性好:

  postfix是sendmail兼容的,從而使sendmail用戶可以很方便地遷移到postfix。Postfix支持/var[/spool]/mail、/etc/aliases、 NIS、和 ~/.forward 文件。

  4. 更健壯:

  postfix被設(shè)計(jì)成在重負(fù)荷之下仍然可以正常工作。當(dāng)系統(tǒng)運(yùn)行超出了可用的內(nèi)存或磁盤空間時(shí),postfix會(huì)自動(dòng)減少運(yùn)行進(jìn)程的數(shù)目。當(dāng)處理的郵件數(shù)目增長(zhǎng)時(shí),postfix運(yùn)行的進(jìn)程不會(huì)跟著增加。

  5. 更靈活:

  postfix是由超過一打的小程序組成的,每個(gè)程序完成特定的功能。你可以

  通過配置文件設(shè)置每個(gè)程序的運(yùn)行參數(shù)。

  6. 安全性

  postfix具有多層防御結(jié)構(gòu),可以有效地抵御惡意入侵者。如大多數(shù)的postfix程序可以運(yùn)行在較低的權(quán)限之下,不可以通過網(wǎng)絡(luò)訪問安全性相關(guān)的本地投遞程序等等。

  下面來介紹linux上如何搭建和配置postfix服務(wù):

  1.關(guān)掉sendmail相關(guān)的所有服務(wù),最好是直接卸載sendmail.

  # service sendmail stop

  # chkconfig sendmail off

  #rpm -qa | grep sendmail | xargs rpm -e

  2.安裝postfix.

  redhat6.0以上版本應(yīng)該是默認(rèn)集成了postfix服務(wù)的,假如沒有安裝的話,可以手動(dòng)安裝。

  rpm -qa | grep postifx (查看是否安裝)

  yum install postfix

  3.安裝完成后,修改配置文件:/etc/postfix/main.cfg

  vi /etc/postfix/main.cf

  myhostname = sample.test.com  ← 設(shè)置系統(tǒng)的主機(jī)名

  mydomain = test.com  ← 設(shè)置域名(我們將讓此處設(shè)置將成為E-mail地址“@”后面的部分)

  myorigin = $mydomain  ← 將發(fā)信地址“@”后面的部分設(shè)置為域名(非系統(tǒng)主機(jī)名)

  inet_interfaces = all  ← 接受來自所有網(wǎng)絡(luò)的請(qǐng)求

  mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain  ← 指定發(fā)給本地郵件的域名

  home_mailbox = Maildir/  ← 指定用戶郵箱目錄

  <保存退出!>

  4.為本機(jī)添加DNS server.

  為什DNS Server?因?yàn)樵卩]件發(fā)送過程中,需要把郵件地址的domain地址轉(zhuǎn)化成IP地址,再去發(fā)送給對(duì)應(yīng)的收件人,這里涉及到DNS中的A記錄和MX記錄相關(guān)的知識(shí),不熟悉的同學(xué)可以google或者百度 腦補(bǔ)一下 :-)

  如何添加DNS server呢,DNS server去哪里尋找?

  vim /etc/resolv.conf

  添加如下行:

  nameserver 8.8.8.8

  nameserver 8.8.4.4

  上面用的8.8.8.8/8.8.4.4是Google Free DNS server,當(dāng)然還有很多免費(fèi)的DNS server供大家使用,可以google一下:-)

  5.測(cè)試一下郵件是否能夠發(fā)送成功:

  命令行輸入$: > echo "Mail Content" | mail -s "Mail Subject" xxxx@xxx.com

  Note:if you see below warings after you run above command.

  send-mail: warning: inet_protocols: IPv6 support is disabled: Address family not supported by protocol

  send-mail: warning: inet_protocols: configuring for IPv4 support only

  postdrop: warning: inet_protocols: IPv6 support is disabled: Address family not supported by protocol

  postdrop: warning: inet_protocols: configuring for IPv4 support only

  that means you don't have IPv6 configured in your OS's network stack, but your mailer (presumably postfix) is configured to use IPv6. Since there is no IPv6 for your mailer to use, it's warning you that it's only going to use IPv4.

  To disable the waring messsage, go to /etc/postfix/main.cf and change from:

  inet_protocols = all

  to:

  inet_protocols = ipv4

  This will only use ipv4 and the warning message will go away.

  You will have to issue a stop and start for postfix to register the change.

  service postfix restart

  6.查看log,確認(rèn)郵件發(fā)送狀態(tài):

  Postfix郵件的log位置是:/var/log/maillog

  發(fā)送成功的話,會(huì)返回250和OK,也可以去自己的郵件客戶端查收。

  一切OK的話,那Postfix mail service應(yīng)該就搭建成功了。

  另外一些有用的postfix維護(hù)命令,一遍日常的檢測(cè)和維護(hù):

  mailq :會(huì)列出當(dāng)前在postfix發(fā)送隊(duì)列中的所有郵件

  postsuper -d ALL:刪除當(dāng)前等待發(fā)送隊(duì)列的所有郵件,包括發(fā)送失敗的退信

  當(dāng)然還有很多,就不一一列舉了,大家可以網(wǎng)上搜索擴(kuò)展,Good Luck!

  7.Update Mail From sender

  echo "do-not-reply@example.com root@example.com" >> /etc/postfix/generic

  echo "smtp_generic_maps = hash:/etc/postfix/generic" >>/etc/postfix/main.cf

  postmap /etc/postfix/generic

  service postfix restart

看過“Linux怎么安裝配置Postfix”的人還看了:

1.Linux如何安裝使用logwatch

2.linux操作系統(tǒng)安全設(shè)置

3.IT項(xiàng)目招標(biāo)書模板

4.linux操作系統(tǒng)安全加固

5.lnmp下無法使用mail發(fā)郵件怎么辦

962317