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 to use Postfix + Dovecot + MySQL to build mail server

2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

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

This article introduces the knowledge of "how to use Postfix + Dovecot + MySQL to build a mail server". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

Before we begin

Configuring the mail server is not a simple task, the process not only requires a certain technical ability, but also requires everyone to have a certain degree of patience, but also requires everyone to be very careful. In order to be able to "understand" and "finally practice" this article, you also need to understand or master the following knowledge:

Postfix: is a standard MTA "Mail Transfer Agent" server that is responsible for managing mail sent to and from the outside world through the SMTP protocol. In this example, Postfix will give the local delivery of the mail "after receiving the mail and archiving the message to the local disk" to Dovecot's LMTP service "Local Mail Transfer Protocol service" for processing. Of course, when people want to send mail to the outside world through the server, Postfix will also be responsible for verifying permissions to ensure that the server is not abused. "many mail servers do not authenticate SMTP at all, which will cause any anonymous user to send mail to the outside world through the server, thus turning the server into a garbage transfer station."

Dovecot: is a very good IMAP/POP server for receiving emails sent by the outside world to this machine. Typically, Dovecot's job includes verifying the user's identity to ensure that messages are not compromised. In this case, Dovecot will be responsible for all the "authentication" work, and we will configure Dovecot to query the local MySQL database to confirm the user's identity.

MySQL: needless to say, it will store all the user information, including the domain name information to be monitored, the user's email address, login password, email alias "alias", etc.

Ubuntu: the OS in this example selects Ubuntu14.10 as the standard, and the related operations of other Linux distributions are not described.

The process by which a server receives mail.

Before moving on to this example, let's take a look at how Postfix+Dovecot+MySQL works together to implement the various functions of the mail server. Let's assume that Zhang San sends an email to Li Si Lisi @ mydomain.com through oschina.net 's mailbox zhangsan@oschina.net, then the server receives the mail roughly as shown in the following figure:

Zhangsan@oschina.net sends mail to lisi@mydomain.com

The oschina.net server will query the MX record of mydomain.com through DNS and find the server where Postfix is located.

The mail is sent to Postfix

Postfix turned to MySQL for help to find out if mydomain.com is a domain name that needs to be processed.

MySQL returns confirmation message to Postfix

Postfix delivers the received mail to Dovecot's LMTP service for processing

Dovecot saves the message content to the disk path corresponding to the lisi@mydomain.com user

The process of checking email by a user

In the above example, we saw the process of receiving mail on the server. Next, let's see what happens when you log in to your mailbox with your username and password to check your email:

To Dovecot: dear Lord Dovecot, how do you do? Am I wide enough to establish an IMAP encrypted connection?

Dovecot to mail client: of course. This is my SSL certificate, please tell me your account number and password!

Email client to Dovecot: good! This is my user name and password, please don't tell anyone!

Dovecot to MySQL:Hi beauty! Excuse me, is this user name and password correct?

MySQL to Dovecot: OK, just a moment, please! Uh. This user name and password are correct!

Dovecot opens the mailbox stored on the local disk / var/mail/mydomain.com/llisi

Dovecot gets the latest email and other related information

Dovecot sends the mail and other related information to the client through the IMAP protocol

The process by which a user sends an email

After checking the latest email, Li Si Lisi @ mydomain.com found that Zhang San had sent him an email. Now, Li Si replied to an email to Zhang San, what will happen:

To Postfix: dear Lord Postfix, how do you do? Am I wide enough to establish a secure SMTP connection?

Postfix to email client: speak human talk! Yes is yes, why do you say "rich"? You're a bitch, you're looking for a smoke! You can set up a SMTP connection if you want, but you need to encrypt it. This is my SSL certificate. Tell me your account number and password, you bitch!

Email client to Postfix: sorry, my Lord, I was wrong! This is my account number and password, don't tell anyone!

Handsome Postfix to Dovecot:Hi, check this account and password for me!

Dovecot to MySQL:Hi beauty, is this account number and password correct?! Or is it right?! Or.

MySQL to Dovecot: all right, be good! I have checked, this account password is correct! Act cute, Mr. Dovecot!

Dovecot to Postfix: cauldron, then an account password is missing!

