From d053abfd2a52d663fb31bf15b910cd7145abc285 Mon Sep 17 00:00:00 2001 From: Profpatsch Date: Mon, 22 Mar 2021 01:08:24 +0100 Subject: feat(users/Profpatsch): add imap-idle MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A small UCSPI client which connects to an IMAP server, authenticates with username and password (for Christ’s sake, put it in `s6-tlsclient`), selects the `INBOX` and proceeds to listen for new mails. Later it will generate an event on stdout and to be used for push messaging and triggering a full `mbsync` run on new message. Currently I’m testing it via ``` env CAFILE=/run/current-system/etc/ssl/certs/ca-bundle.crt \ IMAP_USERNAME= \ backtick -i IMAP_PASSWORD ' pass' ' ' '' \ s6-tlsclient -v 993 ./result ``` Change-Id: I221717d374c0efc8d9e05fe0dfccba31798b3c5c Reviewed-on: https://cl.tvl.fyi/c/depot/+/2636 Tested-by: BuildkiteCI Reviewed-by: Profpatsch --- users/Profpatsch/imap-idle.nix | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 users/Profpatsch/imap-idle.nix (limited to 'users/Profpatsch/imap-idle.nix') diff --git a/users/Profpatsch/imap-idle.nix b/users/Profpatsch/imap-idle.nix new file mode 100644 index 000000000000..30c7b6e8aac8 --- /dev/null +++ b/users/Profpatsch/imap-idle.nix @@ -0,0 +1,14 @@ +{ depot, pkgs, lib, ... }: + +let + imap-idle = depot.users.Profpatsch.writers.rustSimple { + name = "imap-idle"; + dependencies = [ + depot.users.Profpatsch.arglib.netencode.rust + depot.users.Profpatsch.rust-crates.imap + depot.users.Profpatsch.rust-crates.epoll + depot.users.Profpatsch.execline.exec-helpers + ]; + } (builtins.readFile ./imap-idle.rs); + +in imap-idle -- cgit 1.4.1