doveadm backup from gmail with imapc

Ben Mulvihill ben.mulvihill at gmail.com
Mon Mar 30 22:11:46 EEST 2020


I am trying to backup a gmail account (not the one I am writing from)
to dovecot, using doveadm-backup and imapc, but am having ssl
connection problems.

ted at expectation:~# doveadm backup -D -R -u ted imapc:
dsync(ted): Info: imapc(imap.gmail.com:993): Connected to
74.125.71.108:993 (local 10.7.1.179:53852)
dsync(ted): Warning: imapc(imap.gmail.com:993): Server disconnected
unexpectedly: SSL_connect() failed: error:14094410:SSL
routines:ssl3_read_bytes:sslv3 alert handshake failure: SSL alert
number 40 - reconnecting (delay 0 ms)
dsync(ted): Info: imapc(imap.gmail.com:993): Connected to
74.125.71.109:993 (local 10.7.1.179:59052)
dsync(ted): Error: imapc(imap.gmail.com:993): Server disconnected
unexpectedly: SSL_connect() failed: error:14094410:SSL
routines:ssl3_read_bytes:sslv3 alert handshake failure: SSL alert
number 40 - disconnecting
dsync(ted): Error: User initialization failed: imapc: Login to
imap.gmail.com failed: Disconnected from serv


I am using dovecot version 2.2.33.2 on ubuntu, with the
configuration below.
I have also enabled "allow access from unsecure apps" in my
gmail settings.

My first thought looking at the error messages was has that
perhaps doveadm-backup was trying to connect with ssl3, which
is no longer supported by gmail or anyone else nowadays.
But apparently the ssl3_read_bytes function in openssl also
handles tls, so the reference to ssl3 in the message is
misleading, and the real problem must be elsewhere.

If anyone can help me debug this I'd be grateful.

Many thanks, 
Ben

root at expectation:/etc/dovecot# doveconf -N
# 2.2.33.2 (d6601f4ec): /etc/dovecot/dovecot.conf
# Pigeonhole version 0.4.21 (92477967)
# OS: Linux 4.15.0-91-generic x86_64 Ubuntu 18.04.4 LTS 
auth_mechanisms = plain
imapc_features = rfc822.size gmail-migration fetch-headers
imapc_host = imap.gmail.com
imapc_password =  # hidden, use -P to show it
imapc_port = 993
imapc_ssl = imaps
imapc_ssl_verify = no
imapc_user = MY_GMAIL_ADDRESS
mail_location = maildir:~/Maildir
mail_prefetch_count = 20
mail_privileged_group = mail
namespace inbox {
  inbox = yes
  location = 
  mailbox Drafts {
    special_use = \Drafts
  }
  mailbox Junk {
    special_use = \Junk
  }
  mailbox Sent {
    special_use = \Sent
  }
  mailbox "Sent Messages" {
    special_use = \Sent
  }
  mailbox Trash {
    special_use = \Trash
  }
  prefix = 
}
passdb {
  driver = pam
  name = 
}
protocols = " imap"
ssl = yes
ssl_cert = </etc/dovecot/private/dovecot.pem
ssl_cipher_list = ALL:!LOW:!SSLv2:!SSLv3:!EXP:!aNULL
ssl_client_ca_dir = /etc/ssl/certs
ssl_key =  # hidden, use -P to show it
ssl_prefer_server_ciphers = yes
ssl_protocols = !SSLv3
userdb {
  driver = passwd
  name = 
}


More information about the dovecot mailing list