summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2011-07-11 07:53:09 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2011-07-11 07:53:38 +0000
commit38a32f6ee6992ebdb8c7dbfe2f69919581c0a599 (patch)
tree5a8ee1f3b273bd03d1b0a9acd4fd14d14a4dac0b
parent4fe57a7b7e55c13493cbebfe555cfbccc750b8ee (diff)
downloadaports-38a32f6ee6992ebdb8c7dbfe2f69919581c0a599.tar.bz2
aports-38a32f6ee6992ebdb8c7dbfe2f69919581c0a599.tar.xz
main/gross: fix the grey_tuple patch
-rw-r--r--main/gross/APKBUILD4
-rw-r--r--main/gross/gross-grey_tuple.patch34
2 files changed, 19 insertions, 19 deletions
diff --git a/main/gross/APKBUILD b/main/gross/APKBUILD
index 4017c7f3f..62a731f2c 100644
--- a/main/gross/APKBUILD
+++ b/main/gross/APKBUILD
@@ -2,7 +2,7 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=gross
pkgver=1.0.2
-pkgrel=4
+pkgrel=5
pkgdesc="Greylisting of suspicious sources"
url="http://code.google.com/p/gross/"
arch="all"
@@ -56,4 +56,4 @@ md5sums="cb88d88553161c01e9bed7a74c3e9263 gross-1.0.2.tar.gz
6e8a2626c0c9f0e98e950a67a55a7040 grossd.initd
5ca1c6e51c3243236e6564480b20279b grossd.confd
7c504b653c71dcf7b192bc487b3516fd gross-1.0.1-default-conf.patch
-d25f5688a63bddf14e0db677a7a82382 gross-grey_tuple.patch"
+47aaeb75a7dc7bd5a05a27287bd88c32 gross-grey_tuple.patch"
diff --git a/main/gross/gross-grey_tuple.patch b/main/gross/gross-grey_tuple.patch
index 581e0064d..ea80f1996 100644
--- a/main/gross/gross-grey_tuple.patch
+++ b/main/gross/gross-grey_tuple.patch
@@ -6,7 +6,7 @@ Index: include/conf.h
"stat_type", "status", \
"grey_mask", "24", \
"grey_delay", "10", \
-+ "grey_type", "normal", \
++ "grey_tuple", "user", \
"syslog_facility", "mail", \
"blocker_port", "4466", \
"blocker_weight", "1", \
@@ -14,7 +14,7 @@ Index: include/conf.h
"log_level", \
"grey_mask", \
"grey_delay", \
-+ "grey_type", \
++ "grey_tuple", \
"check", \
"protocol", \
"syslog_facility", \
@@ -28,8 +28,8 @@ Index: include/common.h
+typedef enum
+{
-+ GREY_TUPLE_NORMAL = 0,
-+ GREY_TUPLE_LOOSE,
++ GREY_TUPLE_USER = 0,
++ GREY_TUPLE_SERVER,
+} greytupletype_t;
+
typedef struct peer_s
@@ -61,12 +61,12 @@ Index: src/gross.c
}
+ greytuplestr = CONF("grey_tuple");
-+ if (strncmp(greytuplestr, "loose", 6) == 0) {
-+ logstr(GLOG_DEBUG, "grey_tuple: LOOSE");
-+ ctx->config.grey_tuple = GREY_TUPLE_LOOSE;
-+ } else if ((greytuplestr == NULL) || (strncmp(greytuplestr, "normal", 7) == 0)) {
-+ logstr(GLOG_DEBUG, "grey_tuple: NORMAL");
-+ ctx->config.grey_tuple = GREY_TUPLE_NORMAL;
++ if ((greytuplestr == NULL) || (strcmp(greytuplestr, "user") == 0)) {
++ logstr(GLOG_DEBUG, "grey_tuple: USER");
++ ctx->config.grey_tuple = GREY_TUPLE_USER;
++ } else if (strcmp(greytuplestr, "server") == 0) {
++ logstr(GLOG_DEBUG, "grey_tuple: SERVER");
++ ctx->config.grey_tuple = GREY_TUPLE_SERVER;
+ } else {
+ daemon_shutdown(EXIT_CONFIG, "Invalid grey_tuple: %s", greytuplestr);
+ }
@@ -99,10 +99,10 @@ Index: src/worker.c
/* greylist */
- snprintf(maskedtuple, MSGSZ, "%s %s %s", chkipstr, request->sender, request->recipient);
+ switch (ctx->config.grey_tuple) {
-+ case GREY_TUPLE_NORMAL:
++ case GREY_TUPLE_USER:
+ snprintf(maskedtuple, MSGSZ, "%s %s %s", chkipstr, request->sender, request->recipient);
+ break;
-+ case GREY_TUPLE_LOOSE:
++ case GREY_TUPLE_SERVER:
+ snprintf(maskedtuple, MSGSZ, "%s %s %s", chkipstr, domain_part(request->sender), request->helo_name);
+ break;
+ }
@@ -118,9 +118,9 @@ Index: doc/examples/grossd.conf
# DEFAULT: update = grey
+# 'grey_tuple' is the way greylisting tuples are created. Valid options are
-+# 'normal' and 'loose'. If 'grey_tuple = normal' the tuple for grey listing
++# 'normal' and 'loose'. If 'grey_tuple = user' the tuple for grey listing
+# will be: masked client-ip, sender email, recipient email. If 'grey_tuple =
-+# loose' the tuple for greylisting will be client-ip, domain of sender email
++# server' the tuple for greylisting will be client-ip, domain of sender email
+# and helo.
+# DEFAULT: grey_tuple = normal
+
@@ -136,10 +136,10 @@ Index: man/grossd.conf.5.in
`\s-1STATUS_GREY\s+1'. Setting it to `always' may reduce the impact on
\s-1DNS\s+1 servers.
+.IP "\fBgrey_tuple\fP" 4
-+is the greylisting tuple. Valid options are `normal' and `loose'. If set to
-+`normal', which is the default, \fIgrossd\fP\|(8) will create the tuple from
++is the greylisting tuple. Valid options are `user' and `server'. If set to
++`user', which is the default, \fIgrossd\fP\|(8) will create the tuple from
+the masked `smtp\-client\-ip', sender email and recipient email. If set to
-+`loose' it will create the tuple from the masked `smtp\-client\-ip', the sender
++`server' it will create the tuple from the masked `smtp\-client\-ip', the sender
+email domain and helo message.
.IP "\fBgrey_mask\fP" 4
is the mask for \fIgrossd\fP\|(8) to use when matching the