Guys: I'm running into a brick wall with mu4e, wondering if you can help?

The problem comes from mbsync. I installed it, and used a config file from systemcrafters video series.

IMAPAccount gmail

Host imap.gmail.com



#for the next, I used both STARTTLS and IMAPS


CertificateFile /etc/ssl/certs/ca-certificates.crt


IMAPStore gmail-remote

Account gmail


MaildirStore gmail-local

Subfolders Verbatim

Path /home/work/work-desk/EMACS/MU4E/mail/

Inbox /home/work/work-desk/EMACS/MU4E/mail/inbox

Channel gmail

Master :gmail-remote:

Slave :gmail-local:

Patterns * ![Gmail]* "[Gmail]/Sent Mail" "[Gmail]/Starred" "[Gmail]/All Mail" "[Gmail]/Trash"

Create Both

SyncState *

When I run mbsync (mbsync -a) I get these errors:

kantuck@zeus:/$ mbsync -a

/home/kantuck/.mbsyncrc:6: keyword 'SSLType' is not recognized in IMAPAccount sections

/home/kantuck/.mbsyncrc:7: keyword 'CertificateFile' is not recognized in IMAPAccount sections

Notice: Master/Slave are deprecated; use Far/Near instead.


I went ahead and checked Thunderbird (which works with gmail just fine) and the config for one of my gmail accounts says:

server type: IMAP Mail server

server name: imap.gmail.com port 993

user name: [email protected]

connection security; ssl/tls

authentication method OAuth2

The video: https://www.youtube.com/watch?v=yZRyEhi4y44 is dated: Jan 1 2021, so has Google changed gmail yet again? That config from t-bird hasn't changed in several years.

As a side note: I also tried the config from this tutoral: https://www.reddit.com/r/emacs/comments/bfsck6/mu4e_for_dummies/

Got the exact same errors.

Any idea?

My info is:

lsb_release -a

No LSB modules are available.

Distributor ID: Ubuntu

Description: Ubuntu 20.04.5 LTS

Release: 20.04

isync 1.4.4

-- Kantuck


2 Answers 2


has Google changed gmail yet again?

Good guess. As a matter of fact, they have.

Google no longer supports accessing Gmail over IMAP using only your Google account password. Instead, they provide 3 options:

  1. Logging in with your Google password + Two-Factor Authentication (a code sent by text message, phone call, or an app which you must then somehow enter in addition to your account password. Mbsync does not support this method.

  2. OAuth2 (those "Sign in with Google" pop-ups that you see on some websites). This is more like a "special permission" that doesn't grant full access to your account. I noticed that your Thunderbird configuration indicates "authentication method OAuth2". Unfortunately, mbsync doesn't support this method of accessing Gmail either.

  3. As a last resort, Google will let you set up and use an app password. This is a special, Google-generated, password you have to set up, and which is different from your Google account password. This is for older applications (like mbsync) which don't support the other 2 options.

In order to set up an app password, per Google's instructions, you will need to make sure you have 2-step verification set up on your account, and then do the following:

  1. Go to your Google Account.
  2. Select Security.
  3. Under "Signing in to Google," select App Passwords. You may need to sign in. If you don’t have this option, it might be because: 2-Step Verification is not set up for your account. 2-Step Verification is only set up for security keys. Your account is through work, school, or other organization. You turned on Advanced Protection.
  4. At the bottom, choose Select app and choose the app you using and then Select device and choose the device you’re using and then Generate.
  5. Follow the instructions to enter the App Password. The App Password is the 16-character code in the yellow bar on your device.
  6. Tap Done.

Use the "app password" on the "Pass" line in your .mbsyncrc file.

Something else I noticed is that you don't have an "AuthMechs" line in your .mbsyncrc. I'm not sure if that's needed, but its absence might be the cause of the problem.

Here's what I have in the IMAPAccount section of my .mbsyncrc, which currently works to fetch my emails from Gmail.

IMAPAccount gmail
Host imap.gmail.com
User [full email address]
Pass [app-password here]
AuthMechs LOGIN
CertificateFile /etc/ssl/certs/ca-bundle.crt

I'm using Fedora, which is probably why my certificate file is named differently than yours. But you should still check to make sure there is an actual file at the location given in your .mbsyncrc, just in case that is causing a problem.

  • This is useful, but does any of the three options can work without having to provide my phone number? I'd rather have a 2-step verification check by answering questions, such as "what is my favorite color?" instead of providing my phone number. Is this possible? Thanks
    – Ajned
    Nov 6, 2022 at 12:06
  • Just wanted to say thank you for the attempt at help. I'll try to respond fully tomorrow, on my day off. Short answer; that didn't work, but I've still been researching it, and this may be the solution; github.com/cemkeylan/mu-wizard/issues/10 I'm thinking that Ubuntu's repository has either an old version or one that's not fully working. I keep feeling something is missing but I can't quite put my finger on it. Maybe it's missing the SSL and/or certificate code. Nov 10, 2022 at 16:18

I got past the problem it was giving me finally. I thought something wasn't installed.

I finally got to the github, cloned it, and manually installed it via the README file. It worked, although I'm still getting an error I'll have to research. But thank you. Your advice helped guide me.

My solution

First make a /.mail/gmail folder


git clone https://git.code.sf.net/p/isync/isync isync-isync

go to your /home//isync-isync directory

Then use README to compile it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.