Cannot delete Gmail account

Hi there,

I cannot delete the gmail account integration from Zammad. Until recently i was using gmail, to receive emails from an actual pop3 account and then Zammad on top, to receive the email from gmail.

Because gmail took time to receive the emails some time, I removed the gmail from the equation.
So I tried to setup Zammad to receive emails directly from my email account.
No this works, but I cannot delete the existing gmail from Zammad.

Is there a rails console command to do this?

Infos:

  • Used Zammad version: 3.4.x
  • Used Zammad installation source: sourc
  • Operating system: Debian
  • Browser + version: Chrome 85.0.x

Expected behavior:

  • It should delete the gmail account from gmail channels menu

Actual behavior:

  • We receive an error
    image

Steps to reproduce the behavior:

  • Add a gmail account
  • Deactivate account
  • (Add the same account as plain pop3 account)
  • Try to delete it (?)

Two things:

a)
What you’re experiencing is a bug - I’ve created a report for you already:

b)
To me it looks like you’re trying to workaround issues which have a different cause.
Technically pop/imap and google channels should be similare fast.
In fact, they’re both run in the same Channel fetch process.

However
If you have a lot of email channels with a lot of mails to fetch, the fetching of a specific mail channel may take longer than you might expect.

In general, Zammad runs it’s fetching process every 30 seconds which should be fairly good enough.


Anyway, yes, you can also remove a Channel from the console.
You’ll have to find the correct channel though.

The following should help.

RUN AT YOUR OWN RISK; YOU’RE REMOVING CHANNEL DATA

# Get all google channels
Channel.where(area: "Google::Account").ids

# If you have more than one Channel, check if ID
Channel.find({id-above-command-returned})

# If you found your Channel ID, make it suffer
Channel.find({bad-channel-id}).destroy
1 Like

Hi Marcel,

Thank you very much for your reply and for creating a bug report.
The slowness I was experiencing is not coming from Zammad, but from the way the mail was setup. It does not offer anything useful anymore, so I decided to get rid of Gmail as an intermediate.

Thanks for the console commands. Do you advice to wait for a fix, of just go ahead and remove it manually from the console?

You can safely go ahead. The fix may take more time than you’re willing to wait. :x

It worked like a charm. Thanks

1 Like