Building a Linux e-mail server

Source: Internet
Author: User
Tags stdin email account imap port

e-mail Server Setup

Basic features of the e-mail server:

Provide users with e-mail storage space (user @ email domain name)

Process user-Sent messages-delivered to the mailbox

Process messages received by users--post received email

Protocol for users to send mail: SMTP port 25

User-received mail protocol: POP3 Port 110,imap Port 143

Build a basic mail server

1. Installing the Postfix service-side program

2. Configure the Postfix service to modify the configuration file/etc/postfix/main.cf

Vim/etc/postfix/main.cf

Myhostname=abc.example.com Specifying host Name

mydomain=example.com Specify Domain name

myorigin=abc.example.com message suffix for default completion

Inet_interfaces=all Allow all clients

mydestination=abc.example.com to determine message suffix for this domain

3. Restart the Postfix service and set it to start.

Systemctl restart Postfix

Systemctl Enable Postfix

4. Test Mail for compliance

Useradd YG

Echo 123 | passwd--stdin YG

Useradd XLN

Echo 123 | passwd--stdin XLN

Mail letters

Format: Mail-s ' message header '-R sender Recipient

Mail Receive Letter

Format: Mail-u user name

Example: mail-s ' haha '-R YG Xln (sending)

Content..............

Mail-u xln (Mail)

Quit (quit)

Nullclient Mail Service

Empty client:

No email account is provided, so no mail is required.

However, you can send mail for the user.

First, install the postfix.

Second, configure the Postfix service, modify the configuration file.

Vim/etc/postfix/main.cf

myorigin=xixi.example.com message suffix for default completion

Inet_interfaces=all Allow all clients

mydestination=xixi.example.com to determine message suffix for this domain

Third, restart the Postfix service, set the boot start.

Four, configure the empty client mail server.

Vim/etc/postfix/main.cf

myorigin=xixi.example.com message suffix for default completion

Inet_interfaces=localhost only allow local clients

mydestination= does not determine mail suffix for this domain mail

RELAYHOST=[172.25.0.10] Specifies the IP address to be given to the mail server

Five, restart the Postfix service.

VI. Testing

Send Mail on an empty client

Example: Echo Hello | Mail-s ' Huhu '-R YG Lisi

Lisi user mail server to create this user first

Receiving mail from a mail server

Example: Mail-u Lisi


Building a Linux e-mail server

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.