Atlassian uses cookies to improve your browsing experience, perform analytics and research, and conduct advertising. Accept all cookies to indicate that you agree to our use of cookies on your device.
Atlassian cookies and tracking notice, (opens new window)
Atlassian uses cookies to improve your browsing experience, perform analytics and research, and conduct advertising. Accept all cookies to indicate that you agree to our use of cookies on your device. Atlassian cookies and tracking notice, (opens new window)
🔍 Discover Our Product Documentation

Email Gateway Defense
Results will update as you type.
  • Release Notes
  • Upcoming Change with Admin Sender Policies to Override User Policies
  • How to Protect Against Gateway Bypass and Direct Send Risks
  • Getting to Know Email Gateway Defense
  • Getting Started
    • MX Deployment vs. Inline Deployment in Email Gateway Defense
    • How to Configure MX Records to Direct Mail Flow to Barracuda
    • How to Manage MX Records With the Setup Wizard
    • Microsoft 365 Deployment
    • Google Workspace Deployment
      • Step 1 - Set Up Email Gateway Defense for Google Workspace
      • Step 2 - Configure Google Workspace for Inbound and Outbound Mail
    • Amazon WorkMail Deployment
    • Exchange 2016 and Newer Deployment
  • Moving from Barracuda Email Security Gateway to Email Gateway Defense
  • How the Service Works
  • Email Gateway Defense IP Ranges Used for Configuration
  • Partner Accounts
  • Sender Policy Framework for Outbound Mail
  • How to Set Up MX Records for Domain Verification
  • Security Warnings
  • Understanding User Accounts
  • Sender Authentication
  • Inbound Filtering Policy
  • Outbound Filtering Policy
  • Advanced Configuration
  • Managing Domains
  • Logs and Reports
  • User Guides
  • Tools and Add-Ins
  • API Overview
  • Troubleshooting, Error Messages, and Additional Tips
  • Known Behaviors and FAQs
  • Online Service Terms

    You‘re viewing this with anonymous access, so some content might be blocked.
    /
    Step 2 - Configure Google Workspace for Inbound and Outbound Mail
    Published Nov 14

    Step 2 - Configure Google Workspace for Inbound and Outbound Mail

    Subscribe

    To deploy Email Gateway Defense with Google Workspace, you must have a Google Workspace Basic, Business, or Enterprise account. The G Suite legacy free edition is no longer available and is missing key features required for this deployment. For details on upgrading your Google Workspace subscription, refer to the Google Support article Upgrade from G Suite legacy free edition.

    Google IP addresses and user interfaces can change; refer to the Google Workspace Administrator Help Center for updates and configuration details.

    You can specify Email Gateway Defense as an inbound mail gateway through which all incoming mail for your domain is filtered before reaching your Google account. Email Gateway Defense filters out spam and viruses, then passes the mail on to the Google mail servers. Use the Configure Inbound Mail Flow instructions below to configure.

    You can also specify Email Gateway Defense as the outbound mail gateway through which mail is sent from your domain via your Google account to the recipient. As the outbound gateway, Email Gateway Defense processes the mail by filtering out spam and viruses before final delivery.

    By configuring Google as described in Configure Outbound Mail Flow below, you instruct the Google mail servers to pass outgoing mail from your domain to Email Gateway Defense (the gateway server). Google-generated notification messages, such as file-sharing notifications sent from google.com, bypass Email Gateway Defense and are sent directly to the internet.

    • 1 Step 1. Launch the Email Gateway Defense Setup Wizard
    • 2 Step 2. Add Additional Email Domains (Optional)
    • 3 Step 3. Configure Inbound Mail Flow
    • 4 Step 4. Internal Mail
      • 4.1 Step 1. Create a Local Host
      • 4.2 Step 2. Create Routing Rule
    • 5 Step 5. Configure Sender Policy Framework for Outbound Mail
    • 6 Step 6. Configure Outbound Mail Flow (Optional)
      • 6.1 Step 1. Add Outbound Smarthost
      • 6.2 Step 2. Create Outbound Routing Rule

    Step 1. Launch the Email Gateway Defense Setup Wizard

    Note that after verifying your domain, any mail sent to your domain from another Barracuda Email Gateway Defense customer will be processed normally by your Email Gateway Defense account and not delivered via MX records.

    1. Log in to Barracuda Cloud Control. If this is your first time launching the Email Gateway Defense setup wizard, you will be redirected to the Barracuda Trials Hub page. Click Open under Email Security.

       

      Alternatively, if you have started the setup wizard but did not complete it, after logging into Barracuda Cloud Control, select Email Gateway Defense on the left side. In the top yellow banner, click Set Up Now to launch the setup wizard.

      The Email Gateway Defense wizard launches. 

    2. Click Next in the upper right corner to get started.

    3. Click Skip on the Connect to Microsoft screen. Select Okay to continue without Microsoft.

    4. Select the Region for your data center. Then click Next.

      dataRegion.webp

      After you select your region, you cannot change it.

    5. Enter a valid email address from the email server domain you want to protect with Email Gateway Defense. Click Detect email server.

    6. The system automatically auto-fills your destination mail server. If this is not the correct server, click Edit, enter the correct details, and then click Update.

    7. After you have determined that the settings are correct, click Verify server. 

    8. egd_setupWizard_verifyDomain.png

      Note that mail servers can take up to 48 hours to be discoverable for new domains.

    9. Once your email server is verified, a green verified check markgreen-check01.pngwill appear next to your domain. Click Next.

    10. To set up your email flow, you will need to add the new MX records and remove the old MX records.

    11. To add the new MX records:

      1. Log in to your DNS hosting account.

      2. Add the primary and backup MX records shown in the Add new MX records section. Instructions for your DNS hosting provider will vary; you can use search terms such as add, edit, manage, or MX records.

        EGD_setupWizard_addMXrecords.png

         

      3. Add the MX records with a low priority, for example, 99. Adding the new MX records to your existing list should look similar to this:

        egd_wizard_addMXrecords1.png

        After updating your MX records, allow at least 24-48 hours before completing the next step to allow time for your changes to propagate.

      4. Verify that the new Email Gateway Defense MX records have been added by clicking on the Verify records button. 

      5. Once your MX records are added, a green verified check markgreen-check01.pngwill appear next to the MX record.

    12. To remove the old MX Records:

      1. Log in to your DNS hosting account.

      2. Remove the existing MX records shown in the Remove old MX records section. Instructions for your DNS hosting provider will vary; you can use search terms such as add, edit, manage, or MX records.

        mxRecords.png
      3. Update the priority of your primary and backup Barracuda MX records to 1 and 10. 

      4. In the Email Gateway Defense wizard, verify that your non-Barracuda Networks MX records have been removed by clicking on the Verify update button.

      5. Once your MX records are removed, a green verified check markgreen-check01.pngwill appear. 

    13. After you have successfully completed all the steps in the Email Gateway Defense setup wizard, click the Complete setup button at the upper right corner. To exit the wizard and come back at a later time, click Exit. 

    Step 2. Add Additional Email Domains (Optional)

    You configured your primary email domain in Step 5 of the wizard, above.

    Use the steps in the following section if you want to protect additional domains with Email Gateway Defense. If you are only protecting one domain, continue below with Step 3. Configure Inbound Mail Flow. 

    1. Log in to the Barracuda Cloud Control as administrator. In the left panel, click Email Gateway Defense. Select the Domains tab, then click Add Domain.

    2. Enter the domain name and, in Mail Server, enter smtp.google.com.

      googleMailServer.jpg
    3. Click Add Domain; the Domain Settings page displays, listing the new domain.

    4. Select Domains in the left-hand navigation menu.

    5. Click Verify Ownership and select one of the three methods to verify your domain.

      verifyOwnership.jpg

       

    6. Repeat these steps, as needed, for additional domains before continuing with Step 3 below.

    7. After the mail server is verified, the Verified icon displays in the Status column and a confirmation message displays at the top of the page.

    Step 3. Configure Inbound Mail Flow

    Before completing the steps in this section, verify your MX records display in the Email Gateway Defense MX records; otherwise mail delivery issues may be introduced.

    1. Log in to the Google Workspace admin console at https://admin.google.com.

    2. From the Home page, go to Apps > Google Workspace > Gmail.

    3. Select Spam, Phishing and Malware from the list.

    4. Click Inbound gateway, and select the Enable check box.

    5. Click Add under Gateway IPs.

    6. Enter the IP address/range for your Barracuda Networks region.
      For example, if you are in the US region, type 209.222.82.0/24, click Save. For other regions, refer to the IP addresses listed in Email Gateway Defense IP Ranges Used for Configuration.
      To add another IP address/range, click Add and type in the IP address/range. Click Save again.

    7. Select the following options:

      1. Automatically detect external IP (recommended)

      2. Require TLS for connections from the email gateways listed above

    8. Click Save.

    Step 4. Internal Mail

    By default, your internal mail is sent out to your inbound MX record, which points to Email Gateway Defense. This is by design for Google mail systems. To ensure that your internal mail stays internal, you must create a routing rule.

    To configure a routing rule, follow the instructions below:

    Step 1. Create a Local Host
    1. Log in to the Google Workspace admin console at https://admin.google.com.

    2. From the Home page, go to Apps > Google Workspace > Gmail.

    3. Click Hosts.

    4. Click Add Route. Enter a route name. For example, Internal Mail.

    5. Select Single host and enter the following details:

      1. Hostname – smtp.google.com

      2. Port – 25

    6. Under Options, select the following:

      1. Require mail to be transmitted via a secure (TLS) connection (Recommended)

      2. Require CA signed certificate (Recommended)

      3. Validate certificate hostname (Recommended)

        singleHost.png
    7. Click Save.

    Step 2. Create Routing Rule
    1. Navigate to Apps > Google Workspace > Gmail.

    2. Click Routing at the bottom of the page.

    3. Under the Routing section, click Configure.

    4. Enter a name for the rule. For example, Internal Mail.

    5. Under Email messages to affect, select Internal outbound.

    6. Under For the above types of messages, do the following, click the Down arrow and then select Modify message.

      1. Select Change route.

      2. From the list of options, select the host you created above in Step 1. Create a Local Host.

    7. Under Select all account types this action should apply to, select Active user and Group.

      internalOutbound.png
    8. Click Save.

      The new rule displays in the Routing section.   

    Step 5. Configure Sender Policy Framework for Outbound Mail

    To ensure Barracuda Networks is the authorized sending mail service of outbound mail from Email Gateway Defense, add the Sender Policy Framework (SPF) record INCLUDE line of the SPF record for your sending mail server for each domain sending outbound mail. See Sender Policy Framework for Outbound Mail for INCLUDE entries based on your Barracuda Networks instance.

    For example, your record will look similar to: v=spf1 include:_spf.google.com include:spf.ess.barracudanetworks.com -all

    • If you have an SPF record set up for your domain, edit the existing record, and add the following to the INCLUDE line for each domain sending outbound mail based on your Barracuda Networks instance. For example: include:spf.ess.barracudanetworks.com -all

    • If you do not have an SPF record set up for your domain, use the following value to create a TXT record that creates a HARD Fail SPF for your domain based on your Barracuda Networks instance. For example: v=spf1 include:spf.ess.barracudanetworks.com -all

    For more information, see Sender Authentication.

    Step 6. Configure Outbound Mail Flow (Optional)

    In certain situations, customers using Barracuda Networks to filter outbound emails may find that specific messages are restricted from being relayed. This occurs because Google does not support Sender Rewrite Scheme (SRS), and Barracuda Networks does not allow relaying for unverified domains. Because Google notification emails are sent from google.com (which is not a verified domain in your Email Gateway Defense account), they cannot be relayed through the Email Gateway Defense smarthost.

    To address this, configure Google Workspace to route outbound mail using routing rules. These rules route outbound email from your verified domain through Email Gateway Defense while allowing Google notification emails (such as Google Drive file-sharing notifications) to bypass outbound relay and be sent directly to the internet.

    Note: If you were previously using the default outbound configuration for routing, you must remove that setup before establishing mail flow rule routing.

    Step 1. Add Outbound Smarthost
    1. Log in to the Google Workspace admin console at https://admin.google.com and navigate to Apps > Google Workspace > Gmail > Hosts (or go directly to https://admin.google.com/ac/apps/gmail/hosts).

    2. Click Add Route.

    3. Enter a route Name. For example, Barracuda Outbound Smarthost.

    4. For Specify email server, select Single host, and enter the outbound hostname provided for your domain in Email Gateway Defense. Enter 25 for the port number.
      Tip: In Email Gateway Defense, go to the Domains tab and copy your outbound smarthost from the MX records.

    5. Under Options, select the following:

      • Require mail to be transmitted via a secure (TLS) connection (Recommended)

      • Require CA signed certificate (Recommended)

      • Validate certificate hostname (Recommended)

    6. Click Test TLS connection to verify the connection to the receiving mail server.

    7. Click Save.

    google_AddSmarthost.png
    Step 2. Create Outbound Routing Rule

    Note: The instructions below bypass notification emails sent from google.com, such as Google Drive file-sharing notifications. Depending on the specific email types you need to bypass, you can add additional criteria as needed.

    1. In the Google Workspace admin console, navigate to Apps > Google Workspace > Gmail > Compliance (or go directly to https://admin.google.com/ac/apps/gmail/compliance).

    2. Under Content compliance, click Configure (or click Add Another Rule if an existing rule is already configured).

    3. Enter a name or description for the rule. For example, Route Outbound Mail through Barracuda.

    4. Under Email messages to affect, select Outbound.

    5. Under Expressions, click Add to add a new condition.

    6. In the pop-up window, select Advanced content match.

    7. Configure the following fields:

      1. Location – Select Sender header.

      2. Match type – Select Not contains text.

      3. Content – Enter google.com.

        google.webp
    8. Click Save to save the expression.

    9. In the main window, under If the above expressions match, do the following:

      1. Under Route, select the Change route check box.

      2. From the drop-down list, select the host route you created in Step 1. Add Outbound Smarthost.

        changeRoute.webp
    10. Click Save.


    We value your feedback.
    If you have questions, suggestions, or feedback on our documentation, contact the Campus Product Documentation team.
    For general product inquiries or technical support, please contact the global Barracuda Support team.

    {"serverDuration": 11, "requestCorrelationId": "6d036560adaa4071941ffe6c57a19f18"}