git: d04cc57387b1 - main - mail/goimapnotify: Add new port

From: Yusuf Yaman <nxjoseph_at_FreeBSD.org>
Date: Mon, 11 May 2026 12:37:30 UTC
The branch main has been updated by nxjoseph:

URL: https://cgit.FreeBSD.org/ports/commit/?id=d04cc57387b1b996f46d72b735468906745aead5

commit d04cc57387b1b996f46d72b735468906745aead5
Author:     Denis Shaposhnikov <dsh@bamus.cz>
AuthorDate: 2025-11-28 14:48:09 +0000
Commit:     Yusuf Yaman <nxjoseph@FreeBSD.org>
CommitDate: 2026-05-11 12:37:01 +0000

    mail/goimapnotify: Add new port
    
    Execute scripts on IMAP mailbox changes
    (new/deleted/updated messages) using IDLE.
    WWW: https://gitlab.com/shackra/goimapnotify
    
    PR:             290048
    Reported by:    Denis Shaposhnikov <dsh@bamus.cz>
    Co-authored-by: Julian Weigt <juw@posteo.de>
    Approved by:    osa (mentor)
---
 GIDs                                             |   2 +-
 UIDs                                             |   2 +-
 mail/Makefile                                    |   1 +
 mail/goimapnotify/Makefile                       |  78 ++++++++++++++
 mail/goimapnotify/distinfo                       |  59 +++++++++++
 mail/goimapnotify/files/goimapnotify.in          |  54 ++++++++++
 mail/goimapnotify/files/goimapnotify.yaml.sample |  48 +++++++++
 mail/goimapnotify/files/modules.txt              | 129 +++++++++++++++++++++++
 mail/goimapnotify/files/pkg-message.in           |  15 +++
 mail/goimapnotify/pkg-descr                      |   2 +
 10 files changed, 388 insertions(+), 2 deletions(-)

diff --git a/GIDs b/GIDs
index c3368d7782c8..667f4b2c7287 100644
--- a/GIDs
+++ b/GIDs
@@ -327,7 +327,7 @@ cascade:*:383:
 omada:*:384:
 mtail:*:385:
 zoraxy:*:386:
-# free: 387
+goimapnotify:*:387:
 autopulse:*:388:
 ldap:*:389:
 # free: 390
diff --git a/UIDs b/UIDs
index e4e53c9d189a..9a78d86ae02f 100644
--- a/UIDs
+++ b/UIDs
@@ -333,7 +333,7 @@ cascade:*:383:383::0:0:Cascade Daemon:/var/db/cascade:/usr/sbin/nologin
 omada:*:384:384::0:0:Omada Wireless Controller:/nonexistent:/usr/sbin/nologin
 mtail:*:385:385::0:0:mtail:/nonexistent:/usr/sbin/nologin
 zoraxy:*:386:386::0:0:Zoraxy Service:/nonexistent:/usr/sbin/nologin
-# free: 387
+goimapnotify:*:387:387::0:0:Goimapnotify Daemon:/nonexistent:/usr/sbin/nologin
 autopulse:*:388:388::0:0:Autopulse Daemon:/nonexistent:/usr/sbin/nologin
 ldap:*:389:389::0:0:OpenLDAP Server:/nonexistent:/usr/sbin/nologin
 # free: 390
diff --git a/mail/Makefile b/mail/Makefile
index b42166297862..9e31e9f4a9f6 100644
--- a/mail/Makefile
+++ b/mail/Makefile
@@ -147,6 +147,7 @@
     SUBDIR += gnarwl
     SUBDIR += gnubiff
     SUBDIR += gnumail
+    SUBDIR += goimapnotify
     SUBDIR += gotmail
     SUBDIR += grepmail
     SUBDIR += greyfix
