Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How does dovecot+mysql manage email cloud servers?

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly tells you how dovecot+mysql is how to manage the mail Cloud Virtual Machine, related technical terms you can check online or find some related books to supplement, here will not dabble, we will go straight to the topic, I hope dovecot+mysql is how to manage the mail Cloud Virtual Machine this article can bring you some practical help.

1.yum install dovecot dovecot-mysql -y

##dovecot is an open-source IMAP and POP3 mail Cloud Virtual Machine that supports Linux and sends mail

##dovecot-mysql is a plugin for dovecot, allowing dovecot to recognize MySQL

systemctl start httpd

2. vim /etc/dovecot/dovecot.conf

24 protocols = imap pop3 lmtp ##Supported receiving protocols

48 login_trusted_networks = 0.0.0.0/0 ##Trust any network

49 disable_plaintext_auth = no ##Enable plaintext authentication

3. vim /etc/dovecot/conf.d/10-auth.conf

123 ! include auth-sql.conf.ext ##Enable MySQL authentication

4. cp /usr/share/doc/dovecot-2.2.10/example-config/dovecot-sql.conf.ext /etc/dovecot/dovecot-sql.conf.ext

##Generate dovecot Read MySQL configuration

5.vim /etc/dovecot/dovecot-sql.conf.ext

32 driver = mysql ##database type

71 connect = host=localhost dbname=email user=postuser password=123 ##Query database, user and password used

78 default_pass_scheme = PLAIN ##The default authentication method is plaintext

107 password_query = \ ##Query password match

108 SELECT username, domain, password \ ##Query user, domain name, password

109 FROM emailuser WHERE username = '%u' AND domain = '%d' ##Query from emailuser table

125 user_query = SELECT maildir, 666 AS uid, 666 AS gid FROM emailuser WHERE username ='%u' ##Query the internal content of an email

6. vim /etc/dovecot/conf.d/10-mail.conf

30 mail_location = maildir:/home/vmail/%d/%n ##Specify mail location

168 first_valid_uid = 666 ##Email query user identity

175 first_valid_gid = 666

7. systemctl restart dovecot.service ##Restart dovecot service

** Testing

[root@foundation15 Desktop]# telnet 172.25.254.115 110

Trying 172.25.254.115...

Connected to 172.25.254.115.

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.

#########################

#### postfix shell mail ###

#########################

desktop.server myorigin

~server

vim /etc/postfix/main.cf

75 myhostname = server ##Set to real host name

83 mydomain = example.com

99 myorigin = $mydomain

113 inet_interfaces = all

164 mydestination = ##Shell mail does not accept mail, so do not set

316 relayhost = 172.25.254.115 ##IP of the real host to succeed

systemctl restart postfix.service

~desktop

myhostname = desktop

mydomain = westos.com

myorigin = example.com

~server

mail root@westos.com

Server is a shell of desktop,

** Testing

Shell host sends mail to local root, 174 host receives mail

dovecot+mysql is how to manage the mail Cloud Virtual Machine. Let's talk about it first. For other related issues, you can continue to pay attention to our industry information. Our section content captures some industry news and expertise to share with you every day.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report