Quickly install Sendmail

zhaozj2021-02-17  70

First, install the Redhat Linux 7.3 server version. Open Telnet, SMTP, and POP3 port during installation. Please set the network card and the IP address, gateway, and DNS server during installation, and it is recommended to install DNS servers locally.

After the server is installed, check if Telnet, SMTP, and POP3 are available:

Netstat -a | GREP TELNET

Netstat -a | GREP SMTP

Netstat -a | grep pop3

If the above service is available, the service status will be displayed. E.g:

TCP 0 0 *: Telnet *: * listen

If the service is not available, use the setup program to set the system service to open the service. Redhat Linux 7.3 has a service pack with Telnet and SMTP, which is recommended to open the WU-FTP service at the same time. After setting, you need to restart the xinetd process. You can also use Setup, directly modify the configuration files of each service under / etc / xinetd.d. Generally speaking, you need to change the Disable option from YES to NO. However, just modify the configuration item, restart the Xinetd service.

Xinetd -Restart

If the POP3 port is not open, this situation is special, because Sendmail does not own the POP3 service package (this situation is limited to Redhat Linux 7.3, as far as I know, 8.0 is a self-contained POP3 service), we need to install POP3's service program (or installing related service packs, such as IMAPXX.RPM, XX is a number), in general, install qpopper can be. Qpopper is available in the following URL, please select the version of for x86:

http://www.eudora.com/qpopper_general/

Install QPopper followed by the following procedure:

TAR ZXVF qpopper4.0.5.tar.gz

CD qpopper4.0.5

./configure

Make

Make Install

In the middle, there may be problems that cannot be established in the middle, please create a directory manually. The default installation directory is / usr / local / sbin.

At the same time, remind it that if you need the latest Sendmail version, please download from the following address:

http://www.sendmail.org/

From the installation simple consideration, I recommend using the Sendmail version of Redhat Linux 7.3. If it is 8.0 or more redhat, it is best to reinstall, I feel that the sendmail itself with RedHat8.0 doesn't seem to be very easy to install (9.0 has not tried it, but I feel used as a server, or 7.3 is best).

Hereinafter, all services have been opened, and you can start configuring the Sendmail itself. Edit the /etc/mail/sendmail.mc file (recommended first back up), pay attention to modifying as follows:

Define ('smart_host') //, for example Define ('smart_host', 'mail.com')

If you need a server to authenticate service, make sure there is no DNL symbol in front of the following two lines:

Trust_auth_mech (`Digest-MD5 CRAM-MD5 Login Plain" DNL

Define (`confauth_mechanism", `Digest-MD5 CRAM-MD5 Login Plain ') DNL then runs classic M4 programs to generate sendmail profiles.

M4 /etc/mail/sendmail.mc> /etc/sendmail.cf

After that, you will need to open the external SMTP service, which requires a modification of the /etc/sendmail.cf file that has just been generated. Please find:

O daemonportOptions = port = SMTP, addr = 127.0.0.1, name = MTA

Please replace 127.0.0.1 as local IP.

In order to be able to resolve the local hostname, please modify:

CWLOCALHOST Your-local-name //, for example: CWLocalHost Mail.com

Or add the host name to the following file:

/ etc / mail / local-host-names

In this way, users can send mail using hostnames, for example: xxx@mail.com

At this point, most of the installation is complete, restart the Sendmail service, or restart the machine. After restart, request 25 (SMTP) and 110 (POP3) ports of the external Telnet server, if you can connect to the above two ports, then your sendmail is basically configured, you can freely send and receive emails.

At this point, if you need further configuration, you can modify /etc/sendmail.cf to complete, Sendmail provides a related help document (there are many online networks).

转载请注明原文地址:https://www.9cbs.com/read-28847.html

New Post(0)