[Midnightbsd-cvs] [MidnightBSD/mports] 1239a6: mail/courier: update to 1.5.1 (#727)

Lucas Holt noreply at github.com
Sun Aug 9 09:48:08 EDT 2026


  Branch: refs/heads/master
  Home:   https://github.com/MidnightBSD/mports
  Commit: 1239a64af0cf1bea1805dee933f8f74dc7e38bc3
      https://github.com/MidnightBSD/mports/commit/1239a64af0cf1bea1805dee933f8f74dc7e38bc3
  Author: Lucas Holt <luke at foolishgames.com>
  Date:   2026-08-09 (Sun, 09 Aug 2026)

  Changed paths:
    M mail/courier/Makefile
    M mail/courier/distinfo
    M mail/courier/files/courier.in
    A mail/courier/files/extra-patch-libs__sqwebmail__folder.c
    A mail/courier/files/extra-patch-libs__sqwebmail__images__sqwebmail.css
    A mail/courier/files/extra-patch-libs__sqwebmail__maildir.c
    A mail/courier/files/extra-patch-libs__sqwebmail__maildir.h
    A mail/courier/files/extra-patch-libs__sqwebmail__msg2html.c
    R mail/courier/files/extra-patch-webmail__folder.c
    R mail/courier/files/extra-patch-webmail__images__sqwebmail.css
    R mail/courier/files/extra-patch-webmail__maildir.c
    R mail/courier/files/extra-patch-webmail__maildir.h
    R mail/courier/files/extra-patch-webmail__msg2html.c
    M mail/courier/files/patch-courier__Makefile.in
    A mail/courier/files/patch-courier__filters__Makefile.in
    A mail/courier/files/patch-courier__module.esmtp__Makefile.in
    A mail/courier/files/patch-courier__module.uucp__Makefile.in
    R mail/courier/files/patch-courier__submit.C
    A mail/courier/files/patch-libs__rfc2045__rfc2045.h
    A mail/courier/files/patch-libs__rfc2045__testsuitecpp.C
    A mail/courier/files/patch-libs__rfc2045__testsuitecpp2.C
    M mail/courier/files/pkg-install.in
    M mail/courier/files/pkg-message.in
    M mail/courier/pkg-plist

  Log Message:
  -----------
  mail/courier: update to 1.5.1 (#727)

Update `mail/courier` from 1.1.11_3 to 1.5.1.

## Rebased on FreeBSD's 1.5.1 port

The old-style `.if ${PORT_OPTIONS:M…}` blocks become options helpers
with `OPTIONS_SUB=yes`, and the MidnightBSD delta is replayed on top.
The plist marker renames (`%%WITHFAX%%`→`%%SENDFAX%%`,
`%%WITHLDAP%%`→`%%LDAP%%`, `%%WITHUUCP%%`→`%%UUCP%%`,
`%%WITHCERTSDIR%%`→`%%CERTSDIR%%`) are required by `OPTIONS_SUB`, and
`files/courier.in` / `files/pkg-install.in` / `files/pkg-message.in`
follow those renames.

## An mports-only patch was dropped — please confirm

**`files/patch-courier__submit.C` is deleted.** Hunk 1 of 2 failed
against 1.5.1: upstream rewrote `my_spf_lookup()` (pointer→reference,
new `identity=` / uppercase `SPF=` header format), leaving an unbalanced
`*/`. The patch entered with the original 2005 `a334f8cacb "add courier
mta..."` import, carries no rationale, and **FreeBSD has never had it**.
Reviving it would mean hand-inventing SPF header formatting against the
new upstream code, so it was removed rather than guessed at.

If that alternate Received-SPF format was deliberate, this is a silent
behavior change and needs attention.

## Other patch changes

**Added** from FreeBSD, all applying cleanly:
`patch-courier__filters__Makefile.in`,
`patch-courier__module.esmtp__Makefile.in`,
`patch-courier__module.uucp__Makefile.in`,
`patch-libs__rfc2045__rfc2045.h`, `patch-libs__rfc2045__testsuitecpp.C`,
`patch-libs__rfc2045__testsuitecpp2.C`. `patch-courier__Makefile.in`
replaced with FreeBSD's (mports' was a truncated 1.1.11-era version).

**Renamed** `extra-patch-webmail__*` → `extra-patch-libs__sqwebmail__*`
with FreeBSD's content — upstream moved those sources. All 5 verified to
apply via `patch -C` dry-run; they are not exercised by a default build
(`WEBMAILFLAGS`/`WEBMAILXFACE` are non-default).

## Dependency changes

`dns/libidn` → `dns/libidn2`; `devel/pcre` dropped (pcre2 only);
`devel/gamin` (`libfam.so.0`) as an explicit `LIB_DEPENDS` replacing
`USES=fam` (identical resolution). `security/gnupg` becomes an
unconditional `BUILD_DEPENDS`, replacing the mports `fakegpg` shim; the
`GNUPG` option now controls only the runtime dep and `GPG=` env. Manual
`-I`/`-L` replaced by `USES=localbase`.

**Dropped `-DUNICODE_LB_OPT_SYBREAK=0`** — added in `54e3e2f6c0` solely
to make courier **1.1.11** compile against courier-unicode 2.6.0. 1.5.1
is contemporary with 2.6.0 and builds without it (verified).

**Missing in mports** (reported, not invented):
`net/courier-authlib-ldap` (LDAP option `RUN_DEPENDS` — already broken
before this update) and `comms/mgetty+sendfax` (SENDFAX option). Both
options are non-default and neither blocks the build.

## The gotcha worth recording

`${STAGEDIR}` **cannot** be carried over from FreeBSD Makefiles.
`Mk/components/fake/vars.mk` sets `FAKE_SETUP` to *both*
`PREFIX=${FAKE_DESTDIR}${TRUE_PREFIX}` **and**
`STAGEDIR=${FAKE_DESTDIR}`, so `${STAGEDIR}${PREFIX}` double-prefixes
and `fake` dies with a doubled path. `bmake -V STAGEDIR` at top level
returns **empty**, which makes it look safe — STAGEDIR is only set
inside the fake phase. An explanatory comment now sits above
`post-install`.

## Verification

makesum/patch/build/fake/package all OK → `courier-1.5.1.mport`.
distinfo matches FreeBSD exactly. portlint: 0 fatal, 35 warnings (all
inherited "not generated by makepatch" notices). Staged-tree vs
generated-plist compared both directions; confirmed no `%%MARKER%%`
survived substitution and no staging path leaked into any installed
file, rc script, crontab or pkg-message.

LICENSE unchanged — `COPYING.GPL` still GPL v3.

**Plist note:** with LDAP off, `courierldapaliasd.8.gz` and its HTML doc
are staged but sit behind `%%LDAP%%`, so they aren't packaged. Identical
to FreeBSD's plist, so left alone.

**Not validated:** default option set only, amd64 only. The webmail
extra-patches were verified to *apply*, not to compile. `SENDFAX` and
`LDAP` cannot be built until the two missing ports exist.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

## Summary by Sourcery

Update the mail/courier port to upstream version 1.5.1 and align it with
the current FreeBSD port while preserving MidnightBSD-specific behavior.

New Features:
- Expose new MAILCONF option to toggle mailer.conf integration and add
OPTION_SUB-based helpers for existing feature toggles.
- Refine webmail-related options (flags, rsent, X-Face) and their
patches to match the relocated sqwebmail sources.
- Introduce CERTSDIR option handling via OPTION_SUB, with a dedicated
post-install target to create the certificates directory when enabled.

Bug Fixes:
- Switch dependencies from legacy libidn to libidn2 and from implicit
FAM handling to explicit gamin/libfam to match upstream and modern
library usage.
- Remove the obsolete fakegpg shim and rely on a real gnupg binary,
fixing GPG handling for webmail encryption.
- Correct C++ template usage in rfc2045 tests and headers to restore
successful builds with newer compilers.
- Avoid use of STAGEDIR in post-install to prevent double-prefixing
under mports' fake install phase.

Enhancements:
- Rework OPTIONS handling to use OPTIONS_SUB, simplifying plist markers
and substs for LDAP, SENDFAX, UUCP, CERTSDIR, and other toggles.
- Refresh configure arguments and paths (datadir, mimetypes, image URL,
unicode, workarounds, etc.) to better reflect upstream defaults and
local layouts.
- Adopt additional upstream/FreeBSD patches for filters and esmtp/uucp
modules to keep the port in sync with maintained code.
- Drop the courier-unicode workaround define that was only needed for
the older 1.1.11 release.
- Tighten RUN_DEPENDS and BUILD_DEPENDS lists, adding explicit
mime-support and authlib components while removing unused libraries like
pcre1.
- Move courier webmail extra patches to the new libs/sqwebmail locations
and verify their applicability for the updated source tree.

Build:
- Update distinfo and packaging metadata to match courier 1.5.1 and
adjust install targets to install-strip and install-perms.
- Normalize Makefile formatting and variables (ETCDIR, PLIST_SUB, USES,
SUB_FILES) for consistency with modern mports practices.

Tests:
- Add and adjust rfc2045 test-suite patches to keep MIME parsing tests
building and running against newer C++ toolchains.

Chores:
- Drop the long-standing, mports-only patch to courier submit.C that no
longer applies and had no counterpart in FreeBSD.
- Update plist markers and SUB_LIST usage to match OPTIONS_SUB naming
(e.g., LDAP, SENDFAX, UUCP, CERTSDIR) and keep packaging correct for all
option sets.

Signed-off-by: Lucas Holt <luke at foolishgames.com>



To unsubscribe from these emails, change your notification settings at https://github.com/MidnightBSD/mports/settings/notifications



More information about the Midnightbsd-cvs mailing list