diff --git a/mail/goimapnotify/Makefile b/mail/goimapnotify/Makefile
new file mode 100644
index 000000000000..bcb6a1040f1e
--- /dev/null
+++ b/mail/goimapnotify/Makefile
@@ -0,0 +1,78 @@
+PORTNAME=	goimapnotify
+DISTVERSION=	2.5.5
+CATEGORIES=	mail
+
+MAINTAINER=	juw@posteo.de
+COMMENT=	Execute scripts on IMAP mailbox changes using IDLE
+WWW=		https://gitlab.com/shackra/goimapnotify
+
+LICENSE=	GPLv3
+LICENSE_FILE=	${WRKSRC}/LICENSE
+
+USES=		go:modules
+USE_GITHUB=	nodefault
+GH_TUPLE=	emersion:go-imap-id:f94a56b9ecde:emersion_go_imap_id/vendor/github.com/emersion/go-imap-id \
+		emersion:go-imap-idle:db2568431445:emersion_go_imap_idle/vendor/github.com/emersion/go-imap-idle \
+		emersion:go-imap:v1.2.1:emersion_go_imap/vendor/github.com/emersion/go-imap \
+		emersion:go-sasl:e73c9f7bad43:emersion_go_sasl/vendor/github.com/emersion/go-sasl \
+		fatih:color:v1.16.0:fatih_color/vendor/github.com/fatih/color \
+		fsnotify:fsnotify:v1.7.0:fsnotify_fsnotify/vendor/github.com/fsnotify/fsnotify \
+		go-ini:ini:v1.67.0:go_ini_ini/vendor/gopkg.in/ini.v1 \
+		go-yaml:yaml:v3.0.1:go_yaml_yaml/vendor/gopkg.in/yaml.v3 \
+		golang:exp:921286631fa9:golang_exp/vendor/golang.org/x/exp \
+		golang:sys:v0.18.0:golang_sys/vendor/golang.org/x/sys \
+		golang:text:v0.14.0:golang_text/vendor/golang.org/x/text \
+		hashicorp:hcl:v1.0.0:hashicorp_hcl/vendor/github.com/hashicorp/hcl \
+		magiconair:properties:v1.8.7:magiconair_properties/vendor/github.com/magiconair/properties \
+		mattn:go-colorable:v0.1.13:mattn_go_colorable/vendor/github.com/mattn/go-colorable \
+		mattn:go-isatty:v0.0.20:mattn_go_isatty/vendor/github.com/mattn/go-isatty \
+		mitchellh:mapstructure:v1.5.0:mitchellh_mapstructure/vendor/github.com/mitchellh/mapstructure \
+		pelletier:go-toml:v2.2.2:pelletier_go_toml_v2/vendor/github.com/pelletier/go-toml/v2 \
+		sagikazarmark:locafero:v0.4.0:sagikazarmark_locafero/vendor/github.com/sagikazarmark/locafero \
+		sagikazarmark:slog-shim:v0.1.0:sagikazarmark_slog_shim/vendor/github.com/sagikazarmark/slog-shim \
+		sirupsen:logrus:v1.8.1:sirupsen_logrus/vendor/github.com/sirupsen/logrus \
+		sourcegraph:conc:v0.3.0:sourcegraph_conc/vendor/github.com/sourcegraph/conc \
+		spf13:afero:v1.11.0:spf13_afero/vendor/github.com/spf13/afero \
+		spf13:cast:v1.6.0:spf13_cast/vendor/github.com/spf13/cast \
+		spf13:pflag:v1.0.5:spf13_pflag/vendor/github.com/spf13/pflag \
+		spf13:viper:v1.19.0:spf13_viper/vendor/github.com/spf13/viper \
+		subosito:gotenv:v1.6.0:subosito_gotenv/vendor/github.com/subosito/gotenv \
+		uber-go:atomic:v1.9.0:uber_go_atomic/vendor/go.uber.org/atomic \
+		uber-go:multierr:v1.9.0:uber_go_multierr/vendor/go.uber.org/multierr
+USE_GITLAB=	yes
+GL_ACCOUNT=	shackra
+USE_RC_SUBR=	${PORTNAME}
+
+GO_TARGET=	./cmd/${PORTNAME}
+_BUILD_COMMIT=	bcc9d8d5
+_BUILD_XFLAGS=	main.commit=${_BUILD_COMMIT} \
+		main.gittag=${DISTVERSIONFULL} \
+		main.branch=master
+GO_BUILDFLAGS=	-ldflags="${STRIP} ${_BUILD_XFLAGS:S!^!-X !}"
+
+SUB_FILES=	pkg-message
+SUB_LIST=	ETCDIR="${ETCDIR}" \
+		GROUPS="${IMAPNOTIFYGROUP}" \
+		USERS="${IMAPNOTIFYUSER}"
+
+IMAPNOTIFYUSER?=	${PORTNAME}
+IMAPNOTIFYGROUP?=	${PORTNAME}
+.if ${IMAPNOTIFYUSER} == ${PORTNAME}
+USERS=		${PORTNAME}
+.endif
+.if ${IMAPNOTIFYGROUP} == ${PORTNAME}
+GROUPS=		${PORTNAME}
+.endif
+
+PLIST_FILES=	"@sample(${USERS},${GROUPS},640) ${ETCDIR}/${PORTNAME}.yaml.sample" \
+		bin/${PORTNAME}
+
+post-patch:
+	${CP} ${FILESDIR}/modules.txt ${WRKSRC}/vendor
+
+post-install:
+	@${MKDIR} ${STAGEDIR}${ETCDIR}
+	${INSTALL_DATA} ${FILESDIR}/${PORTNAME}.yaml.sample \
+		${STAGEDIR}${ETCDIR}
+
+.include <bsd.port.mk>
diff --git a/mail/goimapnotify/distinfo b/mail/goimapnotify/distinfo
new file mode 100644
index 000000000000..83cc88ade310
--- /dev/null
+++ b/mail/goimapnotify/distinfo
@@ -0,0 +1,59 @@
+TIMESTAMP = 1777673920
+SHA256 (emersion-go-imap-id-f94a56b9ecde_GH0.tar.gz) = 45c634ef793a9fe44df1897baadb3bebf8812d98bc2d6f3a09b3186e048e1337
+SIZE (emersion-go-imap-id-f94a56b9ecde_GH0.tar.gz) = 3025
+SHA256 (emersion-go-imap-idle-db2568431445_GH0.tar.gz) = fd431719af7330445ffb439e6cbc01519745d45e8ca121a055c5fed43428f88a
+SIZE (emersion-go-imap-idle-db2568431445_GH0.tar.gz) = 4882
+SHA256 (emersion-go-imap-v1.2.1_GH0.tar.gz) = 5491725275b90e05f2ed98e5273688e5f05a8a488b0c5ce504f60aa19c9d8791
+SIZE (emersion-go-imap-v1.2.1_GH0.tar.gz) = 103546
+SHA256 (emersion-go-sasl-e73c9f7bad43_GH0.tar.gz) = 93381ea17213dac9527a856d0119992dbc59fd5fb845716732a6ba300ad54fd1
+SIZE (emersion-go-sasl-e73c9f7bad43_GH0.tar.gz) = 7362
+SHA256 (fatih-color-v1.16.0_GH0.tar.gz) = 0823ac3e80d523cc9f6062000621f722bd858bad411c3ff7b2cd012e6aaf1b90
+SIZE (fatih-color-v1.16.0_GH0.tar.gz) = 12115
+SHA256 (fsnotify-fsnotify-v1.7.0_GH0.tar.gz) = ca8175ba6bd3d0cc992200c2f44acabec05367575dc0478c5902971fe7453f35
+SIZE (fsnotify-fsnotify-v1.7.0_GH0.tar.gz) = 57502
+SHA256 (go-ini-ini-v1.67.0_GH0.tar.gz) = 06ba51234140118d1b6064f1817aa89cc971c6e7ce04cb9d286e6660d89296c8
+SIZE (go-ini-ini-v1.67.0_GH0.tar.gz) = 53531
+SHA256 (go-yaml-yaml-v3.0.1_GH0.tar.gz) = cf05411540d3e6ef8f1fd88434b34f94cedaceb540329031d80e23b74540c4e5
+SIZE (go-yaml-yaml-v3.0.1_GH0.tar.gz) = 91173
+SHA256 (golang-exp-921286631fa9_GH0.tar.gz) = b977f1b4423bf62333597c2150bee6312a926abc1f9af59463eb2a34d4c2c8b9
+SIZE (golang-exp-921286631fa9_GH0.tar.gz) = 1634466
+SHA256 (golang-sys-v0.18.0_GH0.tar.gz) = cee1944ab655ddf7eab6301e15cb6d01fdd6cd0a0f0b5896050ee60b124e084c
+SIZE (golang-sys-v0.18.0_GH0.tar.gz) = 1448211
+SHA256 (golang-text-v0.14.0_GH0.tar.gz) = c80295e75bda599d17ccf74038139b0957b9915fae4e60d8b46f89454ef171a0
+SIZE (golang-text-v0.14.0_GH0.tar.gz) = 8974094
+SHA256 (hashicorp-hcl-v1.0.0_GH0.tar.gz) = 50632428210503070fd2fde748c88b7414bf84a6a0eadebf9d8e596a033bead2
+SIZE (hashicorp-hcl-v1.0.0_GH0.tar.gz) = 70658
+SHA256 (magiconair-properties-v1.8.7_GH0.tar.gz) = 09e950df1970975400edc7f6c2f9e3edace4e1ea49f823006387d130fb0f4f03
+SIZE (magiconair-properties-v1.8.7_GH0.tar.gz) = 31425
+SHA256 (mattn-go-colorable-v0.1.13_GH0.tar.gz) = c3b62c76d365906bba9aa9d9ec048fd33a2a5742299d6482a08e7466d4c52d77
+SIZE (mattn-go-colorable-v0.1.13_GH0.tar.gz) = 9762
+SHA256 (mattn-go-isatty-v0.0.20_GH0.tar.gz) = 18fc42a278e60fb7a1dffa72f20539ae88d0e292db55b513ef514b7d369883a6
+SIZE (mattn-go-isatty-v0.0.20_GH0.tar.gz) = 4713
+SHA256 (mitchellh-mapstructure-v1.5.0_GH0.tar.gz) = 81106cbac93000812c194b4a2069dd32913ec18819b1e99e8436595ce4939413
+SIZE (mitchellh-mapstructure-v1.5.0_GH0.tar.gz) = 30123
+SHA256 (pelletier-go-toml-v2.2.2_GH0.tar.gz) = 8c5c1107f764d5abc50cfa5721a1c5fd43a30ad09f84105c5c5bcbbd1290fb25
+SIZE (pelletier-go-toml-v2.2.2_GH0.tar.gz) = 909040
+SHA256 (sagikazarmark-locafero-v0.4.0_GH0.tar.gz) = 9ca93b1d037912d27bbd11689c8a14b15f151df2cd2391648df67465423364c1
+SIZE (sagikazarmark-locafero-v0.4.0_GH0.tar.gz) = 9674
+SHA256 (sagikazarmark-slog-shim-v0.1.0_GH0.tar.gz) = a594ec7e138265768a5c23f8ab460724d8215db45dc1bddde4743bca3373803d
+SIZE (sagikazarmark-slog-shim-v0.1.0_GH0.tar.gz) = 10872
+SHA256 (sirupsen-logrus-v1.8.1_GH0.tar.gz) = e9492c08ac8f202b438ccfb992bf81b7860739cf8f2266958e0c574c7abfdd74
+SIZE (sirupsen-logrus-v1.8.1_GH0.tar.gz) = 47161
+SHA256 (sourcegraph-conc-v0.3.0_GH0.tar.gz) = c20a36ef6e8cd4721b8824d3e0a590d78f56ce72ace53ec7fdd2f7a978e9240f
+SIZE (sourcegraph-conc-v0.3.0_GH0.tar.gz) = 23021
+SHA256 (spf13-afero-v1.11.0_GH0.tar.gz) = f83f67c4a03d8bba2b7fe1a496e848b2b1b7d97d0b951d85d2b401e7488a4ed4
+SIZE (spf13-afero-v1.11.0_GH0.tar.gz) = 89257
+SHA256 (spf13-cast-v1.6.0_GH0.tar.gz) = 8eef6bfd96458f061dd738f6e146b7687bdde18f996258c9bab0f574f8c36ae8
+SIZE (spf13-cast-v1.6.0_GH0.tar.gz) = 15616
+SHA256 (spf13-pflag-v1.0.5_GH0.tar.gz) = 9a2cae1f8e8ab0d2cc8ebe468e871af28d9ac0962cf0520999e3ba85f0c7b808
+SIZE (spf13-pflag-v1.0.5_GH0.tar.gz) = 50796
+SHA256 (spf13-viper-v1.19.0_GH0.tar.gz) = bd754a586de7b8f6e54037b715765833f8120cb8bdbb4240a69c6537a0ccdfd5
+SIZE (spf13-viper-v1.19.0_GH0.tar.gz) = 119990
+SHA256 (subosito-gotenv-v1.6.0_GH0.tar.gz) = 51a5a8e36f30ddd97866779e93c4e93b0d4958a60fabd1d17fc2226bfe7823db
+SIZE (subosito-gotenv-v1.6.0_GH0.tar.gz) = 11470
+SHA256 (uber-go-atomic-v1.9.0_GH0.tar.gz) = a6b11bb77c479298cdfdfdf2132975dbd975322b619451378cbdf731facd874a
+SIZE (uber-go-atomic-v1.9.0_GH0.tar.gz) = 21331
+SHA256 (uber-go-multierr-v1.9.0_GH0.tar.gz) = 0664e6c869ca2bef1851b77b9384d8fb1a5f41514b4b174da340e31c616da028
+SIZE (uber-go-multierr-v1.9.0_GH0.tar.gz) = 15662
+SHA256 (goimapnotify-2.5.5.tar.bz2) = 3d6a2a724d5a5b9d074b01ce6cbbf99425c6fbfdcfd2a530c8a5367b26a6f74f
+SIZE (goimapnotify-2.5.5.tar.bz2) = 59705
diff --git a/mail/goimapnotify/files/goimapnotify.in b/mail/goimapnotify/files/goimapnotify.in
new file mode 100644
index 000000000000..9179ea3c4cfa
--- /dev/null
+++ b/mail/goimapnotify/files/goimapnotify.in
@@ -0,0 +1,54 @@
+#!/bin/sh
+
+# PROVIDE: goimapnotify
+# REQUIRE: LOGIN
+# KEYWORD: shutdown
+#
+# Add these lines to /etc/rc.conf.local or /etc/rc.conf
+# to enable this service:
+#
+# goimapnotify_enable (bool):	Set to NO by default.
+#				Set it to YES to enable goimapnotify.
+# goimapnotify_config (path):	Set to %%ETCDIR%%/goimapnotify.yaml
+#				by default.
+# goimapnotify_logfile (path):	Set to /var/log/goimapnotify.log
+#				by default.
+# goimapnotify_user (user):	Set user to run goimapnotify.
+#				Default is "goimapnotify".
+# goimapnotify_group (group):	Set group to run goimapnotify.
+#				Default is "goimapnotify".
+
+. /etc/rc.subr
+
+desc="Execute scripts on IMAP mailbox changes using IDLE"
+name=goimapnotify
+rcvar=goimapnotify_enable
+
+load_rc_config $name
+
+: ${goimapnotify_enable:=NO}
+: ${goimapnotify_config=%%ETCDIR%%/goimapnotify.yaml}
+: ${goimapnotify_logfile=/var/log/goimapnotify.log}
+: ${goimapnotify_user=%%USERS%%}
+: ${goimapnotify_group=%%GROUPS%%}
+
+command=/usr/sbin/daemon
+procname=/usr/local/bin/goimapnotify
+pidfile=/var/run/${name}.pid
+
+command_args="-cf -p ${pidfile} -o ${goimapnotify_logfile} -H ${procname} -conf ${goimapnotify_config}"
+
+start_precmd=goimapnotify_startprecmd
+
+goimapnotify_startprecmd()
+{
+	if [ ! -e ${pidfile} ]; then
+		install -o ${goimapnotify_user} -g ${goimapnotify_group} /dev/null ${pidfile}
+	fi
+
+	if [ ! -e ${goimapnotify_logfile} ]; then
+		install -o ${goimapnotify_user} -g ${goimapnotify_group} /dev/null ${goimapnotify_logfile}
+	fi
+}
+
+run_rc_command "$1"
diff --git a/mail/goimapnotify/files/goimapnotify.yaml.sample b/mail/goimapnotify/files/goimapnotify.yaml.sample
new file mode 100644
index 000000000000..a01a9111f43b
--- /dev/null
+++ b/mail/goimapnotify/files/goimapnotify.yaml.sample
@@ -0,0 +1,48 @@
+configurations:
+    -
+        host: example.com
+        port: 143
+        tls: true
+        tlsOptions:
+            rejectUnauthorized: false
+            starttls: true
+        idleLogoutTimeout: 15
+        username: USERNAME
+        alias: ExampleCOM
+        password: PASSWORD
+        xoAuth2: false
+        boxes:
+            -
+                mailbox: INBOX
+                onNewMail: 'mbsync examplecom:INBOX'
+                onChangedMail: 'mbsync examplenet:INBOX'
+                onChangedMailPost: SKIP
+                onNewMailPost: SKIP
+    -
+        hostCMD: COMMAND_TO_RETRIEVE_HOST
+        port: 993
+        tls: true
+        tlsOptions:
+            rejectUnauthorized: true
+            starttls: true
+        username: ''
+        usernameCMD: ''
+        password: ''
+        passwordCMD: ''
+        xoAuth2: false
+        onNewMail: ''
+        onNewMailPost: ''
+        onChangedMail: ''
+        onChangedMailPost: ''
+        onDeletedMail: ''
+        onDeletedMailPost: ''
+        boxes:
+            -
+                mailbox: INBOX
+                onNewMail: 'mbsync examplenet:INBOX'
+                onNewMailPost: SKIP
+                onChangedMail: 'mbsync examplenet:INBOX'
+            -
+                mailbox: Junk
+                onNewMail: 'mbsync examplenet:Junk'
+                onNewMailPost: SKIP
diff --git a/mail/goimapnotify/files/modules.txt b/mail/goimapnotify/files/modules.txt
new file mode 100644
index 000000000000..9fcebe0fc5aa
--- /dev/null
+++ b/mail/goimapnotify/files/modules.txt
@@ -0,0 +1,129 @@
+# github.com/emersion/go-imap v1.2.1
+## explicit; go 1.13
+github.com/emersion/go-imap
+github.com/emersion/go-imap/backend
+github.com/emersion/go-imap/client
+github.com/emersion/go-imap/commands
+github.com/emersion/go-imap/responses
+github.com/emersion/go-imap/server
+github.com/emersion/go-imap/utf7
+# github.com/emersion/go-imap-id v0.0.0-20190926060100-f94a56b9ecde
+## explicit
+github.com/emersion/go-imap-id
+# github.com/emersion/go-imap-idle v0.0.0-20210907174914-db2568431445
+## explicit; go 1.13
+github.com/emersion/go-imap-idle
+# github.com/emersion/go-sasl v0.0.0-20231106173351-e73c9f7bad43
+## explicit; go 1.12
+github.com/emersion/go-sasl
+# github.com/fatih/color v1.16.0
+## explicit; go 1.17
+github.com/fatih/color
+# github.com/fsnotify/fsnotify v1.7.0
+## explicit; go 1.17
+github.com/fsnotify/fsnotify
+# github.com/hashicorp/hcl v1.0.0
+## explicit
+github.com/hashicorp/hcl
+github.com/hashicorp/hcl/hcl/ast
+github.com/hashicorp/hcl/hcl/parser
+github.com/hashicorp/hcl/hcl/printer
+github.com/hashicorp/hcl/hcl/scanner
+github.com/hashicorp/hcl/hcl/strconv
+github.com/hashicorp/hcl/hcl/token
+github.com/hashicorp/hcl/json/parser
+github.com/hashicorp/hcl/json/scanner
+github.com/hashicorp/hcl/json/token
+# github.com/magiconair/properties v1.8.7
+## explicit; go 1.19
+github.com/magiconair/properties
+# github.com/mattn/go-colorable v0.1.13
+## explicit; go 1.15
+github.com/mattn/go-colorable
+# github.com/mattn/go-isatty v0.0.20
+## explicit; go 1.15
+github.com/mattn/go-isatty
+# github.com/mitchellh/mapstructure v1.5.0
+## explicit; go 1.14
+github.com/mitchellh/mapstructure
+# github.com/pelletier/go-toml/v2 v2.2.2
+## explicit; go 1.16
+github.com/pelletier/go-toml/v2
+github.com/pelletier/go-toml/v2/internal/characters
+github.com/pelletier/go-toml/v2/internal/danger
+github.com/pelletier/go-toml/v2/internal/tracker
+github.com/pelletier/go-toml/v2/unstable
+# github.com/sagikazarmark/locafero v0.4.0
+## explicit; go 1.20
+github.com/sagikazarmark/locafero
+# github.com/sagikazarmark/slog-shim v0.1.0
+## explicit; go 1.20
+github.com/sagikazarmark/slog-shim
+# github.com/sirupsen/logrus v1.8.1
+## explicit; go 1.13
+github.com/sirupsen/logrus
+# github.com/sourcegraph/conc v0.3.0
+## explicit; go 1.19
+github.com/sourcegraph/conc
+github.com/sourcegraph/conc/internal/multierror
+github.com/sourcegraph/conc/iter
+github.com/sourcegraph/conc/panics
+# github.com/spf13/afero v1.11.0
+## explicit; go 1.19
+github.com/spf13/afero
+github.com/spf13/afero/internal/common
+github.com/spf13/afero/mem
+# github.com/spf13/cast v1.6.0
+## explicit; go 1.19
+github.com/spf13/cast
+# github.com/spf13/pflag v1.0.5
+## explicit; go 1.12
+github.com/spf13/pflag
+# github.com/spf13/viper v1.19.0
+## explicit; go 1.20
+github.com/spf13/viper
+github.com/spf13/viper/internal/encoding
+github.com/spf13/viper/internal/encoding/dotenv
+github.com/spf13/viper/internal/encoding/hcl
+github.com/spf13/viper/internal/encoding/ini
+github.com/spf13/viper/internal/encoding/javaproperties
+github.com/spf13/viper/internal/encoding/json
+github.com/spf13/viper/internal/encoding/toml
+github.com/spf13/viper/internal/encoding/yaml
+github.com/spf13/viper/internal/features
+# github.com/subosito/gotenv v1.6.0
+## explicit; go 1.18
+github.com/subosito/gotenv
+# go.uber.org/atomic v1.9.0
+## explicit; go 1.13
+go.uber.org/atomic
+# go.uber.org/multierr v1.9.0
+## explicit; go 1.19
+go.uber.org/multierr
+# golang.org/x/exp v0.0.0-20230905200255-921286631fa9
+## explicit; go 1.20
+golang.org/x/exp/constraints
+golang.org/x/exp/slices
+golang.org/x/exp/slog
+golang.org/x/exp/slog/internal
+golang.org/x/exp/slog/internal/buffer
+# golang.org/x/sys v0.18.0
+## explicit; go 1.18
+golang.org/x/sys/unix
+golang.org/x/sys/windows
+# golang.org/x/text v0.14.0
+## explicit; go 1.18
+golang.org/x/text/encoding
+golang.org/x/text/encoding/internal
+golang.org/x/text/encoding/internal/identifier
+golang.org/x/text/encoding/unicode
+golang.org/x/text/internal/utf8internal
+golang.org/x/text/runes
+golang.org/x/text/transform
+golang.org/x/text/unicode/norm
+# gopkg.in/ini.v1 v1.67.0
+## explicit
+gopkg.in/ini.v1
+# gopkg.in/yaml.v3 v3.0.1
+## explicit
+gopkg.in/yaml.v3
diff --git a/mail/goimapnotify/files/pkg-message.in b/mail/goimapnotify/files/pkg-message.in
new file mode 100644
index 000000000000..2f4644fd8d65
--- /dev/null
+++ b/mail/goimapnotify/files/pkg-message.in
@@ -0,0 +1,15 @@
+[
+{ type: install
+  message: <<EOM
+You can run this program in these two methods:
+ 1. Use the rc.d service to run it as a daemon after editing the configuration file in %%ETCDIR%%/goimapnotify.yaml.
+    # sudo edit %%ETCDIR%%/goimapnotify.yaml # replace edit with your choice of editor, by default: ee
+    # service goimapnotify enable
+    # service goimapnotify start
+    NOTE: the log file will be in /var/log/goimapnotify.log.
+ 2. Copy the configuration file from %%ETCDIR%% to your home directory, edit it as appropriate and run the program in your terminal.
+    # mkdir -p $HOME/.config/goimapnotify
+    # cp %%ETCDIR%%/goimapnotify.yaml $HOME/.config/goimapnotify
+EOM
+}
+]
diff --git a/mail/goimapnotify/pkg-descr b/mail/goimapnotify/pkg-descr
new file mode 100644
index 000000000000..a8f460dd909f
--- /dev/null
+++ b/mail/goimapnotify/pkg-descr
@@ -0,0 +1,2 @@
+Execute scripts on IMAP mailbox changes (new/deleted/updated messages) using
+IDLE.