📜 ⬆️ ⬇️

Connect external mailboxes to Zimbra

Few large enterprises can boast that they were large initially. Many large retail chains, integrators, developers and ISPs started their business from small offices and a couple of dozen employees who worked hard on the future success of their company. Of course, in such small enterprises it is extremely rare to raise the question of implementing your own mail server or collaboration system, and employees' mailboxes, as a rule, are set up in public email services like Yandex mail or gmail. However, when an enterprise reaches a certain stage in its development and comes to the need to create its own Zimbra-based mail server, the question arises of connecting old mailboxes to new accounts.

image

Since the development of an enterprise almost always implies an active advertising campaign on the Internet, the distribution of business cards with e-mail, as well as the addition of a postal address to various directories, the flow of letters from potential or active customers usually does not diminish even years after the change of the actual postal address. Of course, you can charge the employee with a daily check of the old mailbox, but a smarter solution would still be to combine the two mailboxes into one. In addition to saving staff time and effort, this solution will help to quickly move to a new mailbox, because now the answer to each letter will come from a new email address.
')
The simplest option for connecting an external mailbox to Zimbra at first glance seems to be setting up mail forwarding from the old account to the new one. However, this method is fraught with a number of problems. In particular, due to the spam filter and anti-virus built into Zimbra, a letter or some attachments may simply not reach the new address. In addition, some services may simply not support sending e-mails, and even relying on them in such an important matter is also not the best idea.

That is why the most correct would be to assign the task of receiving mail from external mailboxes to the server controlled by you. However, there is a small problem, because there are no built-in utilities for working with external mailboxes in the Zimbra Collaboration Suite. However, this will not be a big problem, because Zimbra can work fine with third-party programs and utilities. That is why to get mail from external addresses you can use the program fetchmail , which is available in the repositories of most Linux distributions.

After the package manager completes the installation of fetchmail, it will be necessary in the / etc / default / fetchmail file to bring to the following form and, if necessary, uncomment the lines START_DAEMON = yes and set daemon 600 . In the first line we allow the launch of fetchmail as a system service, and in the second we set the interval for accessing mail to an external mailbox in seconds. In this case, this parameter is 600 seconds and this means that the mailbox will be automatically checked every 10 minutes. This interval can be increased to reduce the load on the server, and can be reduced, if you want the letters to come as quickly as possible.

After that, it remains only to specify in fetchmail the data to connect to external mailboxes. For example, suppose that the utility will connect to the box manager@gmail.com , and then forward mail to manager@company.ru . To do this, we need to first create the fetchmail configuration file, and then make a number of edits. This can be done with the command cp /usr/share/doc/fetchmail/examples/fetchmailrc.example / etc / fetchmailrc

After that, open the / etc / fetchmailrc file in any text editor and set the parameters for connecting to external mailboxes at the end of the file, the authorization data of our external mailbox:

poll imap.gmail.com protocol IMAP user manager@gmail.com is manager@company.ru here password ********* keep ssl 
After that, it remains only to restart fetchmail by sequentially entering the service fetchmail stop and service fetchmail start commands, and then check the operation of the service by sending a test letter to an external mailbox. Thus, even after implementing your own Zimbra mail server in the enterprise, you can save the company from having to inform customers about the change of the mailing address.

Source: https://habr.com/ru/post/442536/


All Articles