This time we will learn about the Sendmail server configuration in Linux. The email server's IP192.168.1.2 host domain name is mail.ltest.com)
Premise: First we install the DNS server OK can resolve, do not understand Look At The http://linux.chinaitlab.com/server/725027.html
1. 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. 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-includeall
Aliasesforyourmachinehere.
Ltest.com
3. Change the/etc/mail/sendmail. mc file and modify the following:
DaemonPortsOptions = Port = smtp, Addr = 127.0.0.1, Name = MTA changed:
DaemonPortsOptions = Port = smtp, Addr = yourip or 0.0.0.0, Name = MTA
Then m4/etc/mail/sendmail. mc>/etc/mail/sendmail. cf
4. 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