Skip to content

Commit af6f496

Browse files
authored
Merge pull request #40 from dyne/maildir-mblaze
refactor: migrate maildir flows to shared mblaze adapters
2 parents 07448c4 + abc059d commit af6f496

21 files changed

Lines changed: 407 additions & 471 deletions

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,3 +66,4 @@ src/nvpscan.report
6666
src/pgpewrap
6767
src/parsedate
6868
gnupg-mass-recv.cache
69+
*.sieve

AGENTS.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,6 @@ Prefer minimal, readable changes. Keep Zsh functions lowercase, shell modules gr
2222

2323
There is no broad unit-test suite. Use `extras/test/run-source.sh` for checkout-level validation, `extras/test/test-account-wizard.sh` for account onboarding behavior, and `extras/test/inittest.sh` for installed-path validation. The tests depend on external mail tools (`fetchmail`, `msmtp`, `mutt`/`neomutt`, `notmuch`, `pinentry-curses`, `abook`, `wipe`, `mblaze`/`maddr`) plus build tools from `.travis.yml`. For narrow C helper changes, rebuild with `make` and add a focused command-line check where practical.
2424

25-
## Commit & Pull Request Guidelines
26-
27-
Recent history uses short imperative commit messages, for example `fix own accounts filtering for priv` and `update filtering`. Keep commits focused and describe the user-visible behavior changed. Pull requests should include a concise summary, affected commands or modules, test results, and any install or dependency impact. Include screenshots only for UI-facing macOS or documentation changes.
28-
2925
## Architecture Notes
3026

3127
Respect the existing slice-by-feature organization. Keep IO boundaries explicit: shell modules should call external mail tools clearly, and helpers should do one job well.

doc/command-contracts.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,4 +60,4 @@ This file documents current behavior from `src/jaro` and `src/zlibs/*` without r
6060

6161
## Missing test pointers
6262

63-
- `fetch`, `send`, `smtp`, `imap`, `publish`, and optional integrations are not fully covered by focused local tests yet.
63+
- `fetch`, `send`, `smtp`, `imap`, and optional integrations are not fully covered by focused local tests yet.

doc/jaro.1

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
. ftr VB CB
1515
. ftr VBI CBI
1616
.\}
17-
.TH "jaro" "1" "2026-04-30" "" ""
17+
.TH "jaro" "1" "2026-05-01" "" ""
1818
.hy
1919
.SH jaro(1)
2020
.SS Name
@@ -114,9 +114,9 @@ local filter/addressbook files.
114114
\f[V]rmdupes\f[R] remove duplicate messages.
115115
.PP
116116
\f[V]remember\f[R], \f[V]replay\f[R], \f[V]preview\f[R], \f[V]edit\f[R],
117-
\f[V]vim\f[R], \f[V]publish\f[R], \f[V]imap\f[R], \f[V]alot\f[R],
118-
\f[V]alot-config\f[R], \f[V]notmuch\f[R], \f[V]notmuch-config\f[R],
119-
\f[V]isml\f[R], \f[V]ismd\f[R].
117+
\f[V]vim\f[R], \f[V]imap\f[R], \f[V]alot\f[R], \f[V]alot-config\f[R],
118+
\f[V]notmuch\f[R], \f[V]notmuch-config\f[R], \f[V]isml\f[R],
119+
\f[V]ismd\f[R].
120120
.SS Files
121121
.PP
122122
\f[V]$JAROMAILDIR\f[R] mail root (default usually \f[V]$HOME/Mail\f[R]).

doc/jaro.1.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ filter/addressbook files.
102102

103103
`rmdupes` remove duplicate messages.
104104

105-
`remember`, `replay`, `preview`, `edit`, `vim`, `publish`, `imap`,
105+
`remember`, `replay`, `preview`, `edit`, `vim`, `imap`,
106106
`alot`, `alot-config`, `notmuch`, `notmuch-config`, `isml`, `ismd`.
107107

108108
## Files
@@ -118,4 +118,3 @@ filter/addressbook files.
118118
## See Also
119119

120120
`jaromail(1)`
121-

