Index: head/mail/dkimproxy/Makefile =================================================================== --- head/mail/dkimproxy/Makefile (revision 405007) +++ head/mail/dkimproxy/Makefile (revision 405008) @@ -1,43 +1,47 @@ # Created by: Yoshisato YANAGISAWA # $FreeBSD$ PORTNAME= dkimproxy PORTVERSION= 1.4.1 PORTREVISION= 1 CATEGORIES= mail ipv6 MASTER_SITES= SF MAINTAINER= andrey@bsdnir.info COMMENT= DKIM filter for Postfix LICENSE= GPLv2 LICENSE_FILE= ${WRKSRC}/COPYING BUILD_DEPENDS= p5-Mail-DKIM>=0:${PORTSDIR}/mail/p5-Mail-DKIM \ p5-Net-Server>=0:${PORTSDIR}/net/p5-Net-Server \ p5-Error>=0:${PORTSDIR}/lang/p5-Error RUN_DEPENDS:= ${BUILD_DEPENDS} -OPTIONS_DEFINE= IPV6 +OPTIONS_DEFINE= IPV6 TEST +OPTIONS_SUB= yes GNU_CONFIGURE= yes USES= perl5 shebangfix -SHEBANG_FILES= scripts/* +SHEBANG_FILES= scripts/* NO_ARCH= yes USE_RC_SUBR= dkimproxy_in dkimproxy_out DKIMPROXYUSER= dkimproxy USERS= ${DKIMPROXYUSER} 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 +IPV6_EXTRA_PATCHES= ${FILESDIR}/extra-patch-lib-MSDW-SMTP-Server.pm \ + ${FILESDIR}/extra-patch-scripts-dkimproxy.out \ + ${FILESDIR}/extra-patch-scripts-dkimproxy_in.conf.example \ + ${FILESDIR}/extra-patch-scripts-dkimproxy_out.conf.example + +TEST_DESC= Use dkim_responder.pl +TEST_RUN_DEPENDS= p5-MIME-Tools>=0:${PORTSDIR}/mail/p5-MIME-Tools .include Index: head/mail/dkimproxy/files/extra-patch-lib-MSDW-SMTP-Server.pm =================================================================== --- head/mail/dkimproxy/files/extra-patch-lib-MSDW-SMTP-Server.pm (revision 405007) +++ head/mail/dkimproxy/files/extra-patch-lib-MSDW-SMTP-Server.pm (revision 405008) @@ -1,44 +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 +--- lib/MSDW/SMTP/Server.pm.orig 2009-07-27 13:33:29 UTC ++++ lib/MSDW/SMTP/Server.pm @@ -11,7 +11,7 @@ # Written by Bennett Todd package MSDW::SMTP::Server; -use IO::Socket; +use IO::Socket::INET6; use IO::File; =head1 NAME -@@ -88,15 +88,14 @@ +@@ -88,15 +88,14 @@ desired. =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 @@ +@@ -154,7 +153,7 @@ sub new { 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', Index: head/mail/dkimproxy/files/extra-patch-scripts-dkimproxy.out =================================================================== --- head/mail/dkimproxy/files/extra-patch-scripts-dkimproxy.out (revision 405007) +++ head/mail/dkimproxy/files/extra-patch-scripts-dkimproxy.out (revision 405008) @@ -1,21 +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 @@ +--- scripts/dkimproxy.out.orig 2010-11-15 16:54:28 UTC ++++ scripts/dkimproxy.out +@@ -314,17 +314,11 @@ sub process_request { 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 = $@) { Index: head/mail/dkimproxy/files/extra-patch-scripts-dkimproxy_in.conf.example =================================================================== --- head/mail/dkimproxy/files/extra-patch-scripts-dkimproxy_in.conf.example (revision 405007) +++ head/mail/dkimproxy/files/extra-patch-scripts-dkimproxy_in.conf.example (revision 405008) @@ -1,10 +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 +--- scripts/dkimproxy_in.conf.example.orig 2009-07-30 01:01:50 UTC ++++ scripts/dkimproxy_in.conf.example @@ -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 Index: head/mail/dkimproxy/files/extra-patch-scripts-dkimproxy_out.conf.example =================================================================== --- head/mail/dkimproxy/files/extra-patch-scripts-dkimproxy_out.conf.example (revision 405007) +++ head/mail/dkimproxy/files/extra-patch-scripts-dkimproxy_out.conf.example (revision 405008) @@ -1,13 +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 +--- scripts/dkimproxy_out.conf.example.orig 2009-10-26 16:08:46 UTC ++++ scripts/dkimproxy_out.conf.example @@ -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 Index: head/mail/dkimproxy/pkg-plist =================================================================== --- head/mail/dkimproxy/pkg-plist (revision 405007) +++ head/mail/dkimproxy/pkg-plist (revision 405008) @@ -1,12 +1,12 @@ -bin/dkim_responder.pl +%%TEST%%bin/dkim_responder.pl bin/dkimproxy.in bin/dkimproxy.out etc/dkimproxy_in.conf.example etc/dkimproxy_out.conf.example lib/LookupMap.pm lib/MSDW/SMTP/Client.pm lib/MSDW/SMTP/Server.pm lib/MySmtpProxyServer.pm lib/MySmtpServer.pm man/man8/dkimproxy_in.8.gz man/man8/dkimproxy_out.8.gz