Postfix to email client: bitch, come here! The password you gave to your account is correct. You are allowed to send email!

The mail client sends the written mail to Postfix through the SMTP protocol.

Postfix forwards the received email to the other party

Above, you have seen the whole process of receiving and sending e-mail. Let's take a look at how to successfully configure the mail server.

DNS configuration

First, you need to have a domain name. In this example, we assume that our domain name is mydomain.com, which is used as a basis to do all the follow-up work. Please note: do not attempt subsequent operations until the DNS-related configuration is not successful. Even if you have configured Postifx, as long as the DNS configuration is not successful, the mail server will not work properly.

Second, log in to the domain name management system "strongly recommend using DNSPod for domain name management" and add several MX records pointing to your email server.

Third, about the TTL setting. In the process of testing the mail server, you can set the TTL time to be shorter, so that the DNS server can work in a very short time. After the test phase, even if the TTL time is set to a large value. What? You ask why? Go to Google and have a look for yourself. What are the security risks if the TTL setting is too short?

After setting, the MX record and TTL time of DNS are roughly as follows:

Mydomain.com MX 10 mydomain.com mydomain.com MX 10 12.34.56.78 mail.mydomain.com MX 10 12.34.56.78SSL Certificate

On the issue of SSL certification, you can make a decision according to your own situation. Some people prefer to buy third-party authoritative SSL authentication, while others use OpenSSL to make their own signatures. Of course, there is no difference between the above two methods in nature, the only difference is that if you make your own SSL certificate, most email clients will pop up prompts to ask whether they trust or not.

Modify hostname

Ha, finally got to the point. Now, please open the terminal "window system users can choose to use putty and other ssh tools to connect to the server" and connect to their own server.

Ssh username@12.34.56.78

After the connection is successful, execute the following command to switch to the root user as soon as possible:

Sudo-s

Attention please

Why switch to the root user? It's just a hobby, because I'm too lazy to put parameters like sudo in front of a command every time I execute a command, so switch directly to the root user.

Next, enter the following command on the command line to view the hostname:

Hostname

Next, enter the following command on the command line to view the FQDN "fully-qualified domain name":

Hostname-f

Make a note of the above two names, which you will use when installing postfix.

Of course, the above machine name can be changed at any time. If you want to change it, you can directly open the / etc/hostname file through the vi editor, and write the desired machine name to it and save it.

MySQL installation and configuration

In this example, we use MySQL database to store three important information: virtual domain name, user account number and password, and email alias that Postfix needs to serve.

Please note:

In fact, Postfix and Dovecot can not use the database, both can complete the "zero database" mail server through a variety of configuration files. However, since it is so convenient to use a database, why not use it? It is very convenient for future maintenance to store the information that needs to be configured in the database, such as user account and password, etc. Isn't it?!

# it's easy to install MySQL in Ubuntu to install software. To install MySQL, execute the following command on the command line:

Apt-get install mysql-server

You will be required to enter the root password of MySQL twice during installation. Please keep this password in mind.

New database and users

Next, we need to create a new MySQL user and a database:

Log in to MySQL with the root password

Mysql-u root-p

Enter root password

Create a new database named mailserver:

Create database mailserver character set utf8

Enter the following command to create a new user mailserver and specify the password as mailserver123:

Create user mailserver@'localhost' identified by 'mailserver123'

Assign the ownership limit of database mailserver to user mailserver:

Grant all on mailserver.* to mailserver@'localhost' identified by 'mailserver123'

Exit the root user:

Exit

Log in using the mailserver user:

Mysql-u mailserver-p

Enter the password for the mailserver account

Switch the default database to the mailserver database:

Use mailserver

New form

Enter the following SQL statement to create a new virtual_ domains table, which is the domain name used by the local server to receive mail:

CREATE TABLE `virtual_ domains` (`id` int (11) NOT NULL auto_increment, `name` varchar (50) NOT NULL, PRIMARY KEY (`id`)) ENGINE=InnoDB DEFAULT CHARSET=utf8

Enter the following SQL statement to create a new virtual_ users table, which is the end-user table of the mail server, recording the user's e-mail address and password "never save plaintext password":

