From 38a32f6ee6992ebdb8c7dbfe2f69919581c0a599 Mon Sep 17 00:00:00 2001 From: Natanael Copa Date: Mon, 11 Jul 2011 07:53:09 +0000 Subject: main/gross: fix the grey_tuple patch --- main/gross/APKBUILD | 4 ++-- main/gross/gross-grey_tuple.patch | 34 +++++++++++++++++----------------- 2 files changed, 19 insertions(+), 19 deletions(-) (limited to 'main') 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 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 -- cgit v1.2.3