日韩无码专区无码一级三级片|91人人爱网站中日韩无码电影|厨房大战丰满熟妇|AV高清无码在线免费观看|另类AV日韩少妇熟女|中文日本大黄一级黄色片|色情在线视频免费|亚洲成人特黄a片|黄片wwwav色图欧美|欧亚乱色一区二区三区

RELATEED CONSULTING
相關(guān)咨詢
選擇下列產(chǎn)品馬上在線溝通
服務(wù)時(shí)間:8:30-17:00
你可能遇到了下面的問題
關(guān)閉右側(cè)工具欄

新聞中心

這里有您想知道的互聯(lián)網(wǎng)營(yíng)銷解決方案
創(chuàng)新互聯(lián)linux教程:15.2.2配置Dovecot服務(wù)程序

Dovecot是一款能夠?yàn)長(zhǎng)inux系統(tǒng)提供IMAP和POP3電子郵件服務(wù)的開源服務(wù)程序,安全性極高,配置簡(jiǎn)單,執(zhí)行速度快,而且占用的服務(wù)器硬件資源也較少,因此是一款值得推薦的收件服務(wù)程序。

創(chuàng)新互聯(lián)公司從2013年創(chuàng)立,是專業(yè)互聯(lián)網(wǎng)技術(shù)服務(wù)公司,擁有項(xiàng)目網(wǎng)站設(shè)計(jì)、網(wǎng)站制作網(wǎng)站策劃,項(xiàng)目實(shí)施與項(xiàng)目整合能力。我們以讓每一個(gè)夢(mèng)想脫穎而出為使命,1280元東源做網(wǎng)站,已為上家服務(wù),為東源各地企業(yè)和個(gè)人服務(wù),聯(lián)系電話:18982081108

第1步:安裝Dovecot服務(wù)程序軟件包。大家可自行配置Yum軟件倉庫、掛載光盤鏡像到指定目錄,然后輸入要安裝的dovecot軟件包名稱即可:

    [root@linuxprobe ~]# yum install dovecot
    Loaded plugins: langpacks, product-id, subscription-manager
    This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
    rhel | 4.1 kB 00:00 
    Resolving Dependencies
    --> Running transaction check
    ---> Package dovecot.x86_64 1:2.2.10-4.el7 will be installed
    --> Processing Dependency: libclucene-core.so.1()(64bit) for package: 1:dovecot-2.2.10-4.el7.x86_64
    --> Processing Dependency: libclucene-shared.so.1()(64bit) for package: 1:dovecot-2.2.10-4.el7.x86_64
    --> Running transaction check
    ---> Package clucene-core.x86_64 0:2.3.3.4-11.el7 will be installed
    --> Finished Dependency Resolution
    Dependencies Resolved
    ================================================================================
     Package Arch Version Repository Size
    ================================================================================
    Installing:
     dovecot x86_64 1:2.2.10-4.el7 rhel 3.2 M
    Installing for dependencies:
     clucene-core x86_64 2.3.3.4-11.el7 rhel 528 k
    Transaction Summary
    ================================================================================
    Install 1 Package (+1 Dependent package)
    Total download size: 3.7 M
    Installed size: 12 M
    Is this ok [y/d/N]: y
    Downloading packages:
    --------------------------------------------------------------------------------
    Total 44 MB/s | 3.7 MB 00:00 
    Running transaction check
    Running transaction test
    Transaction test succeeded
    Running transaction
     Installing : clucene-core-2.3.3.4-11.el7.x86_64 1/2 
     Installing : 1:dovecot-2.2.10-4.el7.x86_64 2/2 
     Verifying : 1:dovecot-2.2.10-4.el7.x86_64 1/2 
     Verifying : clucene-core-2.3.3.4-11.el7.x86_64 2/2 
    Installed:
     dovecot.x86_64 1:2.2.10-4.el7 
    Dependency Installed:
     clucene-core.x86_64 0:2.3.3.4-11.el7 
    Complete!

