
GoogleApps + Postfix + Fetchmail (preparation)
Why all this
So, again about the eternal, about the organization of the mail server in the organization of medium size. It would seem that this is complicated, you take any Linux distibutive, put any time-tested package of mail programs (MTA, MDA, antivirus, antispam) and forget about it. But instead of having a sweet life, you immediately receive spam flows both at the input and at the output (if the health of your internal network leaves much to be desired). And at the same time, user complaints about spam, non-sending mail, etc. System administrators-beginners can give up here. But, there is a simple and quite elegant way out of this situation - to call Big Brother for help, that is Google, and hide behind his broad shoulders. In the proposed solution, Google services are used as backup mail storage, a spam filter and an antivirus, which they can handle and do fine,This path may also be of interest to organizations engaged in the transition to open source software. Indeed, why pay for an extra Windows license and an Office license on an employee’s computer if the same functionality can be arranged on free software (we will work with mail using Mozilla ThunderBird and the address book on LDAP). In addition, this is not the only savings item; we will not forget about saving on anti-virus and anti-spam software. I am not talking about the increasing reliability of the mail system - the number of calls about problems with the mail has been significantly reduced.
One of the most important ingredients of our recipe is a domain name and the ability to change its DNS records. I think, in most cases, this issue is resolved, otherwise what kind of organization is it that sends mail from public mailboxes. And we need a domain name to change the MX record and pass our mail through Google, which has interesting services for this. For medium-sized organizations, a free package is enough for the eyes, even if you are not worried about the restriction on 50 accounts, there is also a mechanism for mail aliases that can be created up to 30 pieces per account. Total number of valid mailbox names is 30 * 50 = 1500. And this is something.
Where to begin
And it’s worth starting with determining your desires. In many ways, of course, they are dictated by the historical development of the company's IT infrastructure, but I think that the option proposed below will have sufficient generality.So, we divide users into groups:
- 1. Office users are regular users of the head office local area network.
- 2. Users at branch offices are usually external small groups of users of an organization of 5–20 people, united in their local network.
- 3. Mobile users are users of the organization who should be able to access their mail from anywhere using the most flexible and reliable technology possible.
- 4. External users - users of other organizations, contractors of our mail system.
For my organization, a system with centralized storage of all organization mail, using email clients (ThunderBird) and backup access to mail via the web interface (IlohaMail) came up. For scalability, I had to store the mail directory on the LVM partition so that I could connect new drives to increase the size of the storage.
General solution scheme

The scheme provides for the presence of mobile mail users who communicate with the internal Postfix server through the forwarded POP3 or IMAP ports. For known ip-addresses (branches) may be open SMTP access to the internal server.