1. Knowledge Base
  2. MDaemon® Email Server

How to integrate Google Drive access in MDaemon Webmail

First available in MDaemon 23.0.0, Webmail users can be configured to integrate access to Google Drive. Follow the steps below setup the integration.

  1. Create a Google account or login to an existing account.
  2. Go to the Google API Console using the link below.
  3. Click Create Project under  Enabled APIs & services
  4. Create a name for the project.
    • For example, MDaemon MD Webmail
  5. If you have an organization, fill in the Location field.
  6. Click Create
  7. Click + Enable APIs and Services
  8. In the search field, type Google Drive and select Google Drive API
  9. Click Enable on the Google Drive API page.
  10. Click Credentials in the API APIs & Services menu
  11. Click + Create Credentials and then API Key in the dropdown list.
  12. Copy the generated API Key
  13. Click OAuth consent screen in the API APIs & Services menu.
  14. Under User Type, choose External.
    • You will need to add each user that wants to make use of the Google Drive integration in Webmail.
    • In the case that you do have an organization, choosing Internal is the better option.
  15. Click Create
  16. For the App information, use a unique name for the app.
    • It can be the same as the name you chose for the Project.
  17. Select a User support email address from the drop down list. 
  18. No logo is required, however feel free to use your company logo.
  19. In the App domain section, use your terms of service link from MDRA (if configured) and you can create a Privacy Policy in MDRA and get a link to it from there as well.
  20. Add MDaemon domains in the Authorized domains section. 
  21. Enter at least one email address to the Developer contact information text box. 
  22. Click Save and Continue
  23. Click Add or Remove Scopes
  24. Copy and paste the following scopes in Manually add scopes text area.

  25. click Add To Table
  26. Click Update
  27. Click Save and Continue
  28. Click Add Users
    • Add the users you want to be able to use the feature. Must be gmail addresses.
  29. Click Save and Continue
  30. Click Credentials in API APIs & Services menu.
  31. Click + Create Credentials and then OAuth client ID in the drop down.
  32. Choose Web application from the Application type drop down.
  33. You can use the same name again.
  34. Under Authorized redirect URIs, Click +Add URI
    1. The URI looks like this: https://YOUR_FQDN/WorldClient.dll?View=OAuth&AuthRequest=GoogleDrive
    2. An example can also be found in MDaemon Remote Administration (MDRA) at Main | Webmail Settings | Google Drive
  35. Click Create
  36. Copy the Your Client ID and Your Client Secret values.

In MDaemon Remote Administration:

  1. Select Main
  2. Select Webmail Settings
  3. Select Google Drive
  4. Check the Enable Google Drive Integration option.
  5. Enter the API Key, Client ID, and Client Secret in their respective fields.
  6. (Optional) Add a privacy policy by clicking on Edit text of privacy policy.
  7. Click Save

When a valid user wants to integrate with Google Drive:

  1. Login to Webmail
  2. Click Settings
  3. Click Cloud Apps
  4. Click Setup Google Drive
  5. Review the information and click Connect to GoogleDrive.
  6. Choose the Google Account and choose what Webmail can Access.
  7. Click Continue
  8. When you see the window below, the setup process is complete.

To Disconnect Google Drive integration:

  1. Login to Webmail
  2. Click Settings
  3. Click Cloud Apps
  4. Click Disconnect Google Drive

To save an email attachment to Google Drive using a connected account (Pro theme):

  1. Login to Webmail 
  2. Open a message with an attachment.
  3. Click on the Google Drive icon next to the attachment name. 
  4. Click Yes to confirm saving the attachment to Google Drive.
  5. You'll see a pop-up notification in Webmail stating the attachment was saved.