refactor(tazjin/emacs): Switch to sending mail via lieer
This drops the msmtp requirement from my configuration; there's still some cleanup to be done but I need to double-check this in a few environments first. Change-Id: I298f4ff77b45cb214fbccee84e9bbd861508d11a Reviewed-on: https://cl.tvl.fyi/c/depot/+/3132 Tested-by: BuildkiteCI Reviewed-by: tazjin <mail@tazj.in>
This commit is contained in:
parent
687f978b1c
commit
4a807040a2
5 changed files with 7 additions and 59 deletions
28
third_party/lieer/default.nix
vendored
28
third_party/lieer/default.nix
vendored
|
@ -1,28 +0,0 @@
|
||||||
# Lieer is a small tool to synchronise a Gmail account with a local
|
|
||||||
# maildir.
|
|
||||||
{ pkgs, ... }:
|
|
||||||
|
|
||||||
let
|
|
||||||
inherit (pkgs) fetchFromGitHub python3Packages;
|
|
||||||
in python3Packages.buildPythonApplication rec {
|
|
||||||
name = "lieer-${version}";
|
|
||||||
version = "1.3";
|
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
|
||||||
owner = "gauteh";
|
|
||||||
repo = "lieer";
|
|
||||||
rev = "v${version}";
|
|
||||||
sha256 = "12sl7d381l1gjaam419xc8gxmsprxf0hgksz1f974qmmijvr02bh";
|
|
||||||
};
|
|
||||||
|
|
||||||
patches = [
|
|
||||||
./send_scope.patch
|
|
||||||
];
|
|
||||||
|
|
||||||
propagatedBuildInputs = with python3Packages; [
|
|
||||||
notmuch
|
|
||||||
oauth2client
|
|
||||||
google-api-python-client
|
|
||||||
tqdm
|
|
||||||
];
|
|
||||||
}
|
|
26
third_party/lieer/send_scope.patch
vendored
26
third_party/lieer/send_scope.patch
vendored
|
@ -1,26 +0,0 @@
|
||||||
From ac7be0f9ad212455d833457bc328ee18eb6a5fdf Mon Sep 17 00:00:00 2001
|
|
||||||
From: Vincent Ambo <tazjin@google.com>
|
|
||||||
Date: Thu, 10 Dec 2020 11:13:56 +0100
|
|
||||||
Subject: [PATCH] remoet: Add 'mail.google.com' OAuth scope
|
|
||||||
|
|
||||||
Required for sending emails.
|
|
||||||
---
|
|
||||||
lieer/remote.py | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/lieer/remote.py b/lieer/remote.py
|
|
||||||
index 9f3e871..6f5a71e 100644
|
|
||||||
--- a/lieer/remote.py
|
|
||||||
+++ b/lieer/remote.py
|
|
||||||
@@ -26,7 +26,7 @@ from oauth2client.file import Storage
|
|
||||||
from pathlib import Path
|
|
||||||
|
|
||||||
class Remote:
|
|
||||||
- SCOPES = 'https://www.googleapis.com/auth/gmail.readonly https://www.googleapis.com/auth/gmail.labels https://www.googleapis.com/auth/gmail.modify'
|
|
||||||
+ SCOPES = 'https://www.googleapis.com/auth/gmail.readonly https://www.googleapis.com/auth/gmail.labels https://www.googleapis.com/auth/gmail.modify https://mail.google.com/'
|
|
||||||
APPLICATION_NAME = 'Lieer'
|
|
||||||
CLIENT_SECRET_FILE = None
|
|
||||||
authorized = False
|
|
||||||
--
|
|
||||||
2.29.2.576.ga3fc446d84-goog
|
|
||||||
|
|
|
@ -25,8 +25,10 @@
|
||||||
(setq notmuch-show-empty-saved-searches t)
|
(setq notmuch-show-empty-saved-searches t)
|
||||||
|
|
||||||
;; Mail sending configuration
|
;; Mail sending configuration
|
||||||
(setq send-mail-function 'sendmail-send-it) ;; sendmail provided by MSMTP
|
(setq sendmail-program "gmi") ;; lieer binary supports sendmail emulation
|
||||||
(setq notmuch-always-prompt-for-sender t)
|
(setq message-sendmail-extra-arguments
|
||||||
|
'("send" "--quiet" "-t" "-C" "~/mail/account.tazjin"))
|
||||||
|
(setq send-mail-function 'sendmail-send-it)
|
||||||
(setq notmuch-mua-user-agent-function
|
(setq notmuch-mua-user-agent-function
|
||||||
(lambda () (format "Emacs %s; notmuch.el %s" emacs-version notmuch-emacs-version)))
|
(lambda () (format "Emacs %s; notmuch.el %s" emacs-version notmuch-emacs-version)))
|
||||||
(setq mail-host-address (system-name))
|
(setq mail-host-address (system-name))
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{ depot, lib, pkgs, ... }:
|
{ depot, lib, pkgs, ... }:
|
||||||
|
|
||||||
config: let
|
config: let
|
||||||
inherit (depot.third_party) lieer;
|
inherit (pkgs) lieer;
|
||||||
|
|
||||||
quasselClient = pkgs.quassel.override {
|
quasselClient = pkgs.quassel.override {
|
||||||
client = true;
|
client = true;
|
||||||
|
|
|
@ -211,7 +211,6 @@ in lib.fix(self: {
|
||||||
# programs from the depot
|
# programs from the depot
|
||||||
(with depot; [
|
(with depot; [
|
||||||
screenLock
|
screenLock
|
||||||
third_party.lieer
|
|
||||||
tools.nsfv-setup
|
tools.nsfv-setup
|
||||||
users.tazjin.emacs
|
users.tazjin.emacs
|
||||||
]) ++
|
]) ++
|
||||||
|
@ -238,6 +237,7 @@ in lib.fix(self: {
|
||||||
iftop
|
iftop
|
||||||
imagemagick
|
imagemagick
|
||||||
jq
|
jq
|
||||||
|
lieer
|
||||||
manpages
|
manpages
|
||||||
mosh
|
mosh
|
||||||
msmtp
|
msmtp
|
||||||
|
@ -247,8 +247,8 @@ in lib.fix(self: {
|
||||||
notmuch
|
notmuch
|
||||||
openssh
|
openssh
|
||||||
openssl
|
openssl
|
||||||
pass
|
|
||||||
paperlike-go
|
paperlike-go
|
||||||
|
pass
|
||||||
pavucontrol
|
pavucontrol
|
||||||
pinentry
|
pinentry
|
||||||
pinentry-emacs
|
pinentry-emacs
|
||||||
|
|
Loading…
Reference in a new issue