Seven steps to set up Sendmail in RHEL4

Source: Internet
Author: User

Mail transmission is essential to a system. Therefore, it is also necessary to set up Sendmail in RHEL 4 system. RHEL 4 sets up Sendmail, which consists of several important parts, next we will gradually introduce these important parts:

1. Set up Sendmail in RHEL 4. First install the software required for Sendmail.
[Root @ localhost ~] # Rpm-qsendmailm4
Sendmail-8.13.1-2
M4-1.4.1-16 has been installed by default, also need to mount 4th CDs, install software related to sendmail
[Root @ localhostRPMS] # rpm-ivhsendmail -*
Warning: sendmail-cf-8.13.1-2.i386.rpm: V3DSAsignature: NOKEY, keyIDdb42a60e

Preparing ...... ######################################## ### [100%]
1: sendmail-doc ##################################### ###### [33%]
2: sendmail-cf ##################################### ###### [67%]
3: sendmail-devel ##################################### ###### [100%]

2. Set up Sendmail in RHEL 4 to modify the/etc/mail/local-hosts-name file.
Increase the FQDN of the local host and the local host. Remember to add only the FQDN of the local host and the domain name FQDN. Do not add other domains. Otherwise, the error userunknown will occur when sending emails to the external domain:
[Root @ localhostnamed] # cat/etc/mail/local-host-names # local-host-names-includeallaliasesforyourmachinehere.ltest.com

3. Set up Sendmail in RHEL 4 to change the/etc/mail/sendmail. mc file and modify the following:
DaemonPortsOptions = Port = smtp, Addr = 127.0.0.1, Name = MTA changed to: DaemonPortsOptions = Port = smtp, Addr = yourip or 0.0.0.0, Name = MTA and then m4/etc/mail/sendmail. mc>/etc/mail/sendmail. cf

4. RHEL 4 sets up Sendmail user management
Authentication configuration: Modify the fields in/etc/mail/sendmail. mc and cancel the comments at "TRUST_AUTH_MECH" and "define" in the next line. In the sendmail. mc file 48th, 49) and then m4/etc/mail/sendmail. mc>/etc/mail/sendmail. cf.
[Root @ localhostnamed] # chkconfig -- listsaslauthd enable authentication
Saslauthd0: off1: off2: off3: off4: off5: off6: off
[Root @ localhostnamed] # chkconfig -- level35saslauthdon

Create a user account
◆ [Root @ localhostnamed] # groupaddmailuser
◆ [Root @ localhostnamed] # adduser-gmailuser-s/sbin/nologinmike
◆ [Root @ localhostnamed] # adduser-gmailuser-s/sbin/nologinjohn
◆ [Root @ localhostnamed] # passwdmike
◆ [Root @ localhostnamed] # passwdjohn password is 123

Set email alias and mass mailing
◆ Modify the/etc/aliases file to implement Mail forwarding and Mail List:
◆ Admin: mike sets the alias admin for the email user mike.
◆ Estgroup: mike, john can send emails sent to testgroup by group to both mike and john.
◆ # Newaliases

5. Set up Sendmail access control settings in RHEL 4
Change the/etc/mail/accesss file and add:
[Root @ localhostnamed] # cat/etc/mail/access
# Checkthe/usr/share/doc/sendmail/README. cffileforade.pdf
# Oftheformatofthisfile. (searchforaccess_dbinthatfile)
# The/usr/share/doc/sendmail/README. cfispartofthesendmail-doc
# Package. # bydefaultweallowrelayingfromlocalhost ......
Localhost. localdomainRELAY
LocalhostRELAY
127.0.0.1RELAY
Ltest. comRELAY
Then makemaphash/etc/mail/access. db

6. run Sendmail # servicesendmailrestart in RHEL 4.
[Root @ localhostnamed] # servicesendmailrestart start the service
Shuttingdownsendmail: [FAILED]
Startingsendmail: [OK]
Startingsm-client: [OK]
[Root @ localhostnamed] # telnetlocalhost25
Trying127.0.0.1 ......
Connectedtolocalhost. localdomain (127.0.0.1 ).
Escapecharacteris '^]'.
220localhost. localdomainESMTPSendmail8.13.1/8.13.1; Sat, 17Mar200712: 54: 47 + 0800
Ehlolocalhost
250-localhost.localdomainHellolocalhost.localdomain [127.0.0.1], pleasedtomeetyou
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-8BITMIME
December 250-SIZE
250-DSN
250-ETRN
250-AUTHDIGEST-MD5CRAM-MD5LOGINPLAIN -- authentication should take effect
250-DELIVERBY
250 HELP
Quit
2212.0.0localhost.localdomainclosingconnection
Connectionclosedbyforeignhost.

7. Set up Sendmail in RHEL 4 to install the post office service.
[Root @ localhostRPMS] # rpm-ivhdovecot-0.99.11-2.EL4.1.i386.rpm -- aid
Warning: dovecot-0.99.11-2.EL4.1.i386.rpm: V3DSAsignature: NOKEY, keyIDdb42a60e
Preparing ...... ######################################## ### [100%]
◆ 1: perl-DBI ##################################### ###### [20%]
◆ 2: postgresql-libs ##################################### ###### [40%]
◆ 3: mysql ####################################### #### [60%]
◆ 4: dovecot ####################################### #### [80%]
◆ 5: perl-DBD-MySQL ################################### ####### [1, 100%]
Install the software 1-5 to continue.

[Root @ localhost/] # vi/etc/dovecot. conf add pop3pop3s after protocols = imapimaps
Start the dovecot Service
[Root @ localhost/] # servicedovecotrestart
StoppingDovecotImap: [FAILED]
StartingDovecotImap: [OK]
[Root @ localhost/] # chkconfig -- level35dovecoton
We use a client to test

Finally, we completed the process of setting up Sendmail in RHEL 4 after seven steps. I hope everyone can succeed.

  1. Analysis on RHEL5 Xen virtual management and Installation
  2. Simple projects supported by Linuxconf
  3. 5 Important Notes for remote RHEL5 Installation
  4. Steps for installing RHEL5
  5. Configure RHEL to bind multiple NICs

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.