diff options
author | taca <taca@pkgsrc.org> | 2021-08-14 08:58:20 +0000 |
---|---|---|
committer | taca <taca@pkgsrc.org> | 2021-08-14 08:58:20 +0000 |
commit | a6f43fabd00f9d5ae89b4ebc234469def334138e (patch) | |
tree | 5265287cd9c9cfa3a79359fdf90c686ba7c59c54 /mail/postfix | |
parent | 02284c7cb6816a9ad5102b5cbebf996614182ca2 (diff) | |
download | pkgsrc-a6f43fabd00f9d5ae89b4ebc234469def334138e.tar.gz |
mail/postfix: add blocklist PKG_OPTIONS and fix build problem
* Add blocklist PKG_OPTIONS.
* Fix build problem on no blocklist/blacklist supported system.
(Reported by Matthias Ferdinand on pkgsrc-users@.)
Bump PKGREVISION.
Diffstat (limited to 'mail/postfix')
-rw-r--r-- | mail/postfix/Makefile | 3 | ||||
-rw-r--r-- | mail/postfix/distinfo | 6 | ||||
-rw-r--r-- | mail/postfix/options.mk | 13 | ||||
-rw-r--r-- | mail/postfix/patches/patch-ai | 22 | ||||
-rw-r--r-- | mail/postfix/patches/patch-src_smtpd_smtpd.c | 6 |
5 files changed, 32 insertions, 18 deletions
diff --git a/mail/postfix/Makefile b/mail/postfix/Makefile index 7ea7a45ec2a..5e3c9df0317 100644 --- a/mail/postfix/Makefile +++ b/mail/postfix/Makefile @@ -1,5 +1,6 @@ -# $NetBSD: Makefile,v 1.328 2021/06/02 15:29:56 taca Exp $ +# $NetBSD: Makefile,v 1.329 2021/08/14 08:58:20 taca Exp $ +PKGREVISION= 1 .include "../../mail/postfix/Makefile.common" COMMENT= Fast, easy to administer, and secure mail transfer agent diff --git a/mail/postfix/distinfo b/mail/postfix/distinfo index 7f587d2626c..4082e3a2686 100644 --- a/mail/postfix/distinfo +++ b/mail/postfix/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.195 2021/07/26 15:38:10 taca Exp $ +$NetBSD: distinfo,v 1.196 2021/08/14 08:58:20 taca Exp $ SHA1 (postfix-3.6.2.tar.gz) = 712230d7b0789d6610d84e8f03937f720fe3963d RMD160 (postfix-3.6.2.tar.gz) = 2ec2f96a7cafd853528646ef1e5c311a96fa8914 @@ -6,8 +6,8 @@ SHA512 (postfix-3.6.2.tar.gz) = 464ce9ec77e637ede91123472a0383b2bfda52102f9e9852 Size (postfix-3.6.2.tar.gz) = 4749530 bytes SHA1 (patch-aa) = c8216f133e202a7bb37682b0dbc1448f021e7c1c SHA1 (patch-ag) = feccf4aba580f581953b32e6c3a2c453fcb9131c -SHA1 (patch-ai) = 2d14b2bfe3d8f2b3bc80f31531285accd8eb84ac +SHA1 (patch-ai) = b93d8b4e7a52e2c281cf0815ef2cf653c3cd7efa SHA1 (patch-src_smtpd_Makefile.in) = 8133f9cceb0c1c0250d6543cb060c66288571722 SHA1 (patch-src_smtpd_pfilter.c) = c747d2f3584f694eb7b73b19118b4d8b450cfe7f SHA1 (patch-src_smtpd_pfilter.h) = 153b516da89d709d293c6086c2f126791bd945d6 -SHA1 (patch-src_smtpd_smtpd.c) = 7d709a727ca28efb2b07d3247feb7349576ae1f0 +SHA1 (patch-src_smtpd_smtpd.c) = 5f290ec55305702986beefdbbc194f5ce7987643 diff --git a/mail/postfix/options.mk b/mail/postfix/options.mk index 5e093246dfd..a9e407a78fb 100644 --- a/mail/postfix/options.mk +++ b/mail/postfix/options.mk @@ -1,14 +1,21 @@ -# $NetBSD: options.mk,v 1.41 2019/07/16 15:18:28 triaxx Exp $ +# $NetBSD: options.mk,v 1.42 2021/08/14 08:58:20 taca Exp $ # Global and legacy options PKG_OPTIONS_VAR= PKG_OPTIONS.postfix -PKG_SUPPORTED_OPTIONS= sasl tls eai -PKG_SUGGESTED_OPTIONS= tls +PKG_SUPPORTED_OPTIONS= blocklist sasl tls eai +PKG_SUGGESTED_OPTIONS= blocklist tls .include "../../mk/bsd.options.mk" ### +### blocklist support +### +.if !empty(PKG_OPTIONS:Mblocklist) +CCARGS+= -DUSE_BLOCKLIST +.endif + +### ### STARTTLS support ### .if !empty(PKG_OPTIONS:Mtls) diff --git a/mail/postfix/patches/patch-ai b/mail/postfix/patches/patch-ai index 5b96dad430e..24021fca8af 100644 --- a/mail/postfix/patches/patch-ai +++ b/mail/postfix/patches/patch-ai @@ -1,4 +1,4 @@ -$NetBSD: patch-ai,v 1.42 2021/07/26 15:38:10 taca Exp $ +$NetBSD: patch-ai,v 1.43 2021/08/14 08:58:20 taca Exp $ 1) Add shlib definitions for NetBSD 5; the build system must be hard-coded per OS per version. Not yet reported upstream. @@ -169,19 +169,23 @@ hard-coded per OS per version. Not yet reported upstream. ;; dcosx.1*) SYSTYPE=DCOSX1 RANLIB=echo -@@ -746,6 +675,17 @@ ReliantUNIX-?.5.43) SYSTYPE=ReliantUnix5 +@@ -746,6 +675,21 @@ ReliantUNIX-?.5.43) SYSTYPE=ReliantUnix5 esac # +# Support for blocklist(3) or blacklist(3). +# -+if test -f /usr/include/blocklist.h; then -+ CCARGS="$CCARGS -DHAVE_BLOCKLIST" -+ SYSLIBS="$SYSLIBS -lblocklist" -+elif test -f /usr/include/blacklist.h; then -+ CCARGS="$CCARGS -DHAVE_BLACKLIST" -+ SYSLIBS="$SYSLIBS -lblacklist" -+fi ++case "$CCARGS" in ++ *-DUSE_BLOCKLIST*) ++ if test -f /usr/include/blocklist.h; then ++ CCARGS="$CCARGS -DHAVE_BLOCKLIST" ++ SYSLIBS="$SYSLIBS -lblocklist" ++ elif test -f /usr/include/blacklist.h; then ++ CCARGS="$CCARGS -DHAVE_BLACKLIST" ++ SYSLIBS="$SYSLIBS -lblacklist" ++ fi ++ ;; ++esac + +# # sigsetjmp()/siglongjmp() can be "better" than setjmp()/longjmp() diff --git a/mail/postfix/patches/patch-src_smtpd_smtpd.c b/mail/postfix/patches/patch-src_smtpd_smtpd.c index b148caab50e..e5ecaa2ef2d 100644 --- a/mail/postfix/patches/patch-src_smtpd_smtpd.c +++ b/mail/postfix/patches/patch-src_smtpd_smtpd.c @@ -1,4 +1,4 @@ -$NetBSD: patch-src_smtpd_smtpd.c,v 1.1 2021/07/26 15:38:10 taca Exp $ +$NetBSD: patch-src_smtpd_smtpd.c,v 1.2 2021/08/14 08:58:20 taca Exp $ Add blocklist(3) support. @@ -13,12 +13,14 @@ Add blocklist(3) support. /* * Tunable parameters. Make sure that there is some bound on the length of * an SMTP command, so that the mail system stays in control even when a -@@ -5804,6 +5806,8 @@ static void smtpd_proto(SMTPD_STATE *sta +@@ -5804,6 +5806,10 @@ static void smtpd_proto(SMTPD_STATE *sta || strcmp(state->reason, REASON_LOST_CONNECTION)) { msg_info("%s after %s from %s", state->reason, state->where, state->namaddr); ++#if defined(HAVE_BLOCKLIST) || defined(HAVE_BLACKLIST) + if (strcmp(state->where, SMTPD_CMD_AUTH) == 0) + pfilter_notify(1, vstream_fileno(state->client)); ++#endif } } |