1

I used to have CiviCRM Inbound Email processing perfectly, but now it no longer works. Whenever the process is run, I get the following error:

Full message: 
Finished execution of Process Inbound Emails with result: Failure, Error message: A fatal error was triggered: Could not connect to MailStore for [prefix]@[domain].org@imap.gmail.com

Error message: 

An error occured while sending or receiving mail. The IMAP server did not accept the username and/or password: A0001 BAD Too many arguments provided 136-v6mb280518080wmm.

Please help me fix the config (or if the config is correct I'll set about debugging). The password is functioning perfectly (I emptied it before taking a screenshot of the config). How can I fix this?

enter image description here

This is for a domain hosted by Google.

2

I would guess from the error "A0001 BAD Too many arguments provided" and this unrelated github issue that you may have a space in your password (or some other character that needs better handling).

That CiviCRM also triggers "A0001 BAD Too many arguments provided" error suggests CiviCRM doesn't handle spaces in passwords correctly for IMAP/POP3.

Here's some advice on debugging the inbound mail process in CiviCRM, which might be useful!

1

The config looks correct.

Key things to check:

  • You can connect to the account using the credentials via the gmail web interface
  • You don't have 2FA set up and that less secure apps are allowed for the account
  • If the above fails try activating the unlock captcha https://accounts.google.com/b/0/DisplayUnlockCaptcha then test logging in by triggering the scheduled job. You should notice the unlock captcha page change after the log in attempt has finished - you might need to trigger the job again after it's run to connect.
  • Finally I'd make sure you can connect to gmail from that server by using something like swaks or similar to connect -> https://serverfault.com/questions/846026/can-i-send-a-mail-through-gmail-with-swaks (Just to make sure you are dealing with a civicrm issue an not a server issue).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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