diff --git a/UPGRADING.pod b/UPGRADING.pod new file mode 100644 index 0000000..f2910da --- /dev/null +++ b/UPGRADING.pod @@ -0,0 +1,46 @@ + +=head1 Upgrade notes + +When upgrading please review these notes for the versions you are +upgrading I. + +=head2 v0.84 or below + +=head3 CHECK_RELAY, CHECK_NORELAY, RELAY_ONLY + +All 3 plugins are deprecated and replaced with a new 'relay' +plugin. The new plugin reads the same config files (see 'perldoc +plugins/relay') as the previous plugins. To get the equivalent +functionality of enabling 'relay_only', use the 'only' argument to the +relay plugin as documented in the RELAY ONLY section of plugins/relay. + +=head3 GREYLISTING plugin + +'mode' config argument is deprecated. Use reject and reject_type instead. + +The greylisting DB format has changed to accommodate IPv6 +addresses. (The DB key has colon ':' seperated fields, and IPv6 +addresses are colon delimited). The new format converts the IPs into +integers. There is a new config option named 'upgrade' that when +enabled, updates all the records in your DB to the new format. Simply +add 'upgrade 1' to the plugin entry in config/plugins, start up +qpsmtpd once, make one connection. A log entry will be made, telling +how many records were upgraded. Remove the upgrade option from your +config. + +=head3 SPF plugin + +spf_deny setting deprecated. Use reject N setting instead, which +provides administrators with more granular control over SPF. For +backward compatibility, a spf_deny setting of 1 is mapped to 'reject +3' and a 'spf_deny 2' is mapped to 'reject 4'. + + +=head3 P0F plugin + +defaults to p0f v3 (was v2). + +Upgrade p0f to version 3 or add 'version 2' to your p0f line in +config/plugins. perldoc plugins/ident/p0f for more details. + + diff --git a/lib/Qpsmtpd/TcpServer.pm b/lib/Qpsmtpd/TcpServer.pm index 8641576..5651aa4 100644 --- a/lib/Qpsmtpd/TcpServer.pm +++ b/lib/Qpsmtpd/TcpServer.pm @@ -191,18 +191,18 @@ sub tcpenv { return ($TCPLOCALIP, $TCPREMOTEIP, $TCPREMOTEIP ? "[$ENV{TCPREMOTEIP}]" : "[noip!]"); } - my $res = new Net::DNS::Resolver; + my $res = Net::DNS::Resolver->new( dnsrch => 0 ); $res->tcp_timeout(3); $res->udp_timeout(3); - my $query = $res->query($nto_iaddr); + my $query = $res->query($nto_iaddr, 'PTR'); my $TCPREMOTEHOST; if ($query) { foreach my $rr ($query->answer) { - next unless $rr->type eq "PTR"; + next if $rr->type ne 'PTR'; $TCPREMOTEHOST = $rr->ptrdname; } } - return ($TCPLOCALIP, $TCPREMOTEIP, $TCPREMOTEHOST || "Unknown"); + return ($TCPLOCALIP, $TCPREMOTEIP, $TCPREMOTEHOST || 'Unknown'); } sub check_socket() {