Unhandled exception when being blocked by gmail.com

Volker Diels-Grabsch <[email protected]>
Newsgroups gmane.mail.getmail.user
Message-ID <20181117181659.GA15856@6153f789-1cf1-4ca3-8cea-6fa7ae195a8b.njh.eu>
Hi,

I got an unhandled exception with Getmail while fetching emails from
gmail.com, while Google blocks the IMAP request to tell the user that
they connect from a different network than usual.

While receiving such an error from Google is (unfortunately) quite
normal, I believe that getmail should handle this case more
gracefully.  I think it should display the error message provided by
gmail.com, instead of throwing an unhandled exception without further
details.


Regards,
Volker


------------------------------------------------------

  getmail version 5.7
  Python version 2.7.15+ (default, Aug 31 2018, 11:56:52) 
[GCC 8.2.0]

Unhandled exception follows:
    File "/usr/bin/getmail", line 898, in main
    success = go(configs, options.idle)
    File "/usr/bin/getmail", line 157, in go
    retriever.initialize(options)
    File "/usr/lib/python2.7/dist-packages/getmailcore/_retrieverbases.py", line 1709, in initialize
    if o.startswith('[UNAVAILABLE]'):
  AttributeError: 'error' object has no attribute 'startswith'

------------------------------------------------------

getmail configuration:
  getmail version 5.7
  Python version 2.7.15+ (default, Aug 31 2018, 11:56:52) 
[GCC 8.2.0]
  retriever:  SimpleIMAPSSLRetriever(ca_certs="None", certfile="None", getmaildir="/home/***/.getmail/", keyfile="None", mailboxes="(u'INBOX',)", move_on_delete="None", password="*", password_command="()", port="993", record_mailbox="True", server="imap.gmail.com", ssl_cert_hostname="None", ssl_ciphers="None", ssl_fingerprints="()", ssl_version="None", timeout="180", use_cram_md5="False", use_kerberos="False", use_peek="True", use_xoauth2="False", username="***@gmail.com")
  destination:  MDA_external(allow_root_commands="False", arguments="()", command="maildrop", group="None", ignore_stderr="False", path="/usr/bin/maildrop", unixfrom="False", user="None")
  options:
    delete : True
    delete_after : 0
    delete_bigger_than : 0
    delivered_to : True
    fingerprint : False
    logfile : None
    max_bytes_per_session : 0
    max_message_size : 0
    max_messages_per_session : 0
    message_log : None
    message_log_syslog : False
    message_log_verbose : False
    read_all : True
    received : True
    verbose : 1


-- 
Volker Diels-Grabsch
----<<<((()))>>>----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.