CREATE TABLE `virtual_ users` (`id` int (11) NOT NULL auto_increment, `password` int (11) NOT NULL, `password` varchar) NOT NULL, `email` varchar (100) NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `email` (`email`), FOREIGN KEY (domain_id) REFERENCES virtual_domains (id) ON DELETE CASCADE) ENGINE=InnoDB DEFAULT CHARSET=utf8

Enter the following SQL statement to create a new virtual_ aliases table, which is the mail server alias table "you can Google the concept of mail server alias alias":

CREATE TABLE `virtual_ aliases` (`id` int (11) NOT NULL auto_increment, `domain_ id` int (11) NOT NULL, `source` varchar (100) NOT NULL, `destination` varchar (100) NOT NULL, PRIMARY KEY (`id`), FOREIGN KEY (domain_id) REFERENCES virtual_domains (id) ON DELETE CASCADE) ENGINE=InnoDB DEFAULT CHARSET=utf8

Insert data

To make it easier to view the results, let's insert some test data into the above three tables:

Insert test data into the virtual_domains table, roughly as follows:

Insert into virtual_domains (id,name) values (1meme mail.mydomain.com'); insert into virtual_domains (id,name) values (2memento mydomain.com')

Please note: the id field of the above table is a self-incrementing column and can be unassigned. But in any case, for the next two tables, we will need to gradually list the values of id for the above tables. For example, I will add the email account under the mydomain.com domain name, and the id value of mydomain.com in the virtual_domains table is 2.

Add user data to the virtual_users table:

