imapfilter: Import from mail/imapfilter, update to 2.7.4

IMAPFilter 2.7.4 - 18 Nov 2020
  - Bug fix; incorrect argument to regular expression compile function.

IMAPFilter 2.7.3 - 14 Nov 2020
  - Bug fix; incorrect free of compiled pattern.
  - Unexpected network errors and IMAP BYE are now logged.

IMAPFilter 2.7.2 - 10 Nov 2020
  - Makefile is back to being Lua version agnostic.

IMAPFilter 2.7.1 - 9 Nov 2020
  - Makefile now builds with Lua 5.4 and PCRE2.

IMAPFilter 2.7 - 8 Nov 2020
  - Lua 5.4 compatibility (the codebase can still be compiled with versions
    5.3, 5.2 and 5.1).
  - PCRE2 compatibility (version 10.00 and later)
  - New error code is returned if certificate verify fails.
  - Bug fix; add missing truststore option from brief usage message.

IMAPFilter 2.6.16 - 23 Nov 2019
  - Bug fix; escape the double-quote character in passwords.

IMAPFilter 2.6.15 - 14 Nov 2019
  - Bug fix; try to setup both a CA file and path for SSL validations.

IMAPFilter 2.6.14 - 1 Nov 2019
  - Bug fix; OpenSSL version mess up for SSL hostname validation.

IMAPFilter 2.6.13 - 17 Sep 2019
  - Support for SSL hostname validation.

IMAPFilter 2.6.12 - 3 Oct 2018
  - Support for Server Name Indication (SNI).
  - The searching methods return values are described in the config man page.
  - Example of using the enter_idle() function in the sample extend file.

IMAPFilter 2.6.11 - 19 Nov 2017
  - Support for interrupting IDLE mode with SIGUSR1/SIGUSR2.
  - New "persist" option to try to recover a connection indefinitely.
  - New "range" option to limit messages included in a range.
  - Bug fix; always close selected mailbox before check_status().
  - Bug fix; closing of selected mailbox twice with fetch_message().
This commit is contained in:
snow flurry 2020-11-25 23:36:39 -08:00
parent c9c68a4718
commit 1200b4ae16
5 changed files with 119 additions and 0 deletions

4
imapfilter/DESCR Normal file
View File

@ -0,0 +1,4 @@
IMAPFilter is a mail filtering utility. It connects to remote mail
servers using the Internet Message Access Protocol (IMAP). Based on
the user defined filters it checks messages residing on a remote IMAP
mailbox and processes them in various ways.

26
imapfilter/Makefile Normal file
View File

@ -0,0 +1,26 @@
# $NetBSD: Makefile,v 1.47 2020/01/18 21:49:50 jperkin Exp $
DISTNAME= imapfilter-2.7.4
CATEGORIES= mail
MASTER_SITES= ${MASTER_SITE_GITHUB:=lefcha/}
GITHUB_TAG= v${PKGVERSION_NOREV}
MAINTAINER= pkgsrc-users@NetBSD.org
HOMEPAGE= http://imapfilter.hellug.gr/
COMMENT= Mail filtering utility for the IMAP
LICENSE= mit
LDFLAGS.SunOS+= -lsocket -lnsl
LIBS.Linux+= -ldl
INSTALLATION_DIRS= share/examples/imapfilter
post-install:
.for f in config.lua extend.lua
${INSTALL_DATA} ${WRKSRC}/samples/${f} \
${DESTDIR}${PREFIX}/share/examples/imapfilter
.endfor
.include "../../devel/pcre2/buildlink3.mk"
.include "../../lang/lua/buildlink3.mk"
.include "../../security/openssl/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"

14
imapfilter/PLIST Normal file
View File

@ -0,0 +1,14 @@
@comment $NetBSD: PLIST,v 1.6 2013/07/19 13:58:56 degroote Exp $
bin/imapfilter
man/man1/imapfilter.1
man/man5/imapfilter_config.5
share/examples/imapfilter/config.lua
share/examples/imapfilter/extend.lua
share/imapfilter/account.lua
share/imapfilter/auxiliary.lua
share/imapfilter/common.lua
share/imapfilter/mailbox.lua
share/imapfilter/message.lua
share/imapfilter/options.lua
share/imapfilter/regex.lua
share/imapfilter/set.lua

7
imapfilter/distinfo Normal file
View File

@ -0,0 +1,7 @@
$NetBSD: distinfo,v 1.26 2017/02/25 00:24:11 mef Exp $
SHA1 (imapfilter-2.7.4.tar.gz) = e06a0ba5dce10627aa1e86aacea76b1f1881e92a
RMD160 (imapfilter-2.7.4.tar.gz) = 340eb44b3efd9e44af561d08c1a5da51deccc78f
SHA512 (imapfilter-2.7.4.tar.gz) = cfc1d2371d44166d45f77eeef960083ba4da9dc0909c21bfd6f6c6920b32560a68abd928ca3a3d918e5c461a21730fc59976bf9353cfee95764a03d05318401e
Size (imapfilter-2.7.4.tar.gz) = 59361 bytes
SHA1 (patch-src_Makefile) = be705d5c9a52152ee41657321535dd60e19622ab

