Merge branch 'master' of github.com:msimerson/qpsmtpd-dev
This commit is contained in:
commit
11874aa5dc
66
Changes
66
Changes
@ -1,6 +1,70 @@
|
|||||||
|
|
||||||
Next Version
|
0.91 Nov 20, 2012
|
||||||
|
|
||||||
|
a handful of minor changes to log messages, similar to v0.90
|
||||||
|
|
||||||
|
replace all instances of split '' with split // (required for 5.1?+)
|
||||||
|
|
||||||
|
clamdscan: skip processing of naughty messages
|
||||||
|
|
||||||
|
TcpServer: improved IPv6 support (Michael Holzt)
|
||||||
|
|
||||||
|
SPF: improved support for IPv6, removed is_in_relayclient in favor
|
||||||
|
of checking if relayclient() note is set.
|
||||||
|
|
||||||
|
spamassassin: added 'headers none' option
|
||||||
|
|
||||||
|
qmail_deliverable: added vpopmail extension support, reject null
|
||||||
|
senders to ezmlm mailing lists.
|
||||||
|
|
||||||
|
dnsbl rejections handled by naughty plugin
|
||||||
|
|
||||||
|
changed default loglevel from 9 to 6
|
||||||
|
|
||||||
|
allow messages with no body: (Robin's patch)
|
||||||
|
|
||||||
|
ordered config.sample/plugins roughly in SMTP phase order
|
||||||
|
|
||||||
|
added Plugins::adjust_karma, reduces code requirements in other plugins
|
||||||
|
|
||||||
|
added whitelist plugin
|
||||||
|
|
||||||
|
helo: added is_plain_ip to lenient checks
|
||||||
|
|
||||||
|
dspam improvements
|
||||||
|
|
||||||
|
added log2sql, log/watch.pl, log/summarize.pl, and plugins/registry.txt
|
||||||
|
|
||||||
|
new dkim plugin added (deprecates domainkeys plugin).
|
||||||
|
|
||||||
|
0.90 Jun 27, 2012
|
||||||
|
|
||||||
|
Many logging adjustments for plugins, to achieve the goal of emitting
|
||||||
|
a single message per plugin that provides a summary of that plugins
|
||||||
|
action(s) and/or outcome(s).
|
||||||
|
|
||||||
|
qmail_deliverable plugin added (depends on Qmail::Deliverable).
|
||||||
|
|
||||||
|
karma plugin added.
|
||||||
|
|
||||||
|
naughty plugin added.
|
||||||
|
|
||||||
|
count_unrecognized_commands: corrected variable assignment error
|
||||||
|
|
||||||
|
connection_time: added tcpserver deployment compatibility
|
||||||
|
|
||||||
|
loop: max_hops was sometimes unset
|
||||||
|
|
||||||
|
dnsbl,rhsbl: process DNS queries syncronously to improve overall efficiency
|
||||||
|
|
||||||
|
insert headers at top of message (consistent SMTP behavior) in uribl
|
||||||
|
domainkeys, spamassassin plugins.
|
||||||
|
|
||||||
|
spamassassin: consolidated two data_post methods (more linear, simpler)
|
||||||
|
|
||||||
|
rewrote check_basicheaders -> headers
|
||||||
|
|
||||||
|
renamed check_loop -> loop
|
||||||
renamed check_badrcptto -> badrcptto
|
renamed check_badrcptto -> badrcptto
|
||||||
renamed check_badmailfromto -> badmailfromto
|
renamed check_badmailfromto -> badmailfromto
|
||||||
renamed check_badmailfrom -> badmailfrom
|
renamed check_badmailfrom -> badmailfrom
|
||||||
|
1
MANIFEST
1
MANIFEST
@ -185,6 +185,7 @@ t/plugin_tests/badrcptto
|
|||||||
t/plugin_tests/count_unrecognized_commands
|
t/plugin_tests/count_unrecognized_commands
|
||||||
t/plugin_tests/dnsbl
|
t/plugin_tests/dnsbl
|
||||||
t/plugin_tests/dspam
|
t/plugin_tests/dspam
|
||||||
|
t/plugin_tests/earlytalker
|
||||||
t/plugin_tests/greylisting
|
t/plugin_tests/greylisting
|
||||||
t/plugin_tests/headers
|
t/plugin_tests/headers
|
||||||
t/plugin_tests/helo
|
t/plugin_tests/helo
|
||||||
|
@ -7,7 +7,7 @@ use Qpsmtpd::Constants;
|
|||||||
|
|
||||||
#use DashProfiler;
|
#use DashProfiler;
|
||||||
|
|
||||||
$VERSION = "0.90";
|
$VERSION = "0.91";
|
||||||
|
|
||||||
my $git;
|
my $git;
|
||||||
|
|
||||||
@ -354,7 +354,7 @@ sub _load_plugin {
|
|||||||
my $self = shift;
|
my $self = shift;
|
||||||
my ($plugin_line, @plugin_dirs) = @_;
|
my ($plugin_line, @plugin_dirs) = @_;
|
||||||
|
|
||||||
my ($plugin, @args) = split ' ', $plugin_line;
|
my ($plugin, @args) = split / /, $plugin_line;
|
||||||
|
|
||||||
my $package;
|
my $package;
|
||||||
|
|
||||||
|
@ -67,7 +67,7 @@ while (<HEAD>) {
|
|||||||
next if /^_/;
|
next if /^_/;
|
||||||
s#(/\*.*\*/)##;
|
s#(/\*.*\*/)##;
|
||||||
my $comment = $1 || "";
|
my $comment = $1 || "";
|
||||||
my @words = split ' ', $_;
|
my @words = split / /, $_;
|
||||||
my $const = shift @words;
|
my $const = shift @words;
|
||||||
if ($const eq "CLEANUP_STAT_OK") {
|
if ($const eq "CLEANUP_STAT_OK") {
|
||||||
push @out, "";
|
push @out, "";
|
||||||
|
@ -80,6 +80,7 @@ while ( defined (my $line = $fh->read) ) {
|
|||||||
next if $type ne 'connect'; # ignore unless connect
|
next if $type ne 'connect'; # ignore unless connect
|
||||||
my ($host, $ip) = split /\s/, $message;
|
my ($host, $ip) = split /\s/, $message;
|
||||||
$ip = substr $ip, 1, -1;
|
$ip = substr $ip, 1, -1;
|
||||||
|
foreach ( keys %seen_plugins, qw/ helo_host from to / ) { $pids{$pid}{$_} = ''; };
|
||||||
$pids{$pid}{ip} = $ip;
|
$pids{$pid}{ip} = $ip;
|
||||||
$pids{$pid}{hostname} = $host if $host ne 'Unknown';
|
$pids{$pid}{hostname} = $host if $host ne 'Unknown';
|
||||||
};
|
};
|
||||||
@ -195,7 +196,7 @@ sub parse_line_plugin {
|
|||||||
my ($tai, $pid, $hook, $plugin, $message ) = split /\s/, $line, 5;
|
my ($tai, $pid, $hook, $plugin, $message ) = split /\s/, $line, 5;
|
||||||
$plugin =~ s/:$//;
|
$plugin =~ s/:$//;
|
||||||
if ( $plugin =~ /_3a/ ) {
|
if ( $plugin =~ /_3a/ ) {
|
||||||
($plugin) = split '_3a', $plugin; # trim :N off the plugin log entry
|
($plugin) = split /_3a/, $plugin; # trim :N off the plugin log entry
|
||||||
};
|
};
|
||||||
$plugin =~ s/_2d/-/g;
|
$plugin =~ s/_2d/-/g;
|
||||||
|
|
||||||
@ -231,7 +232,7 @@ sub print_auto_format {
|
|||||||
$seen_plugins{$plugin}++;
|
$seen_plugins{$plugin}++;
|
||||||
};
|
};
|
||||||
|
|
||||||
next if ! $seen_plugins{$plugin}; # hide plugins not used
|
next if ! $seen_plugins{$plugin}; # hide unused plugins
|
||||||
if ( $hide_plugins{$plugin} ) { # user doesn't want to see
|
if ( $hide_plugins{$plugin} ) { # user doesn't want to see
|
||||||
delete $pids{$pid}{$plugin};
|
delete $pids{$pid}{$plugin};
|
||||||
next;
|
next;
|
||||||
@ -320,7 +321,7 @@ sub populate_plugins_from_registry {
|
|||||||
next if ! $aliases;
|
next if ! $aliases;
|
||||||
$aliases =~ s/\s+//g;
|
$aliases =~ s/\s+//g;
|
||||||
$plugins{$name}{aliases} = $aliases;
|
$plugins{$name}{aliases} = $aliases;
|
||||||
foreach my $a ( split ',', $aliases ) {
|
foreach my $a ( split /,/, $aliases ) {
|
||||||
$plugin_aliases{$a} = $name;
|
$plugin_aliases{$a} = $name;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -53,7 +53,7 @@ sub auth_flat_file {
|
|||||||
return ( DENY, "authflat - missing password" );
|
return ( DENY, "authflat - missing password" );
|
||||||
}
|
}
|
||||||
|
|
||||||
my ( $pw_name, $pw_domain ) = split '@', lc($user);
|
my ( $pw_name, $pw_domain ) = split /@/, lc($user);
|
||||||
|
|
||||||
unless ( defined $pw_domain ) {
|
unless ( defined $pw_domain ) {
|
||||||
$self->log(LOGINFO, "fail: missing domain");
|
$self->log(LOGINFO, "fail: missing domain");
|
||||||
|
@ -61,7 +61,7 @@ sub auth_vpopmail {
|
|||||||
my ($self, $transaction, $method, $user, $passClear, $passHash, $ticket) =
|
my ($self, $transaction, $method, $user, $passClear, $passHash, $ticket) =
|
||||||
@_;
|
@_;
|
||||||
|
|
||||||
my $pw = vauth_getpw( split '@', lc($user) );
|
my $pw = vauth_getpw( split /@/, lc($user) );
|
||||||
my $pw_clear_passwd = $pw->{pw_clear_passwd};
|
my $pw_clear_passwd = $pw->{pw_clear_passwd};
|
||||||
my $pw_passwd = $pw->{pw_passwd};
|
my $pw_passwd = $pw->{pw_passwd};
|
||||||
|
|
||||||
|
@ -104,7 +104,7 @@ sub get_db_handle {
|
|||||||
sub get_vpopmail_user {
|
sub get_vpopmail_user {
|
||||||
my ( $self, $dbh, $user ) = @_;
|
my ( $self, $dbh, $user ) = @_;
|
||||||
|
|
||||||
my ( $pw_name, $pw_domain ) = split '@', lc($user);
|
my ( $pw_name, $pw_domain ) = split /@/, lc($user);
|
||||||
|
|
||||||
if ( ! defined $pw_domain ) {
|
if ( ! defined $pw_domain ) {
|
||||||
$self->log(LOGINFO, "skip: missing domain: " . lc $user );
|
$self->log(LOGINFO, "skip: missing domain: " . lc $user );
|
||||||
|
@ -260,7 +260,7 @@ sub select_username {
|
|||||||
$self->log(LOGDEBUG, "Message has $recipient_count recipients");
|
$self->log(LOGDEBUG, "Message has $recipient_count recipients");
|
||||||
|
|
||||||
if ( $recipient_count > 1 ) {
|
if ( $recipient_count > 1 ) {
|
||||||
$self->log(LOGINFO, "skipping user prefs, $recipient_count recipients detected.");
|
$self->log(LOGINFO, "multiple recipients ($recipient_count), ignoring user prefs");
|
||||||
return getpwuid($>);
|
return getpwuid($>);
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -296,13 +296,13 @@ sub parse_response {
|
|||||||
|
|
||||||
#return $self->parse_response_regexp( $response ); # probably slower
|
#return $self->parse_response_regexp( $response ); # probably slower
|
||||||
|
|
||||||
my ($user, $result, $class, $prob, $conf, $sig) = split '; ', $response;
|
my ($user, $result, $class, $prob, $conf, $sig) = split /; /, $response;
|
||||||
|
|
||||||
(undef, $result) = split '=', $result;
|
(undef, $result) = split /=/, $result;
|
||||||
(undef, $class ) = split '=', $class;
|
(undef, $class ) = split /=/, $class;
|
||||||
(undef, $prob ) = split '=', $prob;
|
(undef, $prob ) = split /=/, $prob;
|
||||||
(undef, $conf ) = split '=', $conf;
|
(undef, $conf ) = split /=/, $conf;
|
||||||
(undef, $sig ) = split '=', $sig;
|
(undef, $sig ) = split /=/, $sig;
|
||||||
|
|
||||||
$result = substr($result, 1, -1); # strip off quotes
|
$result = substr($result, 1, -1); # strip off quotes
|
||||||
$class = substr($class, 1, -1);
|
$class = substr($class, 1, -1);
|
||||||
@ -656,7 +656,9 @@ sub autolearn_spamassassin {
|
|||||||
|
|
||||||
my $sa = $transaction->notes('spamassassin' );
|
my $sa = $transaction->notes('spamassassin' );
|
||||||
if ( ! $sa || ! $sa->{is_spam} ) {
|
if ( ! $sa || ! $sa->{is_spam} ) {
|
||||||
$self->log(LOGERROR, "SA results missing");
|
if ( ! $self->connection->notes('naughty') ) {
|
||||||
|
$self->log(LOGERROR, "SA results missing"); # SA skips naughty
|
||||||
|
};
|
||||||
return;
|
return;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -98,7 +98,7 @@ sub in_hosts_allow {
|
|||||||
my ($ipmask, $const, $message) = split /\s+/, $_, 3;
|
my ($ipmask, $const, $message) = split /\s+/, $_, 3;
|
||||||
next unless defined $const;
|
next unless defined $const;
|
||||||
|
|
||||||
my ($net,$mask) = split '/', $ipmask, 2;
|
my ($net,$mask) = split /\//, $ipmask, 2;
|
||||||
$mask = 32 if ! defined $mask;
|
$mask = 32 if ! defined $mask;
|
||||||
$mask = pack "B32", "1"x($mask)."0"x(32-$mask);
|
$mask = pack "B32", "1"x($mask)."0"x(32-$mask);
|
||||||
if (join('.', unpack('C4', inet_aton($remote) & $mask)) eq $net) {
|
if (join('.', unpack('C4', inet_aton($remote) & $mask)) eq $net) {
|
||||||
|
@ -153,7 +153,7 @@ sub read_map {
|
|||||||
s/^\s*//;
|
s/^\s*//;
|
||||||
next if /^#/;
|
next if /^#/;
|
||||||
next unless $_;
|
next unless $_;
|
||||||
my ($addr, $code, $msg) = split ' ', $_, 3;
|
my ($addr, $code, $msg) = split / /, $_, 3;
|
||||||
next unless $addr;
|
next unless $addr;
|
||||||
|
|
||||||
unless ($code) {
|
unless ($code) {
|
||||||
|
Loading…
Reference in New Issue
Block a user