[notmuch] Make tasks for some Alwaysdata messages

This commit is contained in:
Tom Willemse 2022-09-22 23:00:37 -07:00
parent 4b9be17cd4
commit 13632db6a5

View file

@ -6,7 +6,9 @@ exec scsh -e main -s "$0" "$@"
(define message-query (define message-query
'(from:fidobill@fidomobile.ca '(from:fidobill@fidomobile.ca
and "subject:Your Fido bill is ready")) and "subject:Your Fido bill is ready"
or "subject:[alwaysdata] Negative balance to settle"
or "subject:[alwaysdata] Automatic renewal of domains impossible"))
(define processed-tag-name "processed") (define processed-tag-name "processed")
@ -28,7 +30,7 @@ exec scsh -e main -s "$0" "$@"
(let ((output-file (cadr args)) (let ((output-file (cadr args))
(messages (run/sexp (messages (run/sexp
(notmuch search --format=sexp (notmuch search --format=sexp
,@message-query "(" ,@message-query ")"
and not ,(format #f "tag:~a" processed-tag-name))))) and not ,(format #f "tag:~a" processed-tag-name)))))
(with-current-output-port (with-current-output-port
(open-output-file output-file (file-options create append)) (open-output-file output-file (file-options create append))