1. Confirm that the system has been installed. # rpm -aq | grep sasl # rpm -aq | grep imap # rpm -aq | Grep sendmail # rpm -aq | GREP M4 at least to ensure the following software IMAP-2001A-18.I286.RPM Sendmail-8.12.8-4 .i386.rpm m4-1.4.1-13.i386. rpm cyrus-sasl-2.1.10-4.i386.rpm cyrus-SASL-MD5-2.1.10-4.i386.rpm Cyrus-SASL-Plain-2.1 .10-4.i386.rpm cyrus-sasl-gssapi-2.1.10-4.i386.rpm
2, add a corresponding MX record on the DNS server
3, add local mail domain name #vi /etc/mail/local-host-namesmydomain.com#service sendmail restart [Show Changed W class] #sendmail -btaddress test mode (Ruleset 3 not Automatic INVOKED ENTER
4, use the / etc / mail / access database, you can define the address or user of the MTS to allow mail or users, but use SASL can not define this
File. ACCESS file definition example: #vi /etc/mail/accessMydomain.com Relay // Allows users to send 10.2.2 Relay // Allow 10.2.2.0 network segment to send username@somedomain.com relay // Allow a specific email address username @ relays / / Allow a specific user to send parameter description: OK unconditional acceptance or send the Relay allows the SMTP proxy to deliver the Reject Refuse to accept and send an error message Discard discard mail, do not send an error message Generate Access.dbmakemap hash access.db 5, you can choose to set the user alias, set the user alias, the mailing list is also a define in this file in the sendmail.mc file ('alias_file', '/ etc / aliase "DNL statement Determine format: Alias: Recipient [, Recipieng, ...] 6, you can choose to use the / etc / mail / userdb file, change the user inbound or outbound address format: inbound address: Outbound address exit address of MailName Override: Makemap Btree Userdb .db 7. Establish the virtual domain MC configuration file defined in virtual domain configuration in the virtual domain MC configuration file. File location. #vi / etc / mail / virtusertable virtual domain address real address #makemap hash virtusertable.db 8, configure POP3 operation: # ntsysv Select IPOP3 in the System Service list, select 'OK' Save Launch Restart Xinetd Service, Run: # service xinetd restart Running NetStat command to see if SMTP and POP3 services have started # netstat -l 9. Configure SASL to find related rows A in Sendmail.mc, add define (queue_dir, `/ var / spool / mqueue / q * ') to start multi-mail queue, get better transmission performance, independent of SASL. In addition / var / spool / mqueue, you create any number of queue directories, run: # cd / var / spool / mqueue # mkdir Q1 Q2 Q3 Q4 Q5 Q6 B, will remove DNL of the following two lines, cancel comments. Trust_auth_mech (`External Digest-MD5 CRAM-MD5 Login Plain ') DNL effect is to make Sendmail regardless of Access text How to set up in the item, you can relay those who are verified by External, Login, Plain, CRAM-MD5 or Digest-MD5. Part. Define (`confauth_mechanism", `external gssapi digest-md5 cram-md5 login plain ') DNL effect is Certification method of the system. The authentication method supported by Outlook Express is login. C, add DNL to DNL DAEMON_OPTIONS DNL DAEMON_OPTIONS (`port = SMTP, ADDR = 127.0.0.1, name = mta ') DNL Let Sendmail can listen to all network devices, Serve the entire network, not just serving this unit. D, authenticate is performed on the default port (25) of the SMTP instead of the 587 port. This enforces all mail to use the mail server. The user can send an email after the user is certified. Change DNL Daemon_Options (`port = submission, name = msa, m = EA ') DNL to Daemon_Options (` port = 25, name = msa') DNL Finally, run # m4 /etc/mail/sendmail.mc> / etc /mail/sendmail.cf regenerates the Sendmail.cf file with M4 to restart the Sendmail service. Check if the authentication is turned on: You can verify that the Sendmail service is started normally. If the login is successful, the Sendmail service has become Start start. # Telnet localhost 25 TRYING 127.0.0.1 ... Connected to localhost. escape character is '^]' 220 localhost.localdomain Esmtp sendmail 8.12.8 / 8.12.8; WED, 12 May 2004 15:57:01 0800 Ehlo localhost 250-enhancedStatuscoDes 250-PIPELINING 250-8BITMIME 250-SIZE 250-DSN 250-Auth Gssapi Login Plain 250-Deliverby 250-Help Quit # There are logins after Auth. There is basically possible to authenticate on OutlookExpress. Also using sendmail -d0.1 -bv root | grep SASL, Netunix NewDB NIS PIPELINING SASL Scanf StartTLS TCPWRAPPERS can be explained that SASL is enabled.