office365 import not working

Issue #1278 closed
Sureshkannan1994 created an issue

Hi sir,

‌ office 365 imap and pop3 authentication was disable so mail piler import not working kindly suggest alternative option

Comments (20)

  1. Janos SUTO repo owner

    The latest version of piler support oauth2 authentication. Run util/get-token.py to get a token.

    Then run imapfetch.py -s … -u …. --oauth2-token access_token to download your emails.

  2. Janos SUTO repo owner

    See the download area. Btw. you don’t need upgrade just for this feature. Instead extact the utils directory to get these new apps.

  3. Sureshkannan1994 reporter

    Below command are using pop3 import. how to run imapfetch.py in command in piler server

    #!/bin/sh
    cd /var/piler//tmp/
    current_time=$(date "+%Y.%m.%d-%H.%M.%S")
    /usr/local/bin/pilerimport -K outlook.office365.com -u -p -P 995 -r -b 1000 > /tmp/imapimp.txt

  4. Janos SUTO repo owner

    imapfetch.py as its name suggests is for imap downloads only. Run imapfetch.py -h to see its options. Basically, it’s imapfetch.py -s outlook.office365.com -u user -p password. Also see my previous example if you want to use it via oauth2. Then you need a valid access token.

  5. Sureshkannan1994 reporter

    Some time following error was coming imapfech.py run

    Traceback (most recent call last):
    File "imapfetch.py", line 247, in <module>
    main()
    File "imapfetch.py", line 214, in main
    conn.select()
    File "/usr/lib/python3.8/imaplib.py", line 747, in select
    typ, dat = self._simple_command(name, mailbox)
    File "/usr/lib/python3.8/imaplib.py", line 1205, in _simple_command
    return self._command_complete(name, self._command(name, *args))
    File "/usr/lib/python3.8/imaplib.py", line 1030, in _command_complete
    raise self.error('%s command error: %s %s' % (name, typ, data))
    imaplib.error: SELECT command error: BAD [b'Request is throttled. Suggested Backoff Time: 13720 milliseconds']

  6. Log in to comment