I have a Google Workspace email account and mailcow running on a compute VM. I have setup Google relay server for outgoing emails from Mailcow and on Google Workspace I have set up split-delivery to receive

Google workspace: user1@domain.com
mailcow: user2@domain.com
external: user3@gmail.com

  • Emails from mailcow account to other mailcow accounts-> no issues
  • Emails from mailcow account to external email accounts and vice versa -> no issues
  • Emails from Google workspace account to mailcow account -> no issues
  • Emails from external email accounts to Google workspace account and vice versa -> no issues

Failure

  • Emails from mailcow account to a Google workspace account, where both have the same domain
    In the logs, I see mailcow not using the relay and just doing a MX lookup and trying to connect on port 25 which is blocked on all Google compute VMs and so it times out.
    4AA37100E28: to=user1@domain.com, relay=none, delay=1937, delays=1787/0.01/150/0, dsn=4.4.1, status=deferred (connect to alt4.aspmx.l.google.com[172.217.197.26]:25: Connection timed out)

Here is an example log of sending an email to an external email address where the SMTP relay is used correctly and the mail is sent:
DBC78100DC1: to=user3@gmail.com, relay=smtp-relay.gmail.com[74.125.124.28]:587, delay=0.73, delays=0.5/0.05/0.06/0.12, dsn=2.0.0, status=sent (250 2.0.0 OK 1706830772 bm12-20020a056e02330c00b0036396107e28sm36967ilb.3 - gsmtp)

How can I fix the above issue and make sure every single email, whether its within the domain or to external gets sent through the SMTP relay?

Thank you
Shri

Have something to say?

Join the community by quickly registering to participate in this discussion. We'd like to see you joining our great moo-community!

10 days later
No one is typing