Installation and configuration of SendMail servers in Linux systems

Source: Internet
Author: User
Tags aliases imap mail md5 access database dovecot

First we put the DNS server installation OK can be resolved, do not understand the look linux.chinaitlab.com/server/725027.html ">http://linux.chinaitlab.com/server/725027.html

1. First install the required software SendMail

[Root@localhost ~]# rpm-q sendmail M4

Sendmail-8.13.1-2

M4-1.4.1-16 has been installed by default and will need to mount the 4th CD-ROM to install sendmail-related software

[Root@localhost rpms]# RPM-IVH sendmail-*

Warning:sendmail-cf-8.13.1-2.i386.rpm:v3 DSA Signature:nokey, key ID db42a60e

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 domain and host, remembering that only the FQDN and domain name FQDN of the localhost, and do not add other domains, the user unknown error occurs when sending mail to Outland:

[Root@localhost named]# Cat/etc/mail/local-host-names

# Local-host-names-include all aliases to your machine here.

Ltest.com

3. Change the/ETC/MAIL/SENDMAIL.MC file and modify the following places:

daemonportsoptions=port=smtp,addr=127.0.0.1, NAME=MTA changed to:

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

Certified Configuration: Modify the fields in the/ETC/MAIL/SENDMAIL.MC to cancel the comment on the "Trust_auth_mech" line and the next line "define". (48th, 49 of the SENDMAIL.MC file) and then m4/etc/mail/sendmail.mc>/etc/mail/sendmail.cf.

[Root@localhost named]# chkconfig--list SASLAUTHD Open Certification

SASLAUTHD 0:off 1:off 2:off 3:off 4:off 5:off 6:off

[Root@localhost named]# Chkconfig--level SASLAUTHD on

Create a user account

[Root@localhost named]# Groupadd Mailuser

[Root@localhost named]# adduser-g mailuser-s/sbin/nologin Mike

[Root@localhost named]# adduser-g mailuser-s/sbin/nologin John

[Root@localhost named]# passwd Mike

[Root@localhost named]# passwd John's password is 123.

Set up mail aliases and bulk mail

Modify the/etc/aliases file to implement message forwarding and mailing lists:

Admin:mike set alias admin for Mail user mike

Testgroup:mike,john implementation of mass sent to Testgroup Mail sent to Mike and John above 2 can be tested separately

#newaliases

5. Access Control Settings

Change/etc/mail/accesss file, increase:

[Root@localhost named]# cat/etc/mail/access

# Check THE/USR/SHARE/DOC/SENDMAIL/README.CF file for a description

# of the format of this file. (Search for access_db in that file)

# THE/USR/SHARE/DOC/SENDMAIL/README.CF is part of the Sendmail-doc

# package.

#

# By default we allow relaying from localhost ...

Localhost.localdomain RELAY

localhost RELAY

127.0.0.1 RELAY

Ltest.com RELAY

Makemap hash/etc/mail/access.db </etc/mail/access database update after completion.

6. #service SendMail Restart

[root@localhost named]# service sendmail restart Start Services

Shutting down SendMail: [FAILED]

Starting sendmail: [OK]

Starting sm-client: [OK]

[Root@localhost named]# telnet localhost 25

Trying 127.0.0.1 ...

Connected to Localhost.localdomain (127.0.0.1).

Escape character is ' ^] '.

Localhost.localdomain ESMTP Sendmail 8.13.1/8.13.1; Sat, Mar 2007 12:54:47 +0800

EHLO localhost

250-localhost.localdomain Hello Localhost.localdomain [127.0.0.1], pleased to meet you

250-enhancedstatuscodes

250-pipelining

250-8bitmime

250-size

250-dsn

250-etrn

250-auth digest-md5 CRAM-MD5 LOGIN plain--certification should take effect

250-deliverby

Help

Quit

221 2.0.0 Localhost.localdomain Closing connection

Connection closed by foreign host.

7. Install Post Office service

[Root@localhost rpms]# RPM-IVH Dovecot-0.99.11-2.el4.1.i386.rpm--aid

Warning:dovecot-0.99.11-2.el4.1.i386.rpm:v3 DSA Signature:nokey, key ID db42a60e

Preparing ... ########################################### [100%]

1:PERL-DBI ########################################### [20%]

2:postgresql-libs ########################################### [40%]

3:mysql ########################################### [60%]

4:dovecot ########################################### [80%]

5:perl-dbd-mysql ########################################### [100%]

Install 1-5 of these software before you can go on,,,,

[Root@localhost/]# vi/etc/dovecot.conf Add imaps after protocols = IMAP POP3

Start the Dovecot service

[root@localhost/]# Service Dovecot Restart

Stopping dovecot Imap: [FAILED]

Starting Dovecot Imap: [OK]

[root@localhost/]# chkconfig--level dovecot on

Related Article

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.