In Linux, how does one configure the e-mail server?

Source: Internet
Author: User
Tags nslookup
Article Title: how to configure the e-mail server in Linux ?. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.

With the development of the Internet, e-mail has rapidly grown into a major network information transmission tool. In the face of a large number of demands for fast, cheap, and highly reliable e-mail, many companies and individuals use the services provided by linux as solutions to meet these needs.

Redhat7.1 the SendMail 8.11 service has been installed by default. because redhat is easy to install and use, we will ignore the installation process here. For more information, see the redhat CD documentation. to make your new email server work properly, you must first solve the DNS problem. add the Host Name and IP address of your email server to the DNS and confirm with nslookup:

[Root @ testmail/root] # nslookup-sil testmail.blank.com

Server: 192.168.100.1

Address: 192.168.100.1 #53

Name: testmail.blank.com

Address: 192.168.100.134

You also need to try reverse domain name resolution, which plays an important role in preventing email delay. currently, most email servers use reverse domain name resolution as part of the authentication during Email Delivery. so use your IP address to check whether Reverse Domain name resolution is correct.

[Root @ testmail/root] # nslookup-sil 192.168.100.134

Server: 192.168.100.1

Address: 192.168.100.1 #53

134.100.168.192.in-addr. arpa name = TESTMAIL.blank.com.

As you can see, the DNS service works normally. Next, let's configure the SendMail service. redhat 7.1 is installed by default to enable the SMTP service to run on the local machine. you can use netstat-nl to view the ports listened by all background programs. Note this line: 127.0.0.1: 25. This indicates that the SendMail service is listening to the port 25 (SMTP) on the local machine:

[Root @ testmail/root] # netstat-nl

Active Internet connections (only servers)

Proto Recv-Q Send-Q Local Address Foreign Address State

Tcp 0 0 0.0.0.0: 32768 0.0.0.0: * LISTEN

Tcp 0 0 0.0.0.0: 111 0.0.0.0: * LISTEN

Tcp 0 0 0.0.0.0: 22 0.0.0.0: * LISTEN

Tcp 0 0 127.0.0.1: 25 0.0.0.0: * LISTEN

Udp 0 0 0.0.0.0: 32768 0.0.0.0 :*

Udp 0 0 0.0.0.0: 667 0.0.0.0 :*

Udp 0 0 0.0.0.0: 111 0.0.0.0 :*

Active UNIX domain sockets (only servers)

Proto RefCnt Flags Type State I-Node Path

Unix 2 [ACC] stream listening 1119/dev/gpmctl

Unix 2 [ACC] stream listening 1172/tmp/. font-unix/fs7100

However, this only indicates that the e-mail Server only receives emails from your local machine. to solve this problem, you must modify the configuration and tell SendMail to listen to your external NIC address. assume that only one network card (eth0) is installed on your server and your IP address is configured with ifconfig. this address can be different from the DNS resolution address, but you must ensure that DNS can correctly resolve the mail server address. here we use the same address (recommended ):

[Root @ testmail/root] # ifconfig

Eth0 Link encap: Ethernet HWaddr 00: 60: 97: DE: E9: 99

Inet addr: 192.168.100.134 Bcast: 192.168.100.255 Mask: 255.255.255.0

Up broadcast running multicast mtu: 1500 Metric: 1

RX packets: 12421 errors: 0 dropped: 0 overruns: 0 frame: 0

TX packets: 5 errors: 0 dropped: 0 overruns: 0 carrier: 0

Collisions: 0 FIG: 100

Interrupt: 10 Base address: 0xe000

Lo Link encap: Local Loopback

Inet addr: 127.0.0.1 Mask: 255.0.0.0

Up loopback running mtu: 16436 Metric: 1

RX packets: 6 errors: 0 dropped: 0 overruns: 0 frame: 0

TX packets: 6 errors: 0 dropped: 0 overruns: 0 carrier: 0

Collisions: 0 txqueuelen: 0

[1] [2] [3] [4] Next page

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.