"transient error (421): 4.7.0" when forwarding emails to Gmail

The root of this problem lies with the original sender domain, which needs to rectify its DMARC alignment. Hopefully, this issue is temporary and will be resolved within the next month.

In the interim, I’ve found a workaround by utilizing a Cloudflare email worker:

The worker redirects messages to another mailbox address if gmail rejects them. Subsequently, gmail retrieves the messages from the alternative mailbox using POP3.

Here’s the code for the worker:

export default {
  async email(message, env, ctx) {
    await message.forward("your gmail address").catch((err) => {
      return message.forward("your alternative mailbox address");
1 Like