CentOSsendmail Mail Server Configuration tutorial

Source: Internet
Author: User
Let's first take a look at the simple figure: below we will configure the sendmail mail server in detail according to the figure: first install dns: first create a CD mount point: install dns-related software packages: copy an example file to the current directory. when copying the file, add-p to the file and copy the mode. Otherwise, the file cannot be started. Edit this document and take a look at the simple figure:

The following figure shows the detailed configuration of the sendmail mail server:
Install dns first:
Create a CD mount point first:



Install dns-related software packages:


Copy an example file to the current directory. when copying the file, add-p to copy the mode. Otherwise, the file cannot be started:

Edit this file:




Save and exit, and then edit the region declaration file:


Then go to the Directory of the region file and copy a sample file to generate the 163.com. zone file:

Edit the content:


Dns pointing:


The Dns server is ready;
Start the service:

Run sendmail as follows:
Because sendmail is automatically installed on linux, we need a software package:
Install the sendmail-cf software package:


Where. mc file and. the cf file content is the same,. the content in the cf file is very complex, so we only need to modify it. mc file, and then put. mc file. to do this, install the above sendmail-cf package:
Edit The sendmail. mc file:


Modify the relay file:

163. cm is an unconditional forwarding in the local region. it is sent from the relay CIDR block 145 and the relay sina.

Edit Local files:


After saving and exiting, add two users:

Then start the sendmail server;
To receive emails on the client, install the pop3 service:

Because the installation of this software package is dependent, edit yum:


Install the software package;

After the installation is complete, start:

Now, I can send emails to the 163 server (now sending emails to users on the 163 server ):







Then open a machine, open the outlook software, and create a user2 user;
After the email is created, start sending the email:

After clicking send,
Check the log on the 163 server:

You can see the sending status:

Then you can receive the message on the user2 client:

Open the email and send a message to user1:

Click "send" to view the logs on the server:

Then, receive the reply email on user 1:

Now, only emails are received and sent between the 163 servers. next we will send emails between different domains, that is, we will create an sina mail server:
Make a dns as above:



Install dns-related software packages:

Go to this directory and copy a sample file:

Edit this file:






Generate the storage file:

Edit the file:


Dns pointing:


Then restart:

After Dns is complete, run sendmail:


Edit this file:


This relay file


Edit the local file:


Add two users: user3 and user4:

Start sendmail:

Install the pop3 service ,:

Edit yum:


Save and exit. install the software package:

Restart the service:

In this way, the sina server is complete like above;
In this way, the client on the 163 server sends an email to the sina client:

After sending the message, receive it on user4:

Haha finally succeeded, so that 163 of customers can communicate with sina. this is in the LAN, and the Mail may be very slow, but you only need to do a dns reverse resolution (this problem does not exist on the internet ),
Reverse resolution is now performed on the 163 server:
Enter this directory

Edit File:


Save and exit;
Then, use named. local as the template to create the 192.168.145.zone file:

Edit this file:



Then, perform reverse resolution on the sina server:


Save and exit. Then, use named. local as the template to create the 192.168.145.zone file:

Edit this file:



In this way, reverse resolution is completed, and the mail transmission speed will be much faster.
A simple email server is complete.
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.