View File

@ -0,0 +1,68 @@
$NetBSD$
Use pkgsrc layout/flags.
--- src/Makefile.orig 2020-11-18 21:30:58.000000000 +0000
+++ src/Makefile
@@ -2,7 +2,7 @@ DESTDIR ?=
PREFIX ?= /usr/local
BINDIR = $(PREFIX)/bin
SHAREDIR = $(PREFIX)/share/imapfilter
-MANDIR = $(PREFIX)/man
+MANDIR = $(PREFIX)/$(PKGMANDIR)
SSLCAPATH = /etc/ssl/certs
SSLCAFILE = /etc/ssl/cert.pem
@@ -19,13 +19,13 @@ LIBPCRE = -lpcre2-8
LIBSSL = -lssl
LIBCRYPTO = -lcrypto
-CFLAGS = -Wall -Wextra -O \
+CFLAGS += -Wall -Wextra -O \
-DCONFIG_SHAREDIR='"$(SHAREDIR)"' \
-DCONFIG_SSL_CAPATH='"$(SSLCAPATH)"' \
-DCONFIG_SSL_CAFILE='"$(SSLCAFILE)"' \
$(INCDIRS) $(MYCFLAGS)
-LDFLAGS = $(LIBDIRS) $(MYLDFLAGS)
-LIBS = -lm -ldl $(LIBLUA) $(LIBPCRE) $(LIBSSL) $(LIBCRYPTO) $(MYLIBS)
+LDFLAGS += $(LIBDIRS) $(MYLDFLAGS)
+LIBS += -lm $(LIBLUA) $(LIBPCRE) $(LIBSSL) $(LIBCRYPTO) $(MYLIBS)
MAN1 = imapfilter.1
MAN5 = imapfilter_config.5
@@ -41,7 +41,7 @@ OBJ = auth.o buffer.o cert.o core.o file
all: $(BIN)
$(BIN): $(OBJ)
- $(CC) -o $(BIN) $(LDFLAGS) $(OBJ) $(LIBS)
+ $(CC) -o $(BIN) $(LDFLAGS) $(CFLAGS) $(OBJ) $(LIBS)
$(OBJ): imapfilter.h
buffer.o: buffer.h
@@ -59,18 +59,14 @@ session.o: list.h session.h
socket.o: session.h
install: $(BIN)
- mkdir -p $(DESTDIR)$(BINDIR) && \
- cp -f $(BIN) $(DESTDIR)$(BINDIR) && \
- chmod 0755 $(DESTDIR)$(BINDIR)/$(BIN)
- mkdir -p $(DESTDIR)$(SHAREDIR) && \
- cp -f $(LUA) $(DESTDIR)$(SHAREDIR) && \
- chmod 0644 $(DESTDIR)$(SHAREDIR)/$(LUA)
- mkdir -p $(DESTDIR)$(MANDIR)/man1 && \
- cp -f ../doc/$(MAN1) $(DESTDIR)$(MANDIR)/man1 && \
- chmod 0644 $(DESTDIR)$(MANDIR)/man1/$(MAN1)
- mkdir -p $(DESTDIR)$(MANDIR)/man5 && \
- cp -f ../doc/$(MAN5) $(DESTDIR)$(MANDIR)/man5 && \
- chmod 0644 $(DESTDIR)$(MANDIR)/man5/$(MAN5)
+ $(BSD_INSTALL_PROGRAM_DIR) $(DESTDIR)$(BINDIR)
+ $(BSD_INSTALL_PROGRAM) $(BIN) $(DESTDIR)$(BINDIR)/$(BIN)
+ $(BSD_INSTALL_DATA_DIR) $(DESTDIR)$(SHAREDIR)
+ $(BSD_INSTALL_DATA) $(LUA) $(DESTDIR)$(SHAREDIR)/
+ $(BSD_INSTALL_MAN_DIR) $(DESTDIR)$(MANDIR)/man1
+ $(BSD_INSTALL_MAN) ../doc/$(MAN1) $(DESTDIR)$(MANDIR)/man1/$(MAN1)
+ $(BSD_INSTALL_MAN_DIR) $(DESTDIR)$(MANDIR)/man5
+ $(BSD_INSTALL_MAN) ../doc/$(MAN5) $(DESTDIR)$(MANDIR)/man5/$(MAN5)
uninstall:
rm -f $(DESTDIR)$(BINDIR)/$(BIN)