Linux Open source mail system postfix+extmail+extman Environment deployment record

Source: Internet
Author: User
Tags imap perl interpreter all mail webmail server

First, the basic knowledge carding
MUA (Mail User Agent)
MUA is both a "mail user agent", because unless you can directly use software like Telnet to log in to the mail host, you will have to send mail to the email host through MUA. The most common MUA are the Thunderbird (Thunderbird) free software introduced by Mozilla, or the common Kmail for Linux desktop KDE, and Outlook Express (OE) for Windows widgets. The main function of MUA is to receive e-mail from the mail host, and to provide users with the ability to browse and write mail!

MTA (Mail Transfer Agent)
MUA help users to send mail to the mail host, the mail host if it can help users to send this letter, it is a mail delivery host (MTA)! This MTA means "mail transfer agent". As the name implies, since is the "transfer agent", then the user sent the letter, and the user to receive the letter, is to find it (MTA) is right! Basically, the functions of the MTA have these:
1) Accepting letters: Using Simple Mail Transfer Protocol (SMTP)
The main function of the MTA host is to collect incoming letters from the client or other MTA, at this time the MTA is using simple Mail Transfer Protocol (SMTP), which uses port 25.
2) transmitting letters
If the destination of the letter is not the user, and the relevant data of the letter complies with the power of the MTA, then the MTA transmits the letter to the next host. This is the function of the so-called transmitting (Relay).
3) Respond to user's request for credit
POP or IMAP protocol users can receive their own mail through the Postal Service agreement (post Office Protocol, POP) provided by the MTA host, or they can use the IMAP (Internet Message Access Protocol) agreement to Their letters remain on the mail host, and further establish the Mail data box and other advanced work.

In short, the generally mentioned Mail Server is the MTA! Strictly speaking, the MTA only refers to the SMTP protocol. The main suite of SMTP functions for the MTA includes veteran SendMail, rising star Postfix, and QMail, among others.

MDA (Mail Delivery Agent)
Literally means "mail delivery Agent". In fact, this MDA is a small program that hangs under the MTA, and the main function is to analyze data such as the header or content of the letter received by the MTA to determine the whereabouts of the message. Therefore, the above mentioned MTA's letter transmitting function is actually achieved by MDA. For example, if the MTA receives the letter with its own target, then the MDA will transfer the letter to the user's mailbox (Mailbox), if not? Then be ready to transmit it. In addition, MDA also has the function of analyzing and filtering mail. such as: filtering spam, automatic reply, automatic forwarding, etc...

The main MTA programs (Sendmail,postfix ...) have their own MDA function, but some plug-in program functions more powerful, for example, Procmail is a good helper for filtering, in addition Mailscanner + spamassassion can also Some of the MDA used Oh.

Mailbox
e-mail Box! Simply put, it is an account-specific letter to receive files. The default mailbox for our Linux system is placed in the/var/spool/mail/user account! If the MTA receives a letter that is the user of this machine, the MDA will send the letter to the mailbox!

POP3
(Post Office Protocol 3) is the 3rd version of the Post Office Protocol, which specifies how to connect a personal computer to an Internet mail server and an electronic protocol to download e-mail. It is the first offline protocol standard for Internet e-mail, POP3 allows users to store messages from the server on a local host (that is, their own computer) while deleting messages saved on the mail server, while the POP3 server is the receiving mail server that follows the POP3 protocol to receive e-mail.

Imap
Interactive Mail Access Protocol (interactive Mail Access Protocol) is a mail acquisition protocol developed by the University of Washington, USA. Its main role is that the mail client (for example, Ms Outlook Express) can obtain mail information from the mail server via this protocol, download messages, and so on. Both POP3 and IMAP describe how to remove a message from a mailbox.

Please note: Pop3/imap and SMTP can be built on different servers, and users who often use MUA will certainly remember that Pop3/imap and SMTP are often set up separately in the software's settings.

—————————— SMTP, POP3, ipmap description ——————————

Simply put: SMTP is the mail sending protocol; POP3 and IMAP are mail receiving protocols. of which: 1) The SMTP full name is "Simple Mail Transfer Protocol", the goal is to provide users with efficient and reliable mail transmission. It is a set of rules for sending mail from the source address to the destination, which controls how the message is relayed. The SMTP protocol is a TCP/IP protocol cluster that helps each computer find its next destination when sending or relaying letters. The SMTP server is the outgoing mail server that follows the SMTP protocol. SMTP authentication, in short, requires that the account name and password must be provided before the SMTP server can be logged in, which makes it possible for spammers to have no opportunity. The purpose of increasing SMTP authentication is to protect users from spam. 2) POP3POP3 is the abbreviation for post Office Protocol 3, the 3rd version of the Post Office Protocol, which specifies how to connect a personal computer to an Internet mail server and an electronic protocol to download e-mail. It is the first offline protocol standard for Internet e-mail, POP3 allows users to store messages from the server on a local host (that is, their own computer) while deleting messages saved on the mail server, while the POP3 server is a receiving mail server that follows the POP3 protocol. 3) The Imapimap full name is Internet Mail Access Protocol, the interactive Mail Access Protocol, which is one of the standard protocols for POP3-like messaging. The difference is that when IMAP is turned on, the messages you receive on the email client remain on the server, and the actions on the client are fed back to the server, such as deleting the message, marking the read, and so on, and the message on the server will also act accordingly. So whether you log in to the mailbox from the browser or the client software, you see the message and the status are consistent. The difference between ====================POP3 and IMAP ====================POP3 protocol allows e-mail clients to download messages on the server, but operations on the client (such as moving messages, marking read, etc.) are not fed back to the server. For example, the client collects 3 messages from the mailbox and moves them to other folders, and the messages on the mailbox server are not moved at the same time. While IMAP provides two-way communication between the webmail and the email client, the client's actions are fed back to the server, the messages are manipulated, and the messages on the server do the corresponding actions. At the same time, IMAP, like POP3, provides a convenient e-mail download service that allows users to read offline. The summary browsing feature provided by IMAP allows you to read all mail arrival times, topics,The sender, size and other information before making a decision whether or not to download. In addition, IMAP is better able to support access to new messages from multiple different devices at any time.

