Files
nixos/modules/services/mail/filing.sieve
JakeHillion 87ba32326c
commit-validation / validate-single-commit (pull_request) Successful in 10s
buildbot/nix-eval Build done. (652 warnings)
buildbot/nix-build Build done.
buildbot/nix-effects Build done.
mail: file development mailing lists into Dev Lists
Mail from kernel and C++ development mailing lists, crates.io and the
LLVM forums was delivered to INBOX, as were GitHub notifications sent
by the merge queue and Codex connector bots.

Added a branch to the filing script that files mail into Dev Lists when
a list address appears in To or Cc, when it comes from one of the
notification senders, or when X-GitHub-Sender names one of the bots.
Matching on To and Cc rather than List-Id also catches thread replies
sent directly with the list copied, which carry no List-Id.

Test plan:
- CI
- Simulated the rules against the existing mail archive: they match
  7363 of 7628 messages already in Dev Lists, and in INBOX only list,
  crates.io, LLVM and bot mail
2026-11-09 00:15:39 +00:00

24 lines
1.3 KiB
Sieve

require ["fileinto", "index"];
if header :is "X-Spam" "yes" {
fileinto "Junk";
} elsif allof (header :index 1 :is "Delivered-To" "archives@jakehillion.me",
address :is "Resent-From" "jakehillion@live.co.uk") {
fileinto "Archived Accounts/jakehillion@live.co.uk";
} elsif allof (header :index 1 :is "Delivered-To" "archives@jakehillion.me",
address :is "Resent-From" "jshillion@hotmail.co.uk") {
fileinto "Archived Accounts/jshillion@hotmail.co.uk";
} elsif anyof (address :is ["To", "Cc"] ["linux-kernel-announce@vger.kernel.org",
"linux-kernel@vger.kernel.org",
"linux-bcachefs@vger.kernel.org",
"netdev@vger.kernel.org",
"sched-ext@lists.linux.dev",
"std-proposals@lists.isocpp.org"],
address :is "From" ["noreply@crates.io",
"notifications@llvm.discoursemail.com",
"std-proposals-request@lists.isocpp.org"],
header :is "X-GitHub-Sender" ["chatgpt-codex-connector[bot]",
"github-merge-queue[bot]"]) {
fileinto "Dev Lists";
}