Mail server under Linux

Source: Internet
Author: User
Tags aliases dovecot mx record

Now that you summarize the mail server under Windows, the mail server under Linux also summarizes it.

In the vocational skill competition, the mail server is the same as the Linux and Windows principles, but the way of implementation is different, windows2003 is generally installed and configured SMTP and POP3 services, Linux is typically configured with SendMail (which acts as an SMTP protocol) and Dovecot (which acts as a POP3 protocol) for both services. Of course, the Windows Exichange server in the real environment used more, but the scope of this limited in the secondary job will not repeat.

Key points of the Linux mail server:

1. Fixed IP address and correct DNS server

2.DNS server configured the correct domain name, such as [email protected] domain name is abc.com, and has the correct host and MX record.

3. Need to install the necessary mail server software in Linux.

SENDMAIL-CF: Provide SENDMAIL.CFThe default consolidation data for this file
M4: Auxiliary will sendmail.cfdata into the actual available configuration file
SendMail: Provide the main sendmailprograms and Settings files
Dovecot: Provide POP3 service

4. Edit the SendMail configuration file/ETC/MAIL/SENDMAIL.MC, change the following two:

Uncomment the two lines of "Trust--auth--mech" in 1 (remove the dnl# before this line)

650) this.width=650; "title=" sendmail-1.jpg "style=" Float:none "src=" http://s3.51cto.com/wyfs02/M00/27/6B/ Wkiol1ny1u3boeecaaiq2pu5dpu589.jpg "alt=" Wkiol1ny1u3boeecaaiq2pu5dpu589.jpg "/>

The addr=0.0.0.0 in the change, which is SMTP binding on all IP addresses on this computer.

650) this.width=650; "title=" sendmail-2.jpg "style=" Float:none "src=" http://s3.51cto.com/wyfs02/M02/27/6B/ Wkiom1ny1xna8ij1aahvyjxpufs783.jpg "alt=" Wkiom1ny1xna8ij1aahvyjxpufs783.jpg "/>

5. Edit the/etc/mail/locate-host-names file, add Zone domain name: mail.abc.com,

Note that this domain name is the domain name of the mail server, and can add multiple domain names, which is also the difference between Linux and Windows Mail server, Linux next user can display belong to more than one mail domain.

650) this.width=650; "title=" local-host-name.jpg "src=" http://s3.51cto.com/wyfs02/M01/27/6B/ Wkiol1ny1v2gqotnaacu20pb3co698.jpg "alt=" Wkiol1ny1v2gqotnaacu20pb3co698.jpg "/>

6. import with command M4 SENDMAIL.MC >sendmail.cf

7. Edit the file accessto add the network segment and hostname you want to relay.

This file is similar to the remote domain in the SMTP server in Windows, but includes the domain name and network segment that is forwarded to.

650) this.width=650; "title=" access.jpg "src=" http://s3.51cto.com/wyfs02/M00/27/6B/ Wkiom1ny1zfzegeeaafo5wlggne723.jpg "alt=" Wkiom1ny1zfzegeeaafo5wlggne723.jpg "/>

8. Use the command makemap hash access.db < access import.

service: edit

Configures the protocol that the Dovecot server runs.

650) this.width=650; "title=" dovecot.jpg "src=" http://s3.51cto.com/wyfs02/M00/27/6B/ Wkiom1ny1awwdj6laafsqve2qgu909.jpg "alt=" Wkiom1ny1awwdj6laafsqve2qgu909.jpg "/>

Using netstat-ntpl|grep110, check that the dovecot is already listening on port 110.

Restart services: Service sendmail restartservice dovecot Restart

11.

Create user group: Groupadd mailuser

Create user User1 , User2 .... Useradd–g mailuser user1useradd–g mailuser user2

Set password for user: passwd user1 , Passwduser2

12. Set up aliases for messages

The mail alias and bulk messaging features are implemented using the aliases mechanism, which contains two files/etc/aliases and /etc/aliases.db.

the file record format in aliases is name:addr_1 addr_2 addr_3

Set mail alias: Admin:mike; set Mike's alias is admin

Set mail mass: Mailuser:mike John, Mike and John's group named Mailuser

After modifying the aliases file, update the aliases.db file using the command, newaliases.

Mail is placed by default in directory/var/mail. The disk quotas for SendMail are explained next.

This article is from the "Crazy_qiao" blog, make sure to keep this source http://25167.blog.51cto.com/15167/1410925

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.