doc/jaromail.1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
. ftr VB CB
1616
. ftr VBI CBI
1717
.\}
18-
.TH "jaromail" "1" "2026-04-30" "" ""
18+
.TH "jaromail" "1" "2026-05-01" "" ""
1919
.hy
2020
.SH jaromail(1) \[en] self-sovereign e-mail management
2121
.PP

doc/maintenance-inventory.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,9 @@
1616
| `extras/gnupg-mass-recv` | GnuPG helper scripts | No | Not in README/manual | `gpg` | Optional | Keep optional, document with explicit support scope. |
1717
| `extras/shell_completion` | shell completion snippets | No | Not in README/manual | shell-specific | Optional | Keep and document install-by-choice. |
1818
| `extras/zaw-jaromail` | Zaw integration helper | No | Not in README/manual | Zaw/zsh ecosystem | Optional/Legacy | Keep optional, low priority maintenance. |
19-
| `src/zlibs/publish` | publishing/sync helper surface | Installed indirectly via `src/zlibs/*` | Command exposed in `src/jaro` | external network tools | Legacy | Mark as legacy in docs; keep behavior unchanged for now. |
2019
| `build/*` | build/install/release scripts per platform | N/A (tooling) | Indirect (`README.md` make flow) | platform toolchains | Core (tooling) | Keep; separate default Linux flow from platform-specific scripts in docs. |
2120

2221
## Evidence Notes
2322

2423
- Default install currently includes both `src/mutt` and `src/stats` plus all `src/zlibs/*` (`Makefile` `install` target).
25-
- `publish` is still an exposed subcommand in `src/jaro`.
2624
- Stats is actively documented in `doc/jaromail-manual.md|org|tex`, but most extras are not referenced in top-level docs.

doc/optional-integrations.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,6 @@ This file lists integrations that are *not* part of the core CLI workflow (`init
1515
- Test coverage: **not directly covered by current smoke tests**
1616
- Status: retained for compatibility, but legacy-oriented surface
1717

18-
### `src/zlibs/publish` and `publish` command
19-
20-
- Installed by default: **yes** (via `src/zlibs/*`)
21-
- Test coverage: **not covered by `extras/test/run-source.sh`**
22-
- Status: retained, treated as legacy/advanced workflow
23-
2418
### `extras/roundcube-majordomo`
2519

2620
- Installed by default: **no**

extras/test/lib/test_helpers.zsh

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,34 @@ culpa qui officia deserunt mollit anim id est laborum.
6565
EOF
6666
}
6767

68+
# Ensure a path has a valid Maildir layout.
69+
maildir_fixture_ensure() {
70+
target="${1}"
71+
mkdir -p "${target}/cur" "${target}/new" "${target}/tmp"
72+
}
73+
74+
# Create one synthetic RFC822 message under a Maildir subfolder.
75+
# Usage:
76+
# make_maildir_message "/tmp/mail/incoming" "new" "msg1" \
77+
# "From: A <a@example.org>" "To: B <b@example.org>" "Subject: Test"
78+
make_maildir_message() {
79+
md_path="${1}"
80+
md_subdir="${2}"
81+
md_name="${3}"
82+
shift 3
83+
84+
maildir_fixture_ensure "${md_path}"
85+
msg_path="${md_path}/${md_subdir}/${md_name}"
86+
{
87+
for header_line in "$@"; do
88+
print -- "${header_line}"
89+
done
90+
print
91+
lorem_message
92+
} > "${msg_path}"
93+
print -- "${msg_path}"
94+
}
95+
6896
assert_equal() {
6997
got="${1}"
7098
expected="${2}"

extras/test/run-source.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ fi
8383

8484
imported_sender="Luther Blisset <luther@dyne.org>"
8585
print -- "${imported_sender}" | jaro_source import
86-
if assert_equal "$(jaro_source addr 2>/dev/null)" "${imported_sender}" "import sender"; then
86+
if assert_contains "$(jaro_source addr 2>/dev/null)" "${imported_sender}" "import sender"; then
8787
r "IMPORT OK"
8888
else
8989
exit 1

0 commit comments

Comments
 (0)