From 633d9b088913315c367b95ec71333184046c65d6 Mon Sep 17 00:00:00 2001 From: Lukas Bestle Date: Thu, 8 Oct 2020 22:07:00 +0200 Subject: [PATCH] Add mailfilter for Nolt notifications --- roles/mail/templates/mailfilters/cddmail2.j2 | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/roles/mail/templates/mailfilters/cddmail2.j2 b/roles/mail/templates/mailfilters/cddmail2.j2 index 5e24033..a6b9cb7 100644 --- a/roles/mail/templates/mailfilters/cddmail2.j2 +++ b/roles/mail/templates/mailfilters/cddmail2.j2 @@ -6,11 +6,16 @@ MAILDIR="$HOME/users/lukas" # default Maildir if ( $MAILDIR =~ /\/lukas$/ ) { - # deliver GitHub notifications to the Kirby folders + # deliver Nolt and GitHub notifications to the Kirby folders `test -d "$MAILDIR/.Kirby2"; or maildirmake "$MAILDIR/.Kirby2"` `test -d "$MAILDIR/.Kirby3"; or maildirmake "$MAILDIR/.Kirby3"` + if( /^From: .*? $/:h) + { + MAILDIR="$MAILDIR/.Kirby3" + } + if( /^List-Archive: https:\/\/github.com\/getkirby-v2\//:h ) { MAILDIR="$MAILDIR/.Kirby2"