Index: head/mail/dkimproxy/Makefile =================================================================== --- head/mail/dkimproxy/Makefile (revision 425733) +++ head/mail/dkimproxy/Makefile (revision 425734) @@ -1,47 +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:mail/p5-Mail-DKIM \ p5-Net-Server>=0:net/p5-Net-Server \ p5-Error>=0:lang/p5-Error RUN_DEPENDS:= ${BUILD_DEPENDS} OPTIONS_DEFINE= IPV6 TEST OPTIONS_SUB= yes GNU_CONFIGURE= yes -USES= perl5 shebangfix +USES= gmake perl5 shebangfix 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:net/p5-IO-Socket-INET6 -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 +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: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 425733) +++ head/mail/dkimproxy/files/extra-patch-lib-MSDW-SMTP-Server.pm (nonexistent) @@ -1,44 +0,0 @@ ---- 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 @@ 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 @@ 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', Property changes on: head/mail/dkimproxy/files/extra-patch-lib-MSDW-SMTP-Server.pm ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/mail/dkimproxy/files/extra-patch-scripts-dkimproxy.out =================================================================== --- head/mail/dkimproxy/files/extra-patch-scripts-dkimproxy.out (revision 425733) +++ head/mail/dkimproxy/files/extra-patch-scripts-dkimproxy.out (nonexistent) @@ -1,21 +0,0 @@ ---- 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 = $@) - { Property changes on: head/mail/dkimproxy/files/extra-patch-scripts-dkimproxy.out ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/mail/dkimproxy/files/extra-patch-scripts-dkimproxy_in.conf.example =================================================================== --- head/mail/dkimproxy/files/extra-patch-scripts-dkimproxy_in.conf.example (revision 425733) +++ head/mail/dkimproxy/files/extra-patch-scripts-dkimproxy_in.conf.example (nonexistent) @@ -1,10 +0,0 @@ ---- 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 Property changes on: head/mail/dkimproxy/files/extra-patch-scripts-dkimproxy_in.conf.example ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/mail/dkimproxy/files/extra-patch-scripts-dkimproxy_out.conf.example =================================================================== --- head/mail/dkimproxy/files/extra-patch-scripts-dkimproxy_out.conf.example (revision 425733) +++ head/mail/dkimproxy/files/extra-patch-scripts-dkimproxy_out.conf.example (nonexistent) @@ -1,13 +0,0 @@ ---- 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 Property changes on: head/mail/dkimproxy/files/extra-patch-scripts-dkimproxy_out.conf.example ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/mail/dkimproxy/files/extra-patch-lib_MSDW_SMTP_Server.pm =================================================================== --- head/mail/dkimproxy/files/extra-patch-lib_MSDW_SMTP_Server.pm (nonexistent) +++ head/mail/dkimproxy/files/extra-patch-lib_MSDW_SMTP_Server.pm (revision 425734) @@ -0,0 +1,44 @@ +--- 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 @@ 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 @@ 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', Property changes on: head/mail/dkimproxy/files/extra-patch-lib_MSDW_SMTP_Server.pm ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/mail/dkimproxy/files/extra-patch-scripts_dkimproxy.out =================================================================== --- head/mail/dkimproxy/files/extra-patch-scripts_dkimproxy.out (nonexistent) +++ head/mail/dkimproxy/files/extra-patch-scripts_dkimproxy.out (revision 425734) @@ -0,0 +1,30 @@ +--- scripts/dkimproxy.out.orig 2016-11-08 12:35:41 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 = $@) + { +@@ -713,7 +707,7 @@ which have a sender matching one of thes + matched domain as the d= value of the generated signature. + + Please note that the d= value of the generated signature can also be +-specified using signature options (see L). The + signature options will override the value specified here. + + Therefore, if you want to sign all messages, and you are specifying Property changes on: head/mail/dkimproxy/files/extra-patch-scripts_dkimproxy.out ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/mail/dkimproxy/files/extra-patch-scripts_dkimproxy__in.conf.example =================================================================== --- head/mail/dkimproxy/files/extra-patch-scripts_dkimproxy__in.conf.example (nonexistent) +++ head/mail/dkimproxy/files/extra-patch-scripts_dkimproxy__in.conf.example (revision 425734) @@ -0,0 +1,10 @@ +--- scripts/dkimproxy_in.conf.example.orig 2016-11-08 12:35:41 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 Property changes on: head/mail/dkimproxy/files/extra-patch-scripts_dkimproxy__in.conf.example ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/mail/dkimproxy/files/extra-patch-scripts_dkimproxy__out.conf.example =================================================================== --- head/mail/dkimproxy/files/extra-patch-scripts_dkimproxy__out.conf.example (nonexistent) +++ head/mail/dkimproxy/files/extra-patch-scripts_dkimproxy__out.conf.example (revision 425734) @@ -0,0 +1,13 @@ +--- scripts/dkimproxy_out.conf.example.orig 2016-11-08 12:35:41 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 Property changes on: head/mail/dkimproxy/files/extra-patch-scripts_dkimproxy__out.conf.example ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property