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 build Sendmail Mail Server by CentOS

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)05/31 Report--

This article mainly explains "CentOS how to build Sendmail mail server", the content of the article is simple and clear, easy to learn and understand, now please follow the editor's ideas slowly in depth, together to study and learn "CentOS how to build Sendmail mail server" bar!

Before we build it, let's introduce the environment.

System environment: centos 5.632bit

Domain name: qiu.com

1. Add mx record

Before setting up, we need to add the mx record to the dns (in this case, the dns server address is 192.168.0.1)

Test whether it works or not.

2. Online installer

Yum-y install sendmail-* # main program yum-y install M4 muri * # configuration tool yum-y install cyrus-sasl # smtp Authentication yum-y install dovecot # pop imap receive

3. Configure sendmail

1) vi / etc/mail/local-host-names join mail.qiu.com

2) vi / etc/mail/sendmail.mc changes the smtp authentication to accept all hosts, and then deletes dn1 # before the trust_auth line

3) input vi / etc/mail/access into connection:192.168.0 relay

4) enter the command:

M4 / etc/mail/sendmail.mc > / etc/mail/sendmail.cfmakemap hash / etc/mail/access.db < / etc/mail/access

5) modify the / etc/dovecot.conf file, find the line # protocols = imap imaps pop3 pop3s, and remove #.

6) start the mail service

Services sendmail startservices dovecot startservices saslauthd start

Don't forget to add it to boot.

6) add users and set passwords

Groupadd mail_user # add a mail group useradd-s / sbin/nologin-g mail_user zhang3 # add a user named Zhang 3 useradd-s / sbin/nologin-g mail_user li4 # add a user echo test_zhang3 named L4 | passwd-- stdin zhang3 # set the password to test_zhang3echo test_li4 for Zhang 3 | passwd-- stdin li4 # set the password to test_li4 for Zhang 3

Now we can send and receive email through mua client software such as oe or foxmail, and then we configure openwebmail. Since openwebmail works on port 80, we need to install httpd first!

4. Configure openwebmail

Yum installation

Yum-y install lftplftpget http://openwebmail.org/openwebmail/download/redhat/rpm/release/openwebmail.repo yum-y install openwebmail

1) initialize

/ var/www/cgi-bin/openwebmail/openwebmail-tool.pl-- init

2) vi / var/www/cgi-bin/openwebmail/etc/dbm.conf, modified as follows:

Dbm_ext .dbdbmopen _ ext .dbmdbmopen _ haslock no

3) vi / var/www/cgi-bin/openwebmail/etc/openwebmail.conf

Domainnames qiu.com # change to self-defined domain name # default_language zh_cn.gb2312 # change login interface to Chinese #

4) vi / var/www/cgi-bin/openwebmail/etc/defaults/openwebmail.conf:

Smtpserver 192.168.0.107 # change the address of the smtp server # authpop3_server 192.168.0.107 # change the address of the pop3 server

5) vi / var/www/cgi-bin/openwebmail/etc/defaults/dbm.conf

Dbmopen_ext .dbdbmopen _ haslock yes

6) initialize again

/ var/www/cgi-bin/openwebmail/openwebmail-tool.pl-- init

Login address:

The following information (permissions) may appear when logging in:

Couldn't create file / var/log/openwebmail.log! (permission denied)

The solution is as follows:

Touch / var/log/openwebmail.logchcon-u system_u / var/log/openwebmail.logchcon-t httpd_sys_script_rw_t / var/log/openwebmail.logchcon-t httpd_unconfined_script_exec_t / var/www/cgi-bin/openwebmail/openwebmail*

If prompted "unable to retrieve mail", just reinitialize it!

Finally, the screenshot was taken successfully:

Thank you for your reading, the above is the content of "CentOS how to build Sendmail mail server". After the study of this article, I believe you have a deeper understanding of how CentOS builds Sendmail mail server, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

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

Internet Technology

Wechat

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

12
Report