第2步:配置部署Dovecot服務(wù)程序。在Dovecot服務(wù)程序的主配置文件中進(jìn)行如下修改。首先是第24行,把Dovecot服務(wù)程序支持的電子郵件協(xié)議修改為imap、pop3和lmtp。然后在這一行下面添加一行參數(shù),允許用戶使用明文進(jìn)行密碼驗(yàn)證。之所以這樣操作,是因?yàn)镈ovecot服務(wù)程序?yàn)榱吮WC電子郵件系統(tǒng)的安全而默認(rèn)強(qiáng)制用戶使用加密方式進(jìn)行登錄,而由于當(dāng)前還沒有加密系統(tǒng),因此需要添加該參數(shù)來允許用戶的明文登錄。

    [root@linuxprobe ~]# vim /etc/dovecot/dovecot.conf
    ………………省略部分輸出信息………………
    23 # Protocols we want to be serving.
    24 protocols = imap pop3 lmtp
    25 disable_plaintext_auth = no
    ………………省略部分輸出信息………………

在主配置文件中的第48行,設(shè)置允許登錄的網(wǎng)段地址,也就是說我們可以在這里限制只有來自于某個(gè)網(wǎng)段的用戶才能使用電子郵件系統(tǒng)。如果想允許所有人都能使用,則不用修改本參數(shù):

    44 # Space separated list of trusted network ranges. Connections from these
    45 # IPs are allowed to override their IP addresses and ports (for logging and
    46 # for authentication checks). disable_plaintext_auth is also ignored for
    47 # these networks. Typically you'd specify your IMAP proxy servers here.
    48 login_trusted_networks = 192.168.10.0/24

第3步:配置郵件格式與存儲(chǔ)路徑。在Dovecot服務(wù)程序單獨(dú)的子配置文件中,定義一個(gè)路徑,用于指定要將收到的郵件存放到服務(wù)器本地的哪個(gè)位置。這個(gè)路徑默認(rèn)已經(jīng)定義好了,我們只需要將該配置文件中第24行前面的井號(hào)(#)刪除即可。

    [root@linuxprobe ~]# vim /etc/dovecot/conf.d/10-mail.conf
    1 ##
    2 ## Mailbox locations and namespaces
    3 ##
    4 # Location for users' mailboxes. The default is empty, which means that Dovecot
    5 # tries to find the mailboxes automatically. This won't work if the user
    6 # doesn't yet have any mail, so you should explicitly tell Dovecot the full
    7 # location.
    8 #
    9 # If you're using mbox, giving a path to the INBOX file (eg. /var/mail/%u)
    10 # isn't enough. You'll also need to tell Dovecot where the other mailboxes are
    11 # kept. This is called the "root mail directory", and it must be the first
    12 # path given in the mail_location setting.
    13 #
    14 # There are a few special variables you can use, eg.:
    15 #
    16 # %u - username
    17 # %n - user part in user@domain, same as %u if there's no domain
    18 # %d - domain part in user@domain, empty if there's no domain
    19 # %h - home directory
    20 #
    21 # See doc/wiki/Variables.txt for full list. Some examples:
    22 #
    23 # mail_location = maildir:~/Maildir
    24 mail_location = mbox:~/mail:INBOX=/var/mail/%u
    25 # mail_location = mbox:/var/mail/%d/%1n/%n:INDEX=/var/indexes/%d/%1n/%n
    ………………省略部分輸出信息………………

然后切換到配置Postfix服務(wù)程序時(shí)創(chuàng)建的boss賬戶,并在家目錄中建立用于保存郵件的目錄。記得要重啟Dovecot服務(wù)并將其添加到開機(jī)啟動(dòng)項(xiàng)中。至此,對(duì)Dovecot服務(wù)程序的配置部署步驟全部結(jié)束。

    [root@linuxprobe ~]# su - boss
    Last login: Sat Aug 15 16:15:58 CST 2017 on pts/1
    [boss@mail ~]$ mkdir -p mail/.imap/INBOX
    [boss@mail ~]$ exit
    [root@linuxprobe ~]# systemctl restart dovecot 
    [root@linuxprobe ~]# systemctl enable dovecot 
    ln -s '/usr/lib/systemd/system/dovecot.service' '/etc/systemd/system/multi-user.target.wants/dovecot.service'

文章名稱:創(chuàng)新互聯(lián)linux教程:15.2.2配置Dovecot服務(wù)程序
標(biāo)題網(wǎng)址:http://m.5511xx.com/article/ccciecd.html