linux 下郵件服務器,Linux 下搭建Postfix郵件服務器

Linux 下搭建Postfix郵件服務器詳解:

1、首先關閉sendmail服務

service sendmail stop

2、chkconfig sendmail off(關閉開機自啟動)

3、修改DNS正解文件,使DNS能夠解析郵箱服務

添加下面兩行

mail.zhubf.com. IN A? ? ? ? ? ? 172.17.17.2

zhubf.com.? ? ? IN MX? 10? ? ? mail.zhubf.com.

重啟DNS服務

service named? restart

chkconfig named on

echo "" > /etc/resolv.conf

測試DNS設置是否正確

host mail.zhubf.com

mail.zhubf.com has address 172.17.17.2

4安裝postfix 軟件包(前提安裝yum,配置yum源)

yum install -y postfix

修改postfix配置文件

vim /etc/postfix/main.cf

主要內容如下

121208102557171.png

121208102557172.png

5、配置saslauthd,這個軟件默認是安裝的

修改saslauthd 配置文件

vi /etc/sysconfig/saslauthd

設置MECH=shadow

service saslauthd restart

chkconfig saslauthd on

創建郵箱用戶

useradd zhubf

passwd? zhubf

echo zhubf |passwd --stdin zhubf

進行密碼驗證測試

testsaslauthd -u zhubf -p 'zhubf'

0: OK "Success."

若沒有通過,可能是防火墻或selinux的設置問題。

在postfix的主配置文件/etc/postfix/main.cf添加如下權限設置

smtpd_sasl_auth_enable = yes

smtpd_sasl_local_domain = ''

smtpd_recipient_restrictions =

permit_mynetworks,permit_sasl_authenticated,reject_unauth_destination

broken_sasl_auth_clients = yes

smtpd_client_restrictions = permit_sasl_authenticated

smtpd_sasl_security_options = noanonymous

重啟postfix 服務

service postfix restart

chkconfig postfix on

6、smtp認證的配置

perl -MMIME::Base64 -e 'print encode_base64

(zhubf)'

emh1YmY=

telnet mail.zhubf.com? 25

ehlo zhubf.com

進行加密驗證

auth login

334 VXNlcm5hbWU6

emh1YmY=

334 UGFzc3dvcmQ6

emh1YmY=

235 2.0.0 Authentication successful

8、安裝? dovecot服務

yum install? -y dovecot

修改postfix主配置文件

vim /etc/postfix/main.cf

修改dovecot的配置文件

去掉注釋

vim /etc/dovecot.conf

protocol pop3 {

listen = *:10100

#? ? ..

}

修改protocols =? pop3 pop3s

重啟dovecot服務

/etc/init.d/dovecot restart

chkconfig dovecot on

9、安裝cyrus-impad 服務

yum install -y cyrus-imapd cyrus-imapd-devel

修改postfix主配置文件

vim /etc/postfix/main.cf

去掉下面一行的注釋

mailbox_transport = lmtp:unix:/var/lib/imap/socket/lmtp

重啟服務

/etc/init.d/cyrus-imapd restart

passwd cyrus

添加郵箱用戶

# cyradm -u cyrus localhost

cm user.zhubf

cm user.zhubf.Send

cm user.zhubf.Trash

cm user.zhubf.Drafts

10、安裝? squirrelmail軟件

yum install -y squirrelmail

進行squirrelmail配置

執行該文件

/usr/share/squirrelmail/config/conf.pl

修改語言、郵箱基本設置等。

11、郵箱測試

http://mail.zhubf.com/webmail/

本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。
如若轉載,請注明出處:http://www.pswp.cn/news/541742.shtml
繁體地址,請注明出處:http://hk.pswp.cn/news/541742.shtml
英文地址,請注明出處:http://en.pswp.cn/news/541742.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

Java PipedInputStream close()方法與示例

PipedInputStream類close()方法 (PipedInputStream Class close() method) close() method is available in java.io package. close()方法在java.io包中可用。 close() method is used to close this PipedInputStream and free all system resources linked with this stream…

Coreseek Windows下安裝調試

由于項目需要全文檢索,后面就去網上查了下資料,找到了Sphinx【中文是獅身人面像】這個全文檢索引擎,聽說挺好用的,不過沒有中文分詞。后面又去找了一下,找到了Coreseek,一款中文全文檢索/搜索軟件。 一、Sp…

linux sudo命令全稱,linux sudo命令的概念與使用

1.sudo介紹本文引用地址:http://www.eepw.com.cn/article/201610/305498.htmsudo是linux下常用的允許普通用戶使用超級用戶權限的工具,允許系統管理員讓普通用戶執行一些或者全部的root命令,如halt,reboot,su等等。這樣…

java 方法 示例_Java語言環境getISOCountries()方法與示例

java 方法 示例區域設置類getISOCountries()方法 (Locale Class getISOCountries() method) getISOCountries() method is available in java.util package. getISOCountries()方法在java.util包中可用。 getISOCountries() method is used to return an array of string that …

android shape.xml 屬性詳解