Insert into virtual_users (id,domain_id,password,email) values (1meme 2meme encrypt ('zhangsan123456', CONCAT (' $7 $', SUBSTRING (SHA (RAND ()),-16)), 'zhangsan@mydomain.com'); insert into virtual_users (id,domain_id,password,email) values (' 123456 lisification, CONCAT ('$7 $', SUBSTRING (SHA (RAND ()),-16)), 'lisi@mydomain.com')

Add alias data to the virtual_aliases table:

Insert into virtual_aliases (id,domain_id,source,destination) values, insert into virtual_aliases (id,domain_id,source,destination) values, and insert into virtual_aliases (id,domain_id,source,destination) values.

Please note:

With the data from the above alias table, when someone sends an email to all@mydomain.com, the system will automatically forward the email to zhangsan@mydomain.com and lisi@mydomain.com.

This scenario is applicable in situations such as "sending notifications" within the company.

test data

Write a few SQL queries to check the results.

Select * from virtual_domains; select * from virtual_users; select * from virtual_aliases; Postfix installation and configuration

Postfix is the core server for sending mail, and all inward and outward mails need to be completed through Postfix and SMTP protocol. Next, you need to modify some parameters related to Postfix, which are:

Tell Postfix how to connect to the MySQL database, and let Postfix determine the domain name, user account number and password, email alias, etc., through the tables of the database.

Tell Postfix to forward the received mail to Dovecot's LMTP service to complete local delivery

Tell Postfix that all connections need STARTTLS encryption, and if necessary, "nonsense, of course it has to be."

Open one or all of the local ports 25, 465, 587

Installation of Postfix

Execute the following command on the command line to install Postfix:

Apt-get install postfix postfix-mysql

You need to select the type of Postfix during installation, please select Internet Site:

During the installation of Postfix, you will also need to enter _ _ System mail name__,. Here, please enter the address of the domain name you want to send and receive email. "feel free to write it, anyway, you need to modify the configuration file later."

Configuration of Postfix

Back up the Postfix configuration file / etc/postfix/main.cf, first!

Cp / etc/postfix/main.cf / etc/postfix/main.cf_backup_20150511

Attention please

At any time, it is always necessary to make a backup before making any configuration changes.

At the same time, this is also a very good operating habit.

Open the / etc/postfix/main.cf file using the vi editor

Vi / etc/postfix/main.cf

After opening, press I key to enter edit mode

Since we do not intend to use Postfix for user permission verification "the above images have been shown clearly", we are going to mask the default user authentication parameters of Postfix, so add the # symbol before the following lines to comment:

# TLS parameters # smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem # smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key # smtpd_use_tls=yes # smtpd_tls_session_cache_database = btree:$ {data_directory} / smtpd_scache # smtp_tls_session_cache_database = btree:$ {data_directory} / smtp_scache

Copy the following and insert it after the above comment code:

Smtpd_tls_cert_file=/etc/dovecot/dovecot.pem smtpd_tls_key_file=/etc/dovecot/private/dovecot.pem smtpd_use_tls=yes smtpd_tls_auth_only = yes # Enabling SMTP for authenticated users, and handing off authentication to Dovecot smtpd_sasl_type = dovecot smtpd_sasl_path = private/auth smtpd_sasl_auth_enable = yes smtpd_recipient_restrictions = permit_sasl_authenticated, permit_mynetworks, reject_unauth_destination

Please note:

For the meaning of the above parameters, please refer to the Postfix configuration document

Modify the value of the mydestination row as follows:

Mydestination = localhost

Please note: change the value of mydestination to localhost so that Postfix can determine the domain name that needs to receive / send mail through the relevant data in the MySQL table, which is more universal

Add the following to the document to tell Postfix not to use LDA "Local Delivery Agent" and instead use Dovecot's LMTP to complete local mail delivery:

# Handing off local delivery to Dovecot's LMTP, and telling it where to store mail virtual_transport = lmtp:unix:private/dovecot-lmtp

Add the following to the document to tell Postfix to go to the MySQL database to find domain names, user account passwords, email aliases and other information:

# Virtual domains, users, and aliases virtual_mailbox_domains = mysql:/etc/postfix/mysql-virtual-mailbox-domains.cf virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual-mailbox-maps.cf virtual_alias_maps = mysql:/etc/postfix/mysql-virtual-alias-maps.cf

Finally, the / etc/postfix/main.cf file after the modification is completed should be roughly as follows:

# See / usr/share/postfix/main.cf.dist for a commented, more complete version # Debian specific: Specifying a file name will cause the first # line of that file to be used as the name. The Debian default # is / etc/mailname. # myorigin = / etc/mailname smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu) biff = no # appending .domain is the MUA's job. Append_dot_mydomain = no # Uncomment the next line to generate "delayed mail" warnings # delay_warning_time = 4h readme_directory = no # TLS parameters # smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem # smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key # smtpd_use_tls=yes # smtpd_tls_session_cache_database = btree:$ {data_directory} / smtpd_scache # smtp _ tls_session_cache_database = btree:$ {data_directory} / smtp_scache smtpd_tls_cert_file=/etc/dovecot/dovecot.pem smtpd_tls_key_file=/etc/dovecot/private/dovecot.pem smtpd_use_tls=yes smtpd_tls_auth_only = yes # Enabling SMTP for authenticated users And handing off authentication to Dovecot smtpd_sasl_type = dovecot smtpd_sasl_path = private/auth smtpd_sasl_auth_enable = yes smtpd_recipient_restrictions = permit_sasl_authenticated, permit_mynetworks, reject_unauth_destination # See / usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for # information on enabling SSL in the smtp client. Myhostname = host.mydomain.com alias_maps = hash:/etc/aliases alias_database = hash:/etc/aliases myorigin = / etc/mailname # mydestination = example.com, hostname.mydomain.com,localhost.mydomain.com Localhost mydestination = localhost relayhost = mynetworks = 127.0.0.0 Virtual domains 8 [:: ffff:127.0.0.0] / 104 [:: 1] / 128 mailbox_size_limit = 0 recipient_delimiter = + inet_interfaces = all # Handing off local delivery to Dovecot's LMTP, and telling it where to store mail virtual_transport = lmtp:unix:private/dovecot-lmtp # Virtual domains, users And aliases virtual_mailbox_domains = mysql:/etc/postfix/mysql-virtual-mailbox-domains.cf virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual-mailbox-maps.cf virtual_alias_maps = mysql:/etc/postfix/mysql-virtual-alias-maps.cf

Press ESC and enter the following to save and exit

Wq!

Create a new / etc/postfix/mysql-virtual-mailbox-domains.cf file and enter the following:

User = mailserver password = mailserver123 hosts = 127.0.0.1 dbname = mailserver query = SELECT 1 FROM virtual_domains WHERE name='%s'

Restart the Postfix service

Service postfix restart

Test whether the above is correct, and if the above is configured correctly, the result returned after the execution of the following command should be 1:

Postmap-Q mydomain.com mysql:/etc/postfix/mysql-virtual-mailbox-domains.cf

Create a new / etc/postfix/mysql-virtual-mailbox-maps.cf file and enter the following:

User = mailserver password = mailserver123 hosts = 127.0.0.1 dbname = mailserver query = SELECT 1 FROM virtual_users WHERE email='%s'

Restart the Postfix service

Service postfix restart

Test whether the above configuration is correct, and if the above configuration is correct, the return result should be 1 after the execution of the following command:

Postmap-Q lisi@mydomain.com mysql:/etc/postfix/mysql-virtual-mailbox-maps.cf

Create a new / etc/postfix/mysql-virtual-alias-maps.cf file and enter the following:

User = mailserver password = mailserver123 hosts = 127.0.0.1 dbname = mailserver query = SELECT destination FROM virtual_aliases WHERE source='%s'

Restart the Postfix service

Service postfix restart

Test whether the above configuration is correct, and if the above configuration is correct, the result returned after the execution of the following command should be the previously added alias account:

Postmap-Q all@mydomain.com mysql:/etc/postfix/mysql-virtual-alias-maps.cf

Use the vi editor to open the / etc/postfix/master.cf file "Please back up before you modify", find the two lines where submission and smtps are located, and uncomment them. The purpose of this is to allow Postfix to send mail through ports 587 and 465

Restart the Postfix service

Service postfix restart

Done, the Postfix server should be configured. I believe that by the time I get here, I have scared away more than 90% of my friends, and the remaining 10% of my friends, you are good.

Dovecot installation and configuration

Dovecot acts as an IMAP and POP server in this example, and it will also be responsible for verifying the user's identity when the user logs in. "Dovecot will leave the real authentication to MySQL." Because using SSL,Dovecot will use 993 "IMAP protocol" and 995 "POP protocol" to communicate with the outside world, if the server has something like iptable, please open the relevant port.

The content of this section is relatively simple to configure, but there are many files that need to be configured. In general, we need to configure the following information:

Enable IMAP, POP3 and LMTP protocols of Dovecot

Inform Dovecot of the filing path for local mail

Connect to Dovecot and MySQL databases to verify user identity

Configure SSL to encrypt related information

Installation of Dovecot

Install the latest version of Dovecot with the following command:

Configuration of apt-get install dovecot-core dovecot-imapd dovecot-pop3d dovecot-lmtpd dovecot-mysqlDovecot

The configuration files that need to be modified are:

Main configuration file for / etc/dovecot/dovecot.conf Dovecot

/ etc/dovecot/conf.d/10-mail.conf Dovecot configuration information related to the disk path to be operated

/ etc/dovecot/conf.d/10-auth.conf user verifies relevant configuration information

/ etc/dovecot/conf.d/auth-sql.conf.ext SQL-Type verifies relevant configuration information

/ etc/dovecot/dovecot-sql.conf.ext Dovecot configuration information related to database connection

/ etc/dovecot/conf.d/10-master.conf Dovecot configuration information related to local socket

/ etc/dovecot/conf.d/10-ssl.conf configuration information about SSL

Please note:

Before modifying the above files, be sure to make a backup to facilitate recovery

Modify / etc/dovecot/dovecot.conf file

Open the / etc/dovecot/dovecot.conf file using the vi editor and add the following to the file category:

! include conf.d/*.conf# Enable installed protocols! include_try / usr/share/dovecot/protocols.d/*.protocol protocols = imap pop3 lmtp

If the above content already exists, you only need to remove the # number of the line.

Tell Dovecot to enable all .conf files; and turn on Dovecot's imap, pop3, lmtp and other related protocols to make it work properly.

Modify / etc/dovecot/conf.d/10-mail.conf file

Open the file and find the mail_location-related information, and specify it to a path on the local disk that will store incoming messages in the future, as shown below:

Mail_location = maildir:/var/mail/vhosts/%d/%n

At the same time, find the relevant information about mail_privileged_group in the file and modify it as follows:

Mail_privileged_group = mail

Save the file and exit

Enter the following at the command line to view the permissions of the / var/mail path:

Ls-ld / var/mail

The display should be roughly as follows:

Drwxrwsr-x 2 root mail 4096 May 11 15:08 / var/mail

Create a / var/mail/vhosts/ folder for each domain name that needs to be enabled:

Mkdir-p / var/mail/vhosts/mydomain.com

Enter the following command to create a new vmail user group and users and assign permissions

Groupadd-g 5000 vmail useradd-g vmail-u 5000 vmail-d / var/mail

Next, modify the permissions of the / var/mail/ directory so that vmail can access:

Chown-R vmail:vmail / var/mail

# modify / etc/dovecot/conf.d/10-auth.conf file

Find the disable_plaintext_auth in the file and uncomment

Disable_plaintext_auth = yes

Locate the auth_mechanisms in the file and modify it to the following values:

Auth_mechanisms = plain login

By default, Dovecot allows users of the Ubuntu system to log in, and we need to disable it. Find the file type and comment it:

#! include auth-system.conf.ext

Enable MySQL support for Dovecot and cancel the annotation symbols for include auth-sql.conf.ext:

#! include auth-system.conf.ext! include auth-sql.conf.ext #! include auth-ldap.conf.ext #! include auth-passwdfile.conf.ext #! include auth-checkpassword.conf.ext #! include auth-vpopmail.conf.ext #! include auth-static.conf.ext modify / etc/dovecot/conf.d/auth-sql.conf.ext file

Add the following to the file:

Passdb {driver = sql args = / etc/dovecot/dovecot-sql.conf.ext} userdb {driver = static args = uid=vmail gid=vmail home=/var/mail/vhosts/%d/%n} modify the / etc/dovecot/dovecot-sql.conf.ext file

Uncomment the driver line in the file and modify it as follows:

Driver = mysql

Uncomment the connect line in the file and modify it as follows:

Connect = host=127.0.0.1 dbname=mailserver user=mailserver password=mailserver123

Uncomment the default_pass_scheme line in the file and modify it as follows:

Default_pass_scheme = SHA512-CRYPT

Uncomment the password_query line in the file and modify it as follows:

Password_query = SELECT email as user, password FROM virtual_users WHERE email='%u'

Save exit

Enter the following at the command line to modify directory permissions:

Chown-R vmail:dovecot / etc/dovecotchmod-R o-rwx / etc/dovecot modify / etc/dovecot/conf.d/10-master.conf file

Open the file and modify "disable non-SSL encrypted IMAP and POP3 protocols by setting the port to 0":

Service imap-login {inet_listener imap {port = 0}...} service pop3-login {inet_listener pop3 {port = 0}...}

Locate the service lmtp in the file and modify it as follows:

Service lmtp {unix_listener / var/spool/postfix/private/dovecot-lmtp {mode = 0600 user = postfix group = postfix} # Create inet listener only if you can't use the above UNIX socket # inet_listener lmtp {# Avoid making LMTP visible for the entire internet # address = # port = #}}

Find the service auth in the file and modify its contents as follows:

Service auth {# auth_socket_path points to this userdb socket by default. It's typically # used by dovecot-lda, doveadm, possibly imap process, etc. Its default # permissions make it readable only by root, but you may need to relax these # permissions. Users that have access to this socket are able to get a list # of all usernames and get results of everyone's userdb lookups. Unix_listener / var/spool/postfix/private/auth {mode = 0666 user = postfix group = postfix} unix_listener auth-userdb {mode = 0600 user = vmail # group =} # Postfix smtp-auth # unix_listener / var/spool/postfix/private/auth {# mode = 0666 #} # Auth process is run as this user. User = dovecot}

Find the service auth-worker content in the file and modify it as follows:

Service auth-worker {# Auth worker process is run as root by default, so that it can access # / etc/shadow. If this isn't necessary, the user should be changed to # $default_internal_user. User = vmail} modify / etc/dovecot/conf.d/10-ssl.conf file

Find the ssl_cert in the file and modify the content as follows: "Please make sure that the pem file of dovecot already exists. If you use your own SSL file, please modify the following to the appropriate path":

Ssl_cert =

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

Development

Wechat

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

12
Report