Import E-Mails via IMAP / GUI pending

Issue #1121 closed
Jan Ebinger created an issue

Hello,

my import via GUI is not working.

I have only the status “pending”.

Have someone a idea?

Comments (10)

  1. Janos SUTO repo owner

    I need more details. Also check the “import” mysql table contents. Also be sure that piler’s crontab runs the import.sh utility regularly. The gui only creates a job that should be executed by import.sh.

  2. Jan Ebinger reporter

    If I run /usr/local/libexec/piler/import.sh I get pilerimport: invalid option -- 'G' back.

  3. Janos SUTO repo owner

    I get it by now. The -G option has been removed at some point from pilerimport.

    However, the imapfetch.py utility could be used to download the emails to a directory, and then let pilerimport process it. The only trouble is that imapfetch.py doesn’t read the import table for jobs and it only supports imap. I’ll do my best to fix this issue, and make it work in the next release. Until then please import emails manually from the cli.

  4. Janos SUTO repo owner

    OK, I think I’ve nailed the most of it. Please get the master branch. I’ve fixed pilerimport, imapfetch.py and import.sh.

    It works as follows. You need to create /var/piler/imap and make it owned by user piler. Then on the gui create an imap import entry. Then let user piler run /usr/local/libexec/import.sh which in turn calls imapfetch.py to download the messages from the imap account to /var/piler/imap dir, which in turn calls pilerimport to import the downloaded messages.

    A few caveats, though:

    • by default imapfetch.py assumes port 143 (unencrypted protocol). If you have imap over tls on port 993, then add -P 993 in import.sh to the flags of imapfetch.py
    • imapfetch.py runs the first unprocessed entry in the import table, one at a time
    • pilerimport is called with such options make it remove the imported emails

    Let me know how it works for you.

  5. Jan Ebinger reporter

    Can I install the master branch like a new Piler version? Or do I have to pay attention to something?

  6. Log in to comment