In short: IMAP as a whole provides users with a more convenient and reliable experience. POP3 is more likely to lose mail or download the same message multiple times, but IMAP avoids these issues well by using the bidirectional synchronization between the mail client and webmail. Note: If you set "save to sent" in the Web mailbox and send the message using the Client Pop service, the sent messages will automatically be synced to the "sent" folder in the Web-side.

NetEase 163 Free Mailbox related server information:

Maildirs
Maildirs is a very extensive e-mail storage format used. It can also be said to be a directory-based message storage format. It does not rely on application-level file locking to maintain message completion when it is added, moved, or deleted. Each message (each message) is saved in a separate, uniquely named file. All changes use file system-based atomic operations (atomic filesystem operations) so the file system controls file locking to avoid consistency issues. Typically Maildir is a directory (named Maildir) that contains three subdirectories, tmp,new and cur, respectively.

Courier IMAP
Courier IMAP server is a high-speed, extensible, enterprise-class IMAP servers that use the Maildir storage format. Many e-mail providers use courier IMAP server to process hundreds of thousands of of mail users, use it to build IMAP and POP3 collection proxies, and can say that courier IMAP server simply has unlimited level of scalability. In the proxy configuration environment, some courier servers provide IMAP and POP3 services, which wait for client login requests, locate and manipulate the mail user's mailbox, establish a proxy connection to the server, and all of these operations are in a separate, seamlessly connected process.

Courier-imap Main Features:
-Compact and efficient;
-Provide a variety of user authentication modules and methods;
-Support virtual mailbox;
-Can limit the total number of simultaneous logons of IMAP and the number of simultaneous logons of the same IP address, which can effectively protect the system from being overwhelmed by a denial of service (Denial-of-service) attack;

Maildrop
A mail delivery agent (MDA) with filtering capabilities.

Courier-authlib
The Courier authentication Library provides validation services for other Courier applications.

SASL
The English name of SASL is simple authentication and security layer, that is, simply verify and secure layers. The SMTP protocol does not provide user authentication, and it is easy to relay messages anonymously. It is not secure even if the network segment that can be forwarded is restricted. His definition is: a method for adding authentication support to connection-based protocols, which provides authentication capabilities for connection-based protocols. SASL is a glued (glue) library that integrates application layers with a variety of authentication systems. This is somewhat similar to Pam, but the latter is the authentication method that determines who can access what services, while SASL is the authentication process, which focuses on the trust-building process, which can call Pam to establish a trust relationship.

What is Open-relay?
Open-relay (open forwarding or anonymous forwarding) is the function of forwarding (Relay) All inbound messages because the mail server ignores whether the sender or recipient of the message is the user set by the system. Generally, if this feature of the mail server is open, we generally call this mail server Open-relay.

Because Internet e-mail uses open standards, the MTA, MDA, MUA and other roles can be played by a number of different software packages, respectively. Different packages that implement the same protocol can communicate with each other, regardless of what system they are running on. If a complete e-mail system is concentrated together, you can find that the processing of SMTP is a set of software, processing Pop/imap is another set of software. But each role in the messaging system has a number of different software options to choose from.

II. Postfix+extmail+extman Environment deployment process
1) Basic Environment Preparation

[[email protected] ~]# cat/etc/redhat-release CentOS release 6.9 (Final) [[email protected] ~]# Ifconfig|grep                                                          Addr|grep bcast|cut-d ":"-f2|awk-f "" ' {print $} ' 192.168.10.202[[email protected] ~]# hostname mail.kevin.com[[email protected] ~]# cat/etc/hosts127.0.0.1 localhost localh Ost.localdomain localhost4 localhost4.localdomain4::1 localhost localhost.localdomain localhost6 Localhost6.locald omain6192.168.10.202 mail.kevin.com[[email protected] ~]#/etc/init.d/iptables stop[[email protected] ~]# Setenforce 0[[email protected] ~]# getenforce [[email protected] ~]# cat/etc/sysconfig/selinux ... selinux=disabled Software deployment instructions------------------------------------------------------------------------------software name               can postfix mtamysql storage postfix Virtual user information courier-authlib with SASL do authentication Cyrus-sasl Combine application (e-mail) with validation (Courier-authlib) cOurier-imap combined with Postfix provides imap/imaps and pop3/pop3s service Perl interpreter PCRE Install IMAP required-- Perl-compatible Regular Expressions httpd Web server extmail Webmail server Extman with extmail manage mail users Clama V Antivirus amavisd-new scan mail virus spamassassin anti-spam

Linux Open source mail system postfix+extmail+extman Environment deployment record

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.