A few coding style and minor changes to the Courier patch, to match the rest
of 2.6.0-rc1.
Best wishes,
Martin
On 19/03/08 15:15, Mark Martinec wrote:
> A release candidate of amavisd-new 2.6.0 it is available at:
>
> http://www.ijs.si/software/amavisd/amavisd-new-2.6.0-rc1.tar.gz
>
> There are no compatibility issues with 2.6.0-pre3.
>
> There are some incompatibilities with 2.5.4, the most visible one
> is an addition of one field to SQL tables when SQL logging or
> SQL quarantining is in use. See RELEASE_NOTES for details.
>
> Module Mail::DKIM is now required by default, its version should
> be 0.30.1 (or later).
>
>
> MAIN NEW FEATURES SUMMARY
>
> - integrated DKIM signing and verification; see section
> A QUICK START TO DKIM SIGNING by the end of release note;
> - SQL logging and quarantining tables have a new field 'partition_tag';
> - captures SpamAssassin logging, more flexibility specifying SA log areas;
> - collects and logs SpamAssassin timing breakdown report (requires SA 3.3);
> - releasing from a quarantine can push a released message to an attachment;
> - new experiental code for abuse reporting using the ARF format (draft);
> - TLS support on the SMTP client- and server side;
> - connection caching by a SMTP client;
> - amavisd-nanny and amavisd-agent now re-open a database on amavisd restarts;
> - amavisd-nanny and amavisd-agent new command line option: -c count;
> - updated p0f-analyzer.pl supports source port number in queries;
> - amavisd can send queries either to p0f-analyzer.pl or directly to p0f;
--
Martin Orr
--- amavisd 2008-03-20 12:21:14.000000000 +0000
+++ /usr/local/sbin/amavisd 2008-03-20 13:51:30.000000000 +0000
@@ -15537,15 +15537,10 @@
use warnings FATAL => 'utf8';
BEGIN {
- use Exporter ();
+ require Exporter;
use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS $VERSION);
- $VERSION = '2.043';
+ $VERSION = '2.100';
@ISA = qw(Exporter);
-}
-
-use IO::File;
-
-BEGIN {
import Amavis::Conf qw(:platform :confvars ca c);
import Amavis::Util qw(do_log am_id untaint debug_oneshot snmp_counters_init
switch_to_my_time switch_to_client_time
@@ -15559,6 +15554,8 @@
import Amavis::In::Message;
}
+use IO::File;
+
# Amavis::In::Courier->new()
# Creates a new Amavis::In::Courier object
sub new() {
@@ -15578,13 +15575,12 @@
# Save the policy bank so that it can be restored at the end
my %baseline_policy_bank = %current_policy_bank;
- my $policy_bank_changed = 0;
eval {
- $self->init_request();
+ $self->init_request($conn);
$self->read_courierfilter_socket($socket);
$self->open_mail_text();
- $policy_bank_changed = $self->change_policy_bank();
+ $self->change_policy_bank();
$self->call_check_mail($conn, $check_mail);
$self->process_result();
1;
@@ -15609,7 +15605,7 @@
do_log(2, Amavis::Timing::report());
# Restore the policy bank
- %current_policy_bank = %baseline_policy_bank if ($policy_bank_changed);
+ %current_policy_bank = %baseline_policy_bank;
# Clean up object
$self->{per_recip_data} = undef;
@@ -15619,8 +15615,9 @@
# courier_in_obj->init_request( )
# Begins processing for a single request: initialises global variables and
# creates msginfo object
-sub init_request() {
- my($self) = @_;
+# conn: Amavis::In::Connection object
+sub init_request($) {
+ my($self, $conn) = @_;
# Set up globals
am_id("$$-$Amavis::child_invocation_count");
@@ -15630,6 +15627,10 @@
# Create msginfo object
$self->{msginfo} = Amavis::In::Message->new;
$self->{msginfo}->rx_time(time);
+ $self->{msginfo}->log_id(am_id());
+ $self->{msginfo}->conn_obj($conn);
+
+ $conn->appl_proto('courierfilter');
}
# courier_in_obj->read_courierfilter_socket(socket)
@@ -15697,6 +15698,7 @@
foreach (split(/\n/, $control_data)) {
# Parse a line of the control file
# Sender
+ do_log(1, "Control line: $_");
if (/^s ( .*? (?: \[ (?: \\. | [^\]\\] )* \]
| [^@"<>\[\]\\\s] )*
) \z/xs) {
@@ -15781,12 +15783,10 @@
# courier_in_obj->change_policy_bank( )
# Loads a new policy bank if necessary
# Also enables debug_oneshot if necessary, and sets msginfo->client_addr_mynets
-# Returns 1 if the policy bank is changed, 0 otherwise
sub change_policy_bank() {
my($self) = @_;
my $cl_ip = $self->{msginfo}->client_addr;
my $sender = $self->{msginfo}->sender;
- my $policy_changed = 0;
# Enable debug_oneshot if set for this sender
debug_oneshot(1) if lookup(0, $sender, @{ ca('debug_sender_maps') });
@@ -15797,11 +15797,9 @@
$self->{msginfo}->client_addr_mynets($cl_ip_mynets);
if (($cl_ip_mynets?1:0) > (c('originating')?1:0)) {
$current_policy_bank{'originating'} = $cl_ip_mynets;
- $policy_changed = 1;
}
if ($cl_ip_mynets && defined($policy_bank{'MYNETS'})) {
Amavis::load_policy_bank('MYNETS');
- $policy_changed = 1;
}
# Load MYUSERS policy bank if sender is local
@@ -15809,10 +15807,7 @@
&& lookup(0, $sender, @{ ca('local_domains_maps') }))
{
Amavis::load_policy_bank('MYUSERS');
- $policy_changed = 1;
}
-
- $policy_changed;
}
# courier_in_obj->call_check_mail(conn, check_mail)
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
AMaViS-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/amavis-user
AMaViS-FAQ:http://www.amavis.org/amavis-faq.php3
AMaViS-HowTos:http://www.amavis.org/howto/