轉載源:http://blog.csdn.net/harvic880925/article/details/41850723 一、簡單使用 剛開始,就先不講一堆標簽的意義及用法,先簡單看看shape標簽怎么用。 1、新建shape文件 首先在res/drawable文件夾下,新建一個文件,命名為&#…

linux檢查防火墻是否阻擋端口,淺析linux查看防火墻狀態和對外開放的端口狀態...

1.查看防火墻狀態查看防火墻狀態 systemctl status firewalld開啟防火墻 systemctl start firewalld關閉防火墻 systemctl stop firewalld開啟防火墻 service firewalld start若遇到無法開啟先用:systemctl unmask firewalld.service然后:systemctl star…

Java類class getClasses()方法及示例

類的類getClasses()方法 (Class class getClasses() method) getClasses() method is available in java.lang package. getClasses()方法在java.lang包中可用。 getClasses() method is used to return an array that contains Class objects denoting all the public classes…

linux內核計數函數,linux中的內核引用計數器

linux中的內核引用計數器文檔 /Documentation/kref.txt翻譯。krefs能讓你往你的對象中添加一個引用計數器。如果你有一些需要在多處被使用和傳遞的對象,而你并沒有給這些對象中添加引用計數器的話,你的代碼肯定會有某些缺陷,會出現一些問題。…

jQuery常用的全局方法源碼

下面常用方法的詳細使用請查看:http://www.cnblogs.com/moqiutao/p/4775725.html 1.$.noConflict()方法 語法:jQuery.noConflict(removeAll) removeAll:布爾值。指示是否允許徹底將 jQuery 變量還原。 源碼: var// Map over jQuer…

isinstance_Java類class isInstance()方法及示例

isinstance類class isInstance()方法 (Class class isInstance() method) isInstance() method is available in java.lang package. isInstance()方法在java.lang包中可用。 isInstance() method is used to check whether the given object is an instance with the object d…

Linux比較大文件內容,Linux系統最大文件打開數優化,解決Too many open files報錯

這是一個Linux系統常見的故障,網絡上也能輕易的找到解決辦法,我也只是在工作中遇到了這個問題,所以在博客記錄下,以備不時之需。一、報錯截圖:圖為resin的報錯日志,很明顯提示了Too many open files&#x…

java日歷類add方法_Java日歷computeFields()方法及示例

java日歷類add方法日歷類的computeFields()方法 (Calendar Class computeFields() method) computeFields() method is available in java.util package. 在java.util包中提供了validateFields()方法 。 computeFields() method is used to convert current ms(milliseconds) t…

Varnish緩存代理簡介與配置

一、varnish原理:1)Varnish簡介:varnish緩存是web應用加速器,同時也作為http反向緩存代理。你可以安裝varnish在任何http的前端,同時配置它緩存內容。與傳統的 squid 相比,varnish 具有性能更高、速度更快、…

Linux允許61440端口,釋放對某端口的占用

釋放對某端口的占用假如我們需要確定誰占用了我們的9050端口在windows命令行窗口下執行:1.查看所有的端口占用情況C:\>netstat -ano協議 本地地址 外部地址 狀態 PIDTCP 127.0.0.1:1434 0.0.…

as_hash ruby_Hash.merge(other_hash)方法與Ruby中的示例

as_hash rubyHash.merge(other_hash)方法 (Hash.merge(other_hash) Method) In this article, we will study about Hash.merge(other_hash) Method. The working of the method can’t be assumed because it’s quite a different name. Let us read its definition and unde…

linux 安裝nfs 客戶端,在CentOS 7上安裝NFS服務器和客戶端

NFS服務器和客戶端安裝在CentOS 7上版本1.0作者:Srijan Kishore 在Twitter上關注howtoing最后編輯 16 / Dec / 2014本指南介紹如何在CentOS 7.0中配置NFS服務器網絡文件系統(NFS)是一種流行的分布式文件系統協議,可讓用戶在其服務器上安裝遠程目錄。 該系…

安裝ORACLE 時報錯 /jre/1.4.2/lib/i386/libawt.so:

最近在linux下安裝oracle 10g時,碰到如下問題: /tmp/OraInstall2011-09-11_02-16-11PM/jre/1.4.2/lib/i386/libawt.so: libXp.so.6: cannot open shared object file: No such file or directory occurred.. 網上找了下,真讓人費解呀&am…

Java線程start()vs run()方法及示例

Java | 線程start()vs run()方法 (Java | Thread start() vs run() Methods) When we call the start() method, it leads to the creation of a new thread. Then, it automatically calls the run() method. If we directly call the run() method, then no new thread will …

linux安裝卸載mysql,Linux6 系列 安裝、卸載mysql

Linux6 系列 安裝、卸載mysqlLinux6 系列 安裝、卸載mysqlLinux環境下載mysql:https://blog.csdn.net/weixin_40816738/article/details/90111456一、安裝環境依賴:yum install -y cmake make gcc gcc-c libaio ncurses ncurses-devel二、安裝流程1、軟件…

Python | 如何使用pip升級所有Python軟件包?

While using Python as a programming language, its a very common scenario to use a virtual environment and PIP, a package manager for python. 當使用Python作為編程語言時,使用虛擬環境和PIP (Python的程序包管理器)是一種非常常見的情況。 Its a common …