Date: Fri, 4 Sep 2009 03:01:34 GMT From: Sahil Tandon <sahil@tandon.net> To: freebsd-gnats-submit@FreeBSD.org Subject: ports/138520: [MAINTAINER UPDATE] mail/postfix-postfwd: update to 1.16 Message-ID: <200909040301.n8431Y6T093148@www.freebsd.org> Resent-Message-ID: <200909040310.n843A5xQ096963@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 138520 >Category: ports >Synopsis: [MAINTAINER UPDATE] mail/postfix-postfwd: update to 1.16 >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: maintainer-update >Submitter-Id: current-users >Arrival-Date: Fri Sep 04 03:10:05 UTC 2009 >Closed-Date: >Last-Modified: >Originator: Sahil Tandon >Release: 7.1-RELEASE >Organization: >Environment: 7.1-RELEASE >Description: 1.16 ===== - bugfix: this is a bugfix release for 1.15. anyone affected is encouraged to upgrade. detail: the default behavior for the '=' operator with numeric items (size, recipient_count, ...) changed with version 1.15 to '==' (equals to). now these items are compared '>=' (greater than) again. note: if you are using 1.15 and you are not able upgrade for some reason, please change '=' to '>=' in your ruleset where you mean 'greater than'. 1.15 ===== - feature: items may now be retrieved from files using "item=file:/some/where" more information in the postfwd manual (FILES section) - feature: helo_address, and sender_(ns|mx)_addrs can now be csv items - feature: new rcpt() command counts recipients for rate limits (thanks to Sahil Tandon) - code: redirect syslog to stdout for --kill, --reload and --showconfig - code: option --reload (HUP signal) now reloads config, if the file is unchanged - code: configuration parser improvements: * rules without defined action will be skipped at configuration stage * undefined ACLs will now be detected and skipped at configuration stage * parser timeout skips loading a rule after 4s, to prevent problems with large files or loops. use --config_timeout to override - bugfix: documentation fixed (missing "action=" in ask() examples) >How-To-Repeat: >Fix: Apply patch. Patch attached with submission follows: Index: Makefile =================================================================== RCS file: /home/ncvs/ports/mail/postfix-postfwd/Makefile,v retrieving revision 1.4 diff -u -r1.4 Makefile --- Makefile 14 Aug 2009 19:55:13 -0000 1.4 +++ Makefile 4 Sep 2009 02:55:47 -0000 @@ -6,7 +6,7 @@ # PORTNAME= postfwd -PORTVERSION= 1.14 +PORTVERSION= 1.16 CATEGORIES= mail MASTER_SITES= http://www.${PORTNAME}.org/old/ PKGNAMEPREFIX= postfix- @@ -29,14 +29,8 @@ MAN8= ${PORTNAME}.8 -OPTIONS= MRCPT "Sahil's patch for max recipients per time window" off - .include <bsd.port.pre.mk> -.if !defined(WITHOUT_MRCPT) -EXTRA_PATCHES= ${PATCHDIR}/extra-patch-sbin-postfwd -.endif - do-install: @${INSTALL_SCRIPT} ${WRKSRC}/sbin/${PORTNAME} ${PREFIX}/bin/ @${INSTALL_DATA} ${WRKSRC}/etc/${PORTNAME}.cf.sample ${PREFIX}/etc/${PORTNAME}.conf.sample @@ -52,18 +46,5 @@ @${INSTALL_DATA} ${WRKSRC}/tools/${PORTEXAMPLES} ${EXAMPLESDIR} .endif @${CAT} ${PKGMESSAGE} -.if !defined(WITHOUT_MRCPT) - @${ECHO_MSG} - @${ECHO_MSG} The mrcpt\(\) command works like the rate\(\) command, - @${ECHO_MSG} except that the rate counter is incremented by the - @${ECHO_MSG} request\'s recipient_count. To do this reliably, - @${ECHO_MSG} call postfwd from smtpd_data_restrictions. - @${ECHO_MSG} - @${ECHO_MSG} Example: - @${ECHO_MSG} " id=MAX_RECIPIENTS; protocol_state=DATA; \\ " - @${ECHO_MSG} " client_address==192.168.1.1; \\ " - @${ECHO_MSG} " action==mrcpt(\$$\$$client_address/5/3600/450 4.7.1 max 5 recip/hour) " - @${ECHO_MSG} -.endif .include <bsd.port.post.mk> Index: distinfo =================================================================== RCS file: /home/ncvs/ports/mail/postfix-postfwd/distinfo,v retrieving revision 1.4 diff -u -r1.4 distinfo --- distinfo 14 Aug 2009 19:55:13 -0000 1.4 +++ distinfo 4 Sep 2009 02:55:47 -0000 @@ -1,3 +1,3 @@ -MD5 (postfwd-1.14.tar.gz) = 24feb8cd2c0fea566603a6ba1a38caea -SHA256 (postfwd-1.14.tar.gz) = 9810609239633021ea87fab48431adc23d61445e5c9fc997cad0cba10a0428c4 -SIZE (postfwd-1.14.tar.gz) = 95061 +MD5 (postfwd-1.16.tar.gz) = d19ff9d2afdaaa170554029687cc493f +SHA256 (postfwd-1.16.tar.gz) = 07a0ddeb36918dd0314beb0a786c765a4cd9ab55acdbf73e75bc01ab53042028 +SIZE (postfwd-1.16.tar.gz) = 101653 Index: files/extra-patch-sbin-postfwd =================================================================== RCS file: files/extra-patch-sbin-postfwd diff -N files/extra-patch-sbin-postfwd --- files/extra-patch-sbin-postfwd 14 Aug 2009 19:55:13 -0000 1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,42 +0,0 @@ ---- sbin/postfwd.orig 2009-06-29 05:36:15.000000000 -0400 -+++ sbin/postfwd 2009-07-09 22:56:26.000000000 -0400 -@@ -1229,7 +1229,7 @@ - type => $mycmd, - maxcount => $ratecount, - ttl => $ratetime, -- count => ( ($mycmd eq 'size') ? $request{size} : 1 ), -+ count => (($mycmd eq 'size') ? $request{size} : (($mycmd eq 'mrcpt') ? $request{recipient_count} : 1)), - time => $now, - rule => $Rules[$index]{$COMP_ID}, - action => $ratecmd, -@@ -1246,6 +1246,8 @@ - }, - # size() command - "size" => sub { return &{$postfwd_actions{rate}}(@_); }, -+ # mrcpt() command -+ "mrcpt" => sub { return &{$postfwd_actions{rate}}(@_); }, - # wait() command - "wait" => sub { - my($index,$now,$mycmd,$myarg,$myline,%request) = @_; -@@ -1724,7 +1726,9 @@ - next RATES unless ( $request{$checkreq} and (defined $Rates{$request{$checkreq}}) ); - if ( ($now - $Rates{$request{$checkreq}}{"time"}) > $Rates{$request{$checkreq}}{ttl} ) { - # renew rate -- $Rates{$request{$checkreq}}{count} = ( ($Rates{$request{$checkreq}}{type} eq 'size') ? $request{size} : 1 ); -+ $Rates{$request{$checkreq}}{count} = ( ($Rates{$request{$checkreq}}{type} eq 'size') -+ ? $request{size} : (($Rates{$request{$checkreq}}{type} eq 'mrcpt') -+ ? $request{recipient_count} : 1) ); - $Rates{$request{$checkreq}}{"time"} = $now; - mylogs $syslog_priority, "[RATE] renewing rate object ".$request{$checkreq} - ." [type: ".$Rates{$request{$checkreq}}{type} -@@ -1733,7 +1737,9 @@ - if ($opt_verbose > 1); - } else { - # increase rate -- $Rates{$request{$checkreq}}{count} += ( ($Rates{$request{$checkreq}}{type} eq 'size') ? $request{size} : 1 ); -+ $Rates{$request{$checkreq}}{count} += (($Rates{$request{$checkreq}}{type} eq 'size') -+ ? $request{size} : (($Rates{$request{$checkreq}}{type} eq 'mrcpt') -+ ? $request{recipient_count} : 1)); - mylogs $syslog_priority, "[RATE] increasing rate object ".$request{$checkreq} - ." to ".$Rates{$request{$checkreq}}{count} - ." [type: ".$Rates{$request{$checkreq}}{type} >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200909040301.n8431Y6T093148>