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 install and configure Sendmail in Linux system

2025-04-11 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

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

Today, I will talk to you about how to install and configure Sendmail in Linux system. Many people may not know much about it. In order to let everyone know more, Xiaobian summarizes the following contents for everyone. I hope everyone can gain something according to this article.

method steps

Install Sendmail

Verify that Sendmail is installed, using the command rpm-q sendmail. (Installed here) If not, install Sendmail-8.12.8-4.i386.rpm on the first CD and Sendmail-cf-8.12.8-4.i386.rpm on the third CD.

II. Configure the sending mail server

1. Go to/etc/mail directory and use vi to open Sendmail.mc file. Find the line DAEMON_OPTIONS and add the comment dnl #;

2. Use the make-C /etc/mail command to regenerate the Sendmail.cf file;

Modify the/etc/mail/access file to add a line 192.168.36 (Linux IP) RELAY, indicating that the IP address of this network segment can send mail through this server;

4. After the access modification is completed, you need to use the makemap hash/etc/mail/access.db

The requested URL/etc/mail/local-host-names/was not found on this server. Add a line test.com(domain name), indicating that it is a local domain name and is being delivered locally.

3. Configure the receiving mail server

Use rpm-q imap to confirm that the IMAP package is installed. (Installed here) If it is not installed, go to the second installation disk and find the imap-2001a-18-i386.rpm file for installation;

Make sure that these servers exist in the/etc/services file, and make sure that the following services are not preceded by the #comment:

imap 143/tcp imap2 # Interim Mail Access Proto v2

imap 143/udp imap2

pop2 109/tcp pop-2 postoffice # POP version 2

pop2 109/udp pop-2

pop3 110/tcp pop-3 # POP version 3

pop3 110/udp pop-3

3. Start pop3 and IMAP service, modify/etc/xinetd.d/ipop3 file, change "disable=yes" to "disable=no", save the file, modify/etc/xinetd.d/imap file, change "disable = yes" to "disable =no", save the file;

Restart xinetd service, service xinetd restart.

Domain name resolution under Linux

1. Enter the/etc/sysconfig directory, use vi to open the network file, and put HOSTNAME=xhl-3618 test.com (domain name);

2. Modify the/etc/hosts file. Note that the domain names of the two files modified above should be the same as the domain names set in/etc/mail/local-host-names;

3. To modify a file %systemroot%\system32\drivers\etc\hosts under Windows path, you need to add a line "192.168.36.202 test.com (domain name)";

Restart Apache and sendmail.

Using SendMail under Linux

Create two accounts;

2. Use the following commands to send mail;

(1)telnet localhost 25

(2)HELO

(3)mail from

(4)rcpt to

(5)data(Note: data after a space, and then write the text. Add a dot after writing)

(6)quit

3. Use the following command to receive mail.

(1)mail

(2)1, 2,...(Number of mail)

After reading the above, do you know more about how to install and configure Sendmail on Linux? If you still want to know more knowledge or related content, please pay attention to the industry information channel, thank you for your support.

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

Servers

Wechat

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

12
Report