您好,登錄后才能下訂單哦!
下面一起來了解下dovecot+mysql配置及搭建郵件云服務器方法,相信大家看完肯定會受益匪淺,文字在精不在多,希望dovecot+mysql配置及搭建郵件云服務器方法這篇短內容是你想要的。
dovecot+mysql
一 配置
1 yum install dovecot-mysql.x86_64 -y###dovecot的插件,讓此軟件可以識別mysql###
2 vim /etc/dovecot/conf.d/10-auth.conf ###編輯認證文件###
內容:
123 !include auth-sql.conf.ext###支持mysql認證###
3 cp /usr/share/doc/dovecot-2.2.10/example-config/dovecot-sql.conf.ext /etc/dovecot/dovecot-sql.conf.ext###生成dovecot讀取mysql的配置###
4 vim /etc/dovecot/dovecot-sql.conf.ext
內容:
32 driver = mysql###數據庫類型###
71 connect = host=localhost dbname=email user=postuser password=postuser###連接查詢時用到的庫,用戶,密碼###
78 default_pass_scheme = PLAIN###默認認證方式為明文###
107 password_query = \###查詢密碼匹配###
108 SELECT username, domain, password \
109 FROM emailuser WHERE username = '%u' AND domain = '%d'
125 user_query = SELECT maildir, 666 AS uid, 666 AS gid FROM emailuser WHERE username = '%u'###查詢郵件內容###
5 vim /etc/dovecot/conf.d/10-mail.conf
內容:
168 first_valid_uid = 666###郵件文件查詢用戶身份###
175 first_valid_gid = 666
30 mail_location = maildir:/home/vmail/%d/%n###指定郵件位置###
6 systemctl restart dovecot.service
測試:
[root@foundation78 Desktop]# telnet 172.25.254.112 110
Trying 172.25.254.112...
Connected to 172.25.254.112.
Escape character is '^]'.
+OK [XCLIENT] Dovecot ready.
user lee@lee.com
+OK
pass lee
+OK Logged in.
quit
+OK Logging out.
Connection closed by foreign host.
在thunderbird中可以直接測試:
二 空殼郵件
1 )null客戶端
1 vim /etc/postfix/main.cf
內容:
mydomain = example.com###域名###
myorigin = westos.com###偽裝為真實郵件云服務器的所在域###
myhostname = mail.example.com###主機名###
mydestination =###為空,不接受郵件###
relayhost = 172.25.254.112###轉發給真實的郵件云服務器###
2 systemctl restart postfix.service
3 測試:
空殼郵件云服務器:
[root@mail ~]# mail root@example.com
Subject: dskjaf
skdja
.
EOT
[root@mail ~]# mailq
Mail queue is empty
[root@mail ~]# mail
No mail for root
真實的郵件云服務器###
[root@westos-mail ~]# mail
Heirloom Mail version 12.5 7/5/10. Type ? for help.
"/var/spool/mail/root": 3 messages 3 new
>N 1 root Sat May 27 23:23 21/753 "hfue"
N 2 root Sat May 27 23:23 21/757 "hjk"
N 3 root Sat May 27 23:24 21/752 "dskjaf"
& 3
Message 3:
From root@mail.example.com Sat May 27 23:24:11 2017
Return-Path: <root@mail.example.com>
X-Original-To: root@example.com
Delivered-To: root@example.com
Date: Sat, 27 May 2017 23:24:08 -0400
To: root@example.com
Subject: dskjaf
User-Agent: Heirloom mailx 12.5 7/5/10
Content-Type: text/plain; charset=us-ascii
From: root@mail.example.com (root)
Status: R
skdja
& q
Held 3 messages in /var/spool/mail/root
看完dovecot+mysql配置及搭建郵件云服務器方法這篇文章后,很多讀者朋友肯定會想要了解更多的相關內容,如需獲取更多的行業信息,可以關注我們的行業資訊欄目。
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。