Use the public method in RHEL4 & 5 to easily build Sendmail and Dovecot email servers

Source: Internet
Author: User
Tags dovecot mx record
In RHEL4 & amp; 5, use the public method to easily set up Sendmail and Dovecot email server-Linux Enterprise Application-Linux server application information. The following is a detailed description. The original intention of writing this article is to read that sendmail is complex. I have successfully configured the sendmail server in a more concise and concise manner, hoping to help you with your learning (setting the cost ground in RHEL5)

[Root @ mail ~] # Fuqin liquor cooking // experiment environment: RHLE5, RHEL4

Step 1: Install the Sendmail server

(1) run the rpm command to install Sendmail. install cyrus-sasl, sendmai, and sendmail-cf software packages in RHLE5 with system-config-packages, which are cyrus-sasl-2.1.22-4.i386, sendmail-8.13.8-2.e15.i386, and sendmai-cf-8.13.8-2.e15.i386; install sendmail in RHEL4, the sendmail-cf and sendmail-doc packages are recommended.

(2) domain name settings:

1. Add an MX record to the DNS server

@ In mx 5 mail.test.com

Mail.test.com in a 192.168.1.102

2. Set the local-host-names file vi/etc/mail/local-host-names // to add the domain name that the email server provides services.

Test.com

3. enable the network interface vi/etc/mail/Sendmail. mc of the sendmail server.

// Search for the set row

DAEMON_OPTIONS ('port = smtp, Addr = 127.0.0.1, Name = MTA ') dn1 changes 127.0.0.1 to 0.0.0.0

// Even if the server can provide services for all network interfaces of the host (0.0.0.0)

(3) Configure SMTP authentication for Senmail

Vi/etc/mail/sendmail. mc

// Search for the set row

Dnl TRUST_AUTH_MECH ('external DIGEST-MD5 login plain ') dnl
Dnl define ('confauth _ MECHANISMS ', 'external GSSAPI DIGEST-MD5 CRAM-MD5 login plain') dnl

Remove the dnl of the two rows // in the sendmail File, dnl indicates that the behavior comment line is invalid. Therefore, you can enable the corresponding setting line by removing the dnl string at the beginning of the line.

* In RHEL4 * 5, the sendmail. conf configuration file setting uses the saslauthd service program to provide the user's authentication level. Therefore, the sasaauthd service must be started.

(4) access Control Configuration. In RHEL4 & 5, by default, users of the host where the Sendmail server is located can send emails without any authentication.

Note that the/etc/mail/access file contains a line: 127.0.0.1 RELAY // RELAY is a RELAY, I suggest using Yi Ma to understand the meaning of this sentence.

Makemap hash access. db
(5) run the m4 command to generate the sendmail. cf file. In fact, sendmail. mc is a template file.

M4 sendmail. mc> sendmail. cf

Start the Sendmail and saslauthd services and verify the Sendmail services.

Telnet localhost 25 // enter ehlo localhost. At this time, login plain should be entered, indicating that SMTP authentication is successfully set.

Chkconfig -- level 35 saslauthd on

Service saslauthd start


Step 2: configure the Dovecot Server

Run the system-config-packages command to install the dovecot package, vi/etc/dovecot. conf.

Remove the one before # protocols = imap imaps pop3 pop3s. Add pop3 and pop3s to RHEL4.

Start dovecot service dovecot start

Step 3: Start the DNS, saslauthd, and sendmail. dovecot services for testing.

Now you can build a sendmail system. If you want to go deeper, try sending emails to the EXCHANGE2003 mail system. I want to test sendmail using foxmail6 in windows.

For more information, see my blog.

Http://hi.baidu.com/yuhongchun027

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.