Coder Social home page Coder Social logo

idlesync's Introduction

idlesync

idlesync is a rust-based utility daemon for monitoring IMAP mailboxes using IMAP IDLE. When new mail is detected, or after a configurable timeout, a series of configurable commands are run. The main reason to use idlesync is to make the process of watching for new mail and synchronising and indexing it when it arrives much more efficient, as the available options for syncrhonising mail in the background are mostly either offlineimap (which is slow and resource intensive), or mbsync, (which does not have IDLE support and can only synchronise on a timer). The intended use case is for synchronising and indexing email efficiently using an external tool such as mbsync and mu, but this is configurable for other tools.

Background

I wrote this mostly as a way to teach myself more rust, especially concurrency and data structures, and also because I'm currently using offlineimap, but really want to be using mbsync due to the much lower resource usage.

Design Goals

  • As async and non-blocking as possible
  • Low resource (and power) usage, I'm a low resource and low power kinda gal
  • Configurable for different mail clients, mail indexers and sync daemons

Known Limitations

  • Currently only monitors INBOX for IDLE
  • Currently the actual sync command(s) will block
  • *NIX only for now, it works on OSX, but not Windows without a few small changes to handle spawning processes

Quick Start

Install

cargo install --git https://gitlab.com/ec0/idlesync.git

Configure

Configuration should be written to ~/.config/idlesync/config.yaml

Example:

---
accounts:
    - name: home1
      host: mail.mac.com
      user: tyrellw1
      pass: hack_hack_hack
      tls: true
      commands:
          - mbsync account1
          - notmuch new
    - name: work1
      host: mail.evilcorp.com
      user: tyrell
      pass: more_Of_a_kd3_pers0n
      tls: true
      commands:
          - mbsync work1
          - notmuch new

Run

idlesync

idlesync's People

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.