How does the Postfix virtual domain work?

Source: Internet
Author: User
Tags email account mail account

Understanding how a virtual domain works is important to understanding how our virtual mail system is established. There are two domain types in Postfix.

Local Region: all regions specified by mydestination are treated as local regions by Postfix. Emails in the local region are sent to users in the/etc/passwd file and stored in the/var/mail directory.
 
Virtual domain: in addition to the local region, the postfix can also send letters to the virtual domain. Different from the current region, Postfix allows us to operate virtual domains in a flexible way. The advantage is that we do not need to create a system account for each email account in the/etc/passwd file. This provides a simple way for our mail system to control thousands of mail accounts. We used the mappings we discussed earlier to control mail account information. You can use MySQL, PostgreSQL, or LDAP to manage email accounts. In the system we installed, use the MySQL background to manage the email account of the virtual domain

Postfix uses two different categories to control virtual domains. You need to understand how they work.

Virtual alias domain: it is used to forward alias emails from one email address to another. This type of domain can be used as a receiving mailbox and stored on your hard disk. In your system, virtual alias domains are not required. We can use a virtual alias ing table to replace virtual alias domains, even those that do not appear in the virtual alias domain. The virtual alias ing table is a common redirection ing table. The role of this table is (the virtual_alias_maps is a general-purpose redirection mapping that works for everything that passes your system including local domains .)

Virtual mailbox domain: 'postfix uses these domains to receive emails from users in the domain and save the emails to the hard disk mailbox. This is a parameter that tells the Postfix that the mails in the receiving domain coexist in the mailbox of each user. Postfix uses the ing of the virtual alias ing table to determine the location of the mailbox on your hard disk. Remember, you can still use the ing of the virtual alias ing table to forward an email to another mailbox or external email address. Therefore, not every domain user must have an actual mailbox, but simply forward the email to other places.

understanding a domain must be a virtual alias domain. It is important to have a virtual mailbox domain or a local region. If you set a domain as a virtual alias, you cannot receive emails for this domain on your server. On the contrary, you can use a virtual alias ing table to forward? Action = attachfile & Do = get & target = alias email for both types of domain. Therefore, the virtual mailbox domain can be used more flexibly.
A domain is either virtual or local. You cannot make a domain have two features at the same time. Therefore, if you want your default domain to be virtual, you must delete it in the definition of mydestination. Set mydestination = localhost or nothing. The address like root @ localhost will be sent to the local root user.

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.