Date: Tue, 15 Dec 2015 18:47:48 +0000 (UTC) From: Kurt Jaeger <pi@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r403798 - in head/mail/dkimproxy: . files Message-ID: <201512151847.tBFIlme6045216@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: pi Date: Tue Dec 15 18:47:48 2015 New Revision: 403798 URL: https://svnweb.freebsd.org/changeset/ports/403798 Log: mail/dkimproxy: Add IPv6 support, submitter takes MAINTAINER See also: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=656041 PR: 205300 Submitted by: Andrey Fesenko <andrey@bsdnir.info> Reviewed by: koobs Added: head/mail/dkimproxy/files/extra-patch-lib-MSDW-SMTP-Server.pm (contents, props changed) head/mail/dkimproxy/files/extra-patch-scripts-dkimproxy.out (contents, props changed) head/mail/dkimproxy/files/extra-patch-scripts-dkimproxy_in.conf.example (contents, props changed) head/mail/dkimproxy/files/extra-patch-scripts-dkimproxy_out.conf.example (contents, props changed) Modified: head/mail/dkimproxy/Makefile Modified: head/mail/dkimproxy/Makefile ============================================================================== --- head/mail/dkimproxy/Makefile Tue Dec 15 18:26:36 2015 (r403797) +++ head/mail/dkimproxy/Makefile Tue Dec 15 18:47:48 2015 (r403798) @@ -3,10 +3,11 @@ PORTNAME= dkimproxy PORTVERSION= 1.4.1 -CATEGORIES= mail +PORTREVISION= 1 +CATEGORIES= mail ipv6 MASTER_SITES= SF -MAINTAINER= ports@FreeBSD.org +MAINTAINER= andrey@bsdnir.info COMMENT= DKIM filter for Postfix LICENSE= GPLv2 @@ -17,6 +18,8 @@ BUILD_DEPENDS= p5-Mail-DKIM>=0:${PORTSDI p5-Error>=0:${PORTSDIR}/lang/p5-Error RUN_DEPENDS:= ${BUILD_DEPENDS} +OPTIONS_DEFINE= IPV6 + GNU_CONFIGURE= yes USES= perl5 NO_ARCH= yes @@ -29,6 +32,13 @@ GROUPS= ${DKIMPROXYUSER} SUB_LIST+= PERL=${PERL} \ DKIMPROXYUSER=${DKIMPROXYUSER} +IPV6_RUN_DEPENDS= p5-IO-Socket-INET6>=0:${PORTSDIR}/net/p5-IO-Socket-INET6 + +IPV6_EXTRA_PATCHES= ${FILESDIR}/extra-patch-lib-MSDW-SMTP-Server.pm +IPV6_EXTRA_PATCHES= ${FILESDIR}/extra-patch-scripts-dkimproxy.out +IPV6_EXTRA_PATCHES= ${FILESDIR}/extra-patch-scripts-dkimproxy_in.conf.example +IPV6_EXTRA_PATCHES= ${FILESDIR}/extra-patch-scripts-dkimproxy_out.conf.example + post-patch: @${GREP} -Ril 'perl' ${WRKDIR} | ${XARGS} ${REINPLACE_CMD} -i '' \ -e 's|/usr/bin/perl|${PERL}|' -e 's|@PERL@|${PERL}|' Added: head/mail/dkimproxy/files/extra-patch-lib-MSDW-SMTP-Server.pm ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/mail/dkimproxy/files/extra-patch-lib-MSDW-SMTP-Server.pm Tue Dec 15 18:47:48 2015 (r403798) @@ -0,0 +1,44 @@ +--- lib/MSDW/SMTP/Server.pm 2014-11-05 08:28:37.163794430 +0300 ++++ lib/MSDW/SMTP/Server.pm 2014-11-05 08:34:51.757769187 +0300 +@@ -11,7 +11,7 @@ + # Written by Bennett Todd <bet@rahul.net> + + package MSDW::SMTP::Server; +-use IO::Socket; ++use IO::Socket::INET6; + use IO::File; + + =head1 NAME +@@ -88,15 +88,14 @@ + =item new(interface => $interface, port => $port); + + The interface and port to listen on must be specified. The interface +-must be a valid numeric IP address (0.0.0.0 to listen on all +-interfaces, as usual); the port must be numeric. If this call +-succeeds, it returns a server structure with an open +-IO::Socket::INET in it, ready to listen on. If it fails it dies, so +-if you want anything other than an exit with an explanatory error +-message, wrap the constructor call in an eval block and pull the +-error out of $@ as usual. This is also the case for all other +-methods; they succeed or they die. +- ++must be a valid numeric IPv4 or IPv6 address (0.0.0.0 or :: to listen ++on all interfaces, as usual); the port must be numeric. If this call ++succeeds, it returns a server structure with an open IO::Socket::INET6 ++in it, ready to listen on. If it fails it dies, so if you want ++anything other than an exit with an explanatory error message, wrap ++the constructor call in an eval block and pull the error out of $@ as ++usual. This is also the case for all other methods; they succeed or ++they die. + =item accept([debug => FD]); + + accept takes optional args and returns nothing. If an error occurs +@@ -154,7 +153,7 @@ + my ($this, @opts) = @_; + my $class = ref($this) || $this; + my $self = bless { @opts }, $class; +- $self->{sock} = IO::Socket::INET->new( ++ $self->{sock} = IO::Socket::INET6->new( + LocalAddr => $self->{interface}, + LocalPort => $self->{port}, + Proto => 'tcp', Added: head/mail/dkimproxy/files/extra-patch-scripts-dkimproxy.out ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/mail/dkimproxy/files/extra-patch-scripts-dkimproxy.out Tue Dec 15 18:47:48 2015 (r403798) @@ -0,0 +1,21 @@ +--- scripts/dkimproxy.out 2014-11-05 08:30:40.674785725 +0300 ++++ scripts/dkimproxy.out 2014-11-05 08:36:43.063761657 +0300 +@@ -314,17 +314,11 @@ + { + my $self = shift; + +- # try to determine peer's address +- use Socket; +- my $peersockaddr = getpeername(STDOUT); +- my ($port, $iaddr) = sockaddr_in($peersockaddr); +- $ENV{REMOTE_ADDR} = inet_ntoa($iaddr); +- + # initialize syslog + eval + { + openlog("dkimproxy.out", "perror,pid,ndelay", "mail"); +- syslog("debug", '%s', "connect from $ENV{REMOTE_ADDR}"); ++ syslog("debug", '%s', "connect from $self->{server}->{peeraddr}"); + }; + if (my $E = $@) + { Added: head/mail/dkimproxy/files/extra-patch-scripts-dkimproxy_in.conf.example ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/mail/dkimproxy/files/extra-patch-scripts-dkimproxy_in.conf.example Tue Dec 15 18:47:48 2015 (r403798) @@ -0,0 +1,10 @@ +--- scripts/dkimproxy_in.conf.example 2014-11-05 08:47:46.842715313 +0300 ++++ scripts/dkimproxy_in.conf.example 2014-11-05 08:48:19.031713000 +0300 +@@ -1,5 +1,5 @@ + # specify what address/port DKIMproxy should listen on +-listen 127.0.0.1:10025 ++listen host.name:10025 + + # specify what address/port DKIMproxy forwards mail to +-relay 127.0.0.1:10026 ++relay host.name:10026 Added: head/mail/dkimproxy/files/extra-patch-scripts-dkimproxy_out.conf.example ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/mail/dkimproxy/files/extra-patch-scripts-dkimproxy_out.conf.example Tue Dec 15 18:47:48 2015 (r403798) @@ -0,0 +1,13 @@ +--- scripts/dkimproxy_out.conf.example 2014-11-05 08:45:08.311726160 +0300 ++++ scripts/dkimproxy_out.conf.example 2014-11-05 08:47:29.601719665 +0300 +@@ -1,8 +1,8 @@ + # specify what address/port DKIMproxy should listen on +-listen 127.0.0.1:10027 ++listen host.name:10027 + + # specify what address/port DKIMproxy forwards mail to +-relay 127.0.0.1:10028 ++relay host.name:10028 + + # specify what domains DKIMproxy can sign for (comma-separated, no spaces) + domain example.org
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201512151847.tBFIlme6045216>