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