Subversion Repositories sa-exim

Compare Revisions

Ignore whitespace Rev 29 → Rev 28

/branches/experimental/sa-exim.conf
File deleted
/branches/experimental/localscan_dlopen_exim_4.20_or_better.patch
File deleted
/branches/experimental/Changelog.html
File deleted
/branches/experimental/eximinc/README
File deleted
/branches/experimental/eximinc/mytypes.h
File deleted
/branches/experimental/eximinc/store.h
File deleted
/branches/experimental/eximinc/local_scan.h
File deleted
/branches/experimental/eximinc/version
File deleted
/branches/experimental/localscan_dlopen_up_to_exim_4.14.patch
File deleted
/branches/experimental/README.greylisting
File deleted
/branches/experimental/Acknowledgements.html
File deleted
/branches/experimental/README
File deleted
/branches/experimental/contrib/sa-exim-stats.txt
File deleted
/branches/experimental/contrib/spam_resend.txt
File deleted
/branches/experimental/SA-greylisting-2.4x.diff
File deleted
/branches/experimental/TODO
File deleted
/branches/experimental/greylistclean.cron
File deleted
/branches/experimental/greylistclean
File deleted
Property changes:
Deleted: svn:executable
Index: branches/experimental/INSTALL
===================================================================
--- branches/experimental/INSTALL (revision 29)
+++ branches/experimental/INSTALL (nonexistent)
@@ -1,100 +0,0 @@
-READ THIS FIRST
----------------
-If you try to build with 'make' without editing the makefile for sa-exim to
-see the exim source, and if you haven't patched your exim source with
-localscan_dlopen.patch, sa-exim will not build.
-This is normal, see the BUILDING section below
-
-This version of sa-exim now requires at least exim 4.11
-
-
-
-
-BUILDING
---------
-The code can be compiled in two ways:
-
-0) Do not set LOCAL_SCAN_HAS_OPTIONS=yes in exim's Makefile. Leave the
- default which is disabled.
-
-1) Unpack exim 4.11 or better, and overwrite src/local_scan.c with
- sa-exim.c.
- In the sa-exim distribution directory, type make sa-exim.h, and copy
- it in the same place than sa-exim.c.
- Rebuild exim, and you're done.
- Note that if you do this, you are responsible for modifying variables
- in sa-exim.c that would normally have been modified by the Makefile.
-
- This method might seem simpler, but it requires that you rebuild exim every
- time you upgrade sa-exim.
-
-2) The better solution is to patch exim with localscan_dlopen.patch originally
- from David Woodhouse (provided in this archive), and rebuild exim.
- Here are details on how to patch exim if yours needs it (at least debian's
- exim4 is prepatched, yours may be too).
- Choose the patch for your exim version (Philip included the portion that
- sets LOCAL_SCAN_ABI_VERSION_MAJOR and LOCAL_SCAN_ABI_VERSION_MINOR in exim
- 4.20)
- - localscan_dlopen_exim_4.20_or_better.patch
- - localscan_dlopen_up_to_4.14.patch
-
-
- What you gain from doing this is that sa-exim, or another local_scan module
- can be plugged into exim without rebuilding exim itself (here too you need
- exim 4.11 or better)
-
- To build, you can edit EXIM_SRC in the Makefile and build sa-exim-x.y.so,
- or I have also recently modified the build environment so that you can
- now build sa-exim without having the exim sources.
- You can look in eximinc/version to see which source I included. While this
- should work for the forseable future, the exim local_scan API might change
- one day and not building against the current exim sources could cause issues
- (hopefully, at worst it will prevent sa-exim from using better functions in
- newer versions of the local_scan API).
- To be really safe, I modified the localscan_dlopen patch to include a
- minor and major version number for the API. Philip has agreed to including
- the piece of the patch that says which version of the API exim is using,
- so it will be obvious in the future whether exim becomes potentially
- incompatible with an older version of sa-exim. Note that when Philip adds
- this small portion of the patch, you will have a resulting conflict if
- you try to apply it again. This is obviously normal, just remove it :-)
-
- Once you're done building, you can copy sa-exim-x.y.so and optionally the
- dummy/test accept.so in /usr/lib/exim4/local_scan/, and add this to your
- exim4.conf (at the beginning of the file)
- #local_scan_path = /usr/lib/exim4/local_scan/accept.so
- local_scan_path = /usr/lib/exim4/local_scan/sa-exim.so
-
- If you are a package builder, note that you don't actually have
- to edit the values in the Makefile, you can override them as such:
- make SACONF=/etc/mail/sa-exim.conf LDFLAGS="-shared -fPIC"
-
-
-The following is mostly obsolete, but left here for info purposes
------------------------------------------------------------------
-I would also recommend to edit exim/src/config.h.defaults as such:
-#define STRING_SPRINTF_BUFFER_SIZE 32768
-The default value is a bit too small for some of the strings that we need to
-expand from SA.
-That said, I found out that exim then complaints that the headers
-it tries to add are too big even after I set "uschar buffer[32768];" in
-src/header.c.
-As a result, I haven't quite found out how to deal with more than 8KB worth
-of SpamAssassin headers, but it may not be a huge deal, 8KB headers are too
-long anyway.
-I asked the SA guys not to output such huge headers and I wrote a patch
-to disable one of the "features" that outputs such huge headers.
-See: http://bugzilla.spamassassin.org/showattachment.cgi?attach_id=195
-This is included and turned on by default in Spamassassin 2.40 and later.
-
-
-INSTALL
--------
-Copy sa-exim.conf to /etc/exim4 (or whatever you set SACONF to),
-and make sure to read it and edit the values to suit your environment.
-So that you don't make any mistakes, SAEximRunCond is turned off by default.
-This should force you to scan the docs before potentially shooting yourself
-in the foot :)
-
-See README for options
-
Index: branches/experimental/Greylisting.pm
===================================================================
--- branches/experimental/Greylisting.pm (revision 29)
+++ branches/experimental/Greylisting.pm (nonexistent)
@@ -1,296 +0,0 @@
-package Greylisting;
-#
-# $Id: Greylisting.pm,v 1.4 2006/01/11 17:17:28 marcmerlin Exp $
-#
-
-# General Greylisting Plugin, written by Marc MERLIN <marc_soft@merlins.org>
-# (Kristopher Austin gets the credit for the original port to an SA 3.0 plugin)
-#
-# This was originally written to implement greylisting in SA-Exim, although
-# I have tried to make it more general and allow for reuse in other MTAs
-# (although they will need to
-# 1) be running SA at SMTP time
-# 2) Provide the list of rcpt to and env from in some headers for SA to read
-# 3) Provide the IP of the connecting host )
-#
-# This rule should get a negative score so that if we've already seen the
-# greylisting tuplet before, we lower the score, which hopefully brings us from
-# a tempreject to an accept (at least that's how sa-exim does it)
-#
-# -- Marc 2004/01/19
-
-use strict;
-use Mail::SpamAssassin::Plugin;
-our @ISA = qw(Mail::SpamAssassin::Plugin);
-
-sub new
-{
- my ($class, $mailsa) = @_;
- $class = ref($class) || $class;
- my $self = $class->SUPER::new($mailsa);
- bless ($self, $class);
- $self->register_eval_rule ("greylisting");
- return $self;
-}
-
-
-sub check_end
-{
- my ($self, $permsgstatus) = @_;
-
- if (not $self->{'rangreylisting'})
- {
- Mail::SpamAssassin::Plugin::dbg("GREYLISTING: greylisting didn't run since the configuration wasn't setup to call us");
- }
-}
-
-# Greylisting happens depending on the SA score, so we want to run it last,
-# which is why we give it a high priority
-sub greylisting
-{
- my ($self, $permsgstatus, $optionhash) = @_;
-
- my $connectip;
- my $envfrom;
- my $rcptto;
- my @rcptto;
- my $iswhitelisted=0;
- my $err;
- my $mesgid = $permsgstatus->get('Message-Id')."\n";
- my $mesgidfn;
- my $tuplet;
- my $sascore = $permsgstatus->get_score();
- my $dontcheckscore;
- my %option;
-
- Mail::SpamAssassin::Plugin::dbg("GREYLISTING: called function");
-
- $optionhash =~ s/;/,/g;
- # This is safe, right? (users shouldn't be able to set it in their config)
- %option=eval $optionhash;
- $self->{'rangreylisting'}=1;
-
- foreach my $reqoption (qw ( method greylistsecs dontgreylistthreshold
- connectiphdr envfromhdr rcpttohdr greylistnullfrom greylistfourthbyte ))
- {
- die "Greylist option $reqoption missing from SA config" unless (defined $option{$reqoption});
- }
-
- $dontcheckscore = $option{'dontgreylistthreshold'};
-
-
- # No newlines, thank you (yes, you need this twice apparently)
- chomp ($mesgid);
- chomp ($mesgid);
- # Newline in the middle mesgids, are you serious? Get rid of them here
- $mesgid =~ s/\012/|/g;
-
- # For stuff that we know is spam, don't greylist the host
- # (that might help later spam with a lower score to come in)
- if ($sascore >= $dontcheckscore)
- {
- Mail::SpamAssassin::Plugin::dbg("GREYLISTING: skipping greylisting on $mesgid, since score is already $sascore and you configured greylisting not to bother with anything above $dontcheckscore");
- return 0;
- }
- else
- {
- Mail::SpamAssassin::Plugin::dbg("GREYLISTING: running greylisting on $mesgid, since score is too low ($sascore) and you configured greylisting to greylist anything under $dontcheckscore");
- }
-
- if (not $connectip = $permsgstatus->get($option{'connectiphdr'}))
- {
- warn "Couldn't get Connecting IP header $option{'connectiphdr'} for message $mesgid, skipping greylisting call\n";
- return 0;
- }
- chomp($connectip);
- # Clean up input (for security, if you use files/dirs)
- $connectip =~ /([\d.:]+)/;
- $connectip = ($1 or "");
-
- # Account for a null envelope from
- if (not defined ($envfrom = $permsgstatus->get($option{'envfromhdr'})))
- {
- warn "Couldn't get Envelope From header $option{'envfromhdr'} for message $mesgid, skipping greylisting call\n";
- return 0;
- }
- chomp($envfrom);
- # Clean up input (for security, if you use files/dirs)
- $envfrom =~ s#/#-#g;
- if (not $envfrom)
- {
- $envfrom="<>";
- return 0 if (not $option{'greylistnullfrom'});
- }
-
- if (not $rcptto = $permsgstatus->get($option{'rcpttohdr'}))
- {
- warn "Couldn't get Rcpt To header $option{'rcpttohdr'} for message $mesgid, skipping greylisting call\n";
- return 0;
- }
- chomp($rcptto);
- # Clean up input (for security, if you use files/dirs)
- $rcptto =~ s#/#-#g;
- @rcptto = split(/, /, $rcptto);
-
-
- umask 0007;
-
- foreach $rcptto (@rcptto)
- {
- # The dir method is easy to fiddle with and expire records in (with
- # a find | rm) but it's probably more I/O extensive than a real DB
- # and suffers from directory size problems if a specific IP is sending
- # generating tens of thousands of tuplets. -- Marc
- # That said, I prefer formats I can easily tinker with, and not having
- # to worry about buggy locking and so forth
-
- if ($option{'method'} eq "dir")
- {
- my $tmpvar;
-
- # The clean strings are hardcoded because it's hard to do a variable
- # substitution within a tr (and using the eval solution is too
- # resource expensive)
- # envfrom could be cleaned outside of the loop, but the other method
- # options might now want that
- $envfrom =~ tr/!#%()*+,-.0123456789:<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_abcdefghijklmnopqrstuvwxyz{|}~/_/c;
- # clean variables to run properly under -T
- $envfrom =~ /(.+)/;
- $tmpvar = ($1 or "");
- # work around bug in perl untaint in perl 5.8
- $envfrom=undef;
- $envfrom=$tmpvar;
- $rcptto =~ tr/!#%()*+,-.0123456789:<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_abcdefghijklmnopqrstuvwxyz{|}~/_/c;
- $rcptto =~ /(.+)/;
- $tmpvar = ($1 or "");
- $rcptto=undef;
- $rcptto=$tmpvar;
-
- die "greylist option dir not passed, even though method was set to dir" unless ($option{'dir'});
-
- # connectip is supposed to be untainted now, but I was still getting
- # some insecure dependecy error messages sometimes (perl 5.8 problem apparently)
- $connectip =~ /(\d+)\.(\d+)\.(\d+)\.(\d+)/;
- my ($ipbyte1, $ipbyte2, $ipbyte3, $ipbyte4) = ($1, $2, $3, $4);
- my $ipdir1 = "$option{'dir'}/$ipbyte1";
- my $ipdir2 = "$ipdir1/$ipbyte2";
- my $ipdir3 = "$ipdir2/$ipbyte3";
- my $ipdir4;
- my $tupletdir;
-
- $ipdir4 = "$ipdir3";
- $ipdir4 .= "/$ipbyte4" if ($option{'greylistfourthbyte'});
- $tupletdir = "$ipdir4/$envfrom";
-
- $tuplet = "$tupletdir/$rcptto";
-
- # make directory whether it's there or not (faster than test and set)
- mkdir $ipdir1;
- mkdir $ipdir2;
- mkdir $ipdir3;
- mkdir $ipdir4;
- mkdir $tupletdir;
-
- if (not -e $tuplet)
- {
- # If the tuplets aren't there, we create them and continue in
- # case there are other ones (one of them might be whitelisted
- # already)
- $err="creating $tuplet";
- open (TUPLET, ">$tuplet") or goto greylisterror;
- print TUPLET time."\n";
- print TUPLET "Status: Greylisted\n";
- print TUPLET "Last Message-Id: $mesgid\n";
- print TUPLET "Whitelisted Count: 0\n";
- print TUPLET "Query Count: 1\n";
- print TUPLET "SA Score: $sascore\n";
- $err="closing first-written $tuplet";
- close TUPLET or goto greylisterror;
- }
- else
- {
- my $time;
- my $status;
- my $whitelistcount;
- my $querycount;
-
- # Take into account race condition of expiring deletes and us
- # running
- $err="reading $tuplet";
- open (TUPLET, "<$tuplet") or goto greylisterror;
- $err="Couldn't read time";
- defined ($time=<TUPLET>) or goto greylisterror;
- chomp ($time);
-
- $err="Couldn't read status";
- defined ($status=<TUPLET>) or goto greylisterror;
- chomp ($status);
- $err="Couldn't extract Status from $status";
- $status =~ s/^Status: // or goto greylisterror;
-
- # Skip Mesg-Id
- $err="Couldn't skip Mesg-Id";
- defined ($_=<TUPLET>) or goto greylisterror;
-
- $err="Couldn't read whitelistcount";
- defined ($whitelistcount=<TUPLET>) or goto greylisterror;
- chomp ($whitelistcount);
- $err="Couldn't extract Whitelisted Count from $whitelistcount";
- $whitelistcount =~ s/^Whitelisted Count: // or goto greylisterror;
-
- $err="Couldn't read querycount";
- defined ($querycount=<TUPLET>) or goto greylisterror;
- chomp ($querycount);
- $err="Couldn't extract Query Count from $querycount";
- $querycount =~ s/^Query Count: // or goto greylisterror;
- close (TUPLET);
-
- $querycount++;
- if ((time - $time) > $option{'greylistsecs'})
- {
- $status="Whitelisted";
- $whitelistcount++;
- }
-
- $err="re-writing $tuplet";
- open (TUPLET, ">$tuplet") or goto greylisterror;
- print TUPLET "$time\n";
- print TUPLET "Status: $status\n";
- print TUPLET "Last Message-Id: $mesgid\n";
- print TUPLET "Whitelisted Count: $whitelistcount\n";
- print TUPLET "Query Count: $querycount\n";
- print TUPLET "SA Score: $sascore\n";
- $err="closing re-written $tuplet";
- close TUPLET or goto greylisterror;
-
- # We continue processing the other recipients, to setup or
- # update their counters
- if ($status eq "Whitelisted")
- {
- $iswhitelisted=1;
- }
- }
- }
- elsif ($option{'method'} eq "file")
- {
- warn "codeme (file greylisting)\n";
- }
- elsif ($option{'method'} eq "db")
- {
- warn "codeme (db greylisting)\n";
- }
- }
-
- Mail::SpamAssassin::Plugin::dbg("GREYLISTING: computed greylisting on tuplet, saved info in $tuplet and whitelist status is $iswhitelisted");
- return $iswhitelisted;
-
- greylisterror:
- warn "Reached greylisterror: $err / $!";
- # delete tuplet since it apparently had issues but don't check for errors
- # in case it was a permission denied on write
- unlink ($tuplet);
- return $iswhitelisted;
-}
-
-
-1;
Index: branches/experimental/SA-greylisting-2.6.diff
===================================================================
--- branches/experimental/SA-greylisting-2.6.diff (revision 29)
+++ branches/experimental/SA-greylisting-2.6.diff (nonexistent)
@@ -1,304 +0,0 @@
-diff -urN SpamAssassin.orig/Conf.pm SpamAssassin/Conf.pm
---- SpamAssassin.orig/Conf.pm Mon Dec 15 22:41:57 2003
-+++ SpamAssassin/Conf.pm Sun Feb 29 17:42:58 2004
-@@ -107,6 +107,10 @@
- use constant TYPE_URI_EVALS => 0x0011;
- use constant TYPE_META_TESTS => 0x0012;
- use constant TYPE_RBL_EVALS => 0x0013;
-+# Need to reserve a number with the SA folks (needs to be odd as it is an
-+# eval test)
-+use constant TYPE_RES_EVALS => 0x0021;
-+
-
- $VERSION = 'bogus'; # avoid CPAN.pm picking up version strings later
-
-@@ -2000,12 +2004,15 @@
-
- =cut
-
-- if (/^header\s+(\S+)\s+(?:rbl)?eval:(.*)$/) {
-+ if (/^header\s+(\S+)\s+(?:rbl|res)?eval:(.*)$/) {
- my ($name, $fn) = ($1, $2);
-
- if ($fn =~ /^check_rbl/) {
- $self->add_test ($name, $fn, TYPE_RBL_EVALS);
- }
-+ elsif (/^header\s+(\S+)\s+reseval:(.*)$/) {
-+ $self->add_test ($name, $fn, TYPE_RES_EVALS);
-+ }
- else {
- $self->add_test ($name, $fn, TYPE_HEAD_EVALS);
- }
-@@ -2603,6 +2610,9 @@
- }
- elsif ($type == TYPE_RBL_EVALS) {
- $self->{rbl_evals}->{$name} = \@args;
-+ }
-+ elsif ($type == TYPE_RES_EVALS) {
-+ $self->{res_evals}->{$name} = \@args;
- }
- elsif ($type == TYPE_RAWBODY_EVALS) {
- $self->{rawbody_evals}->{$name} = \@args;
-diff -urN SpamAssassin.orig/EvalTests.pm SpamAssassin/EvalTests.pm
---- SpamAssassin.orig/EvalTests.pm Sat Jan 17 15:56:08 2004
-+++ SpamAssassin/EvalTests.pm Sun Aug 15 15:47:22 2004
-@@ -1941,6 +1941,234 @@
- return $self->{habeas_swe};
- }
-
-+
-+# This was originally written to implement greylisting in SA-Exim, although
-+# I have tried to make it more general and allow for reuse in other MTAs
-+# (although they will need to
-+# 1) be running SA at SMTP time
-+# 2) Provide the list of rcpt to and env from in some headers for SA to read
-+# 3) Provide the IP of the connecting host )
-+#
-+# This rule should get a negative score so that if we've already seen the
-+# greylisting tuplet before, we lower the score, which hopefully brings us from
-+# a tempreject to an accept (at least that's how sa-exim does it)
-+# -- Marc <marc_soft@merlins.org> 2004/01/19
-+
-+sub greylisting {
-+ my ($self, $optionhash) = @_;
-+
-+ $optionhash =~ s/;/,/g;
-+ # This is safe, right? (users shouldn't be able to set it in their config)
-+ my %option=eval $optionhash;
-+ my $connectip;
-+ my $envfrom;
-+ my $rcptto;
-+ my @rcptto;
-+ my $iswhitelisted=0;
-+ my $err;
-+ my $mesgid = $self->get ('Message-Id')."\n";
-+ my $mesgidfn;
-+ my $tuplet;
-+
-+ foreach my $reqoption (qw ( method greylistsecs dontgreylistthreshold
-+ connectiphdr envfromhdr rcpttohdr greylistnullfrom greylistfourthbyte ))
-+ {
-+ die "Greylist option $reqoption missing from SA config" unless (defined $option{$reqoption});
-+ #warn "found $reqoption -> $option{$reqoption}\n";
-+ }
-+
-+ # No newlines, thank you (yes, you need this twice apparently)
-+ chomp ($mesgid);
-+ chomp ($mesgid);
-+ # Newline in the middle mesgids, are you serious? Get rid of them here
-+ $mesgid =~ s/\012/|/g;
-+
-+ # For stuff that we know is spam, don't greylist the host
-+ # (that might help later spam with a lower score to come in)
-+ if ($self->{hits} >= $option{'dontgreylistthreshold'})
-+ {
-+ #warn "debug: skipping greylisting on $mesgid, since score is already ".$self->{hits}." and you configured greylisting to not bother with anything above $dontcheckscore\n";
-+ return 0;
-+ }
-+
-+
-+ if (not $connectip = $self->get($option{'connectiphdr'}))
-+ {
-+ warn "Couldn't get Connecting IP header $option{'connectiphdr'} for message $mesgid, skipping greylisting call\n";
-+ return 0;
-+ }
-+ chomp($connectip);
-+ # Clean up input (for security, if you use files/dirs)
-+ $connectip =~ s#/#-#g;
-+
-+ # Account for a null envelope from
-+ if (not defined ($envfrom = $self->get($option{'envfromhdr'})))
-+ {
-+ warn "Couldn't get Envelope From header $option{'envfromhdr'} for message $mesgid, skipping greylisting call\n";
-+ return 0;
-+ }
-+ chomp($envfrom);
-+ # Clean up input (for security, if you use files/dirs)
-+ $envfrom =~ s#/#-#g;
-+ if (not $envfrom)
-+ {
-+ $envfrom="<>";
-+ return 0 if (not $option{'greylistnullfrom'});
-+ }
-+
-+ if (not $rcptto = $self->get($option{'rcpttohdr'}))
-+ {
-+ warn "Couldn't get Rcpt To header $option{'rcpttohdr'} for message $mesgid, skipping greylisting call\n";
-+ return 0;
-+ }
-+ chomp($rcptto);
-+ # Clean up input (for security, if you use files/dirs)
-+ $rcptto =~ s#/#-#g;
-+ @rcptto = split(/, /, $rcptto);
-+
-+
-+ umask 0007;
-+
-+ foreach $rcptto (@rcptto)
-+ {
-+ # The dir method is easy to fiddle with and expire records in (with
-+ # a find | rm) but it's probably more I/O extensive than a real DB
-+ # and suffers from directory size problems if a specific IP is sending
-+ # generating tens of thousands of tuplets. -- Marc
-+ # That said, I prefer formats I can easily tinker with, and not having to
-+ # worry about buggy locking and so forth
-+
-+ if ($option{'method'} eq "dir")
-+ {
-+ # The clean strings are hardcoded because it's hard to do a variable
-+ # substitution within a tr (and using the eval solution is too resource
-+ # expensive)
-+ $envfrom =~ tr/!#%( )*+,-.0123456789:<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_abcdefghijklmnopqrstuvwxyz{|}~/_/c;
-+ # clean variables to run properly under -T
-+ $envfrom =~ /(.+)/;
-+ $envfrom = $1;
-+ $rcptto =~ tr/!#%( )*+,-.0123456789:<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_abcdefghijklmnopqrstuvwxyz{|}~/_/c;
-+ $rcptto =~ /(.+)/;
-+ $rcptto = $1;
-+
-+ die "greylist option dir not passed, even though method was set to dir" unless ($option{'dir'});
-+ my ($ipbyte1, $ipbyte2, $ipbyte3, $ipbyte4) = split(/\./, $connectip);
-+ my $ipdir1 = "$option{'dir'}/$ipbyte1";
-+ my $ipdir2 = "$ipdir1/$ipbyte2";
-+ my $ipdir3 = "$ipdir2/$ipbyte3";
-+ my $ipdir4;
-+ my $tupletdir;
-+
-+ $ipdir4 = "$ipdir3";
-+ $ipdir4 .= "/$ipbyte4" if ($option{'greylistfourthbyte'});
-+ $tupletdir = "$ipdir4/$envfrom";
-+
-+ $tuplet = "$tupletdir/$rcptto";
-+
-+ # make directory whether it's there or not (faster than test and set)
-+ mkdir $ipdir1;
-+ mkdir $ipdir2;
-+ mkdir $ipdir3;
-+ mkdir $ipdir4;
-+ mkdir $tupletdir;
-+
-+ if (not -e $tuplet)
-+ {
-+ # If the tuplets aren't there, we create them and continue in
-+ # case there are other ones (one of them might be whitelisted already)
-+ $err="creating $tuplet";
-+ open (TUPLET, ">$tuplet") or goto greylisterror;
-+ print TUPLET time."\n";
-+ print TUPLET "Status: Greylisted\n";
-+ print TUPLET "Last Message-Id: $mesgid\n";
-+ print TUPLET "Whitelisted Count: 0\n";
-+ print TUPLET "Query Count: 1\n";
-+ $err="closing first-written $tuplet";
-+ close TUPLET or goto greylisterror;
-+ }
-+ else
-+ {
-+ my $time;
-+ my $status;
-+ my $whitelistcount;
-+ my $querycount;
-+
-+ # Take into account race condition of expiring deletes and us running
-+ $err="reading $tuplet";
-+ open (TUPLET, "<$tuplet") or goto greylisterror;
-+ $err="Couldn't read time";
-+ defined ($time=<TUPLET>) or goto greylisterror;
-+ chomp ($time);
-+
-+ $err="Couldn't read status";
-+ defined ($status=<TUPLET>) or goto greylisterror;
-+ chomp ($status);
-+ $err="Couldn't extract Status from $status";
-+ $status =~ s/^Status: // or goto greylisterror;
-+
-+ # Skip Mesg-Id
-+ $err="Couldn't skip Mesg-Id";
-+ defined ($_=<TUPLET>) or goto greylisterror;
-+
-+ $err="Couldn't read whitelistcount";
-+ defined ($whitelistcount=<TUPLET>) or goto greylisterror;
-+ chomp ($whitelistcount);
-+ $err="Couldn't extract Whitelisted Count from $whitelistcount";
-+ $whitelistcount =~ s/^Whitelisted Count: // or goto greylisterror;
-+
-+ $err="Couldn't read querycount";
-+ defined ($querycount=<TUPLET>) or goto greylisterror;
-+ chomp ($querycount);
-+ $err="Couldn't extract Query Count from $querycount";
-+ $querycount =~ s/^Query Count: // or goto greylisterror;
-+ close (TUPLET);
-+
-+ $querycount++;
-+ if ((time - $time) > $option{'greylistsecs'})
-+ {
-+ $status="Whitelisted";
-+ $whitelistcount++;
-+ }
-+
-+ $err="re-writing $tuplet";
-+ open (TUPLET, ">$tuplet") or goto greylisterror;
-+ print TUPLET "$time\n";
-+ print TUPLET "Status: $status\n";
-+ print TUPLET "Last Message-Id: $mesgid\n";
-+ print TUPLET "Whitelisted Count: $whitelistcount\n";
-+ print TUPLET "Query Count: $querycount\n";
-+ $err="closing re-written $tuplet";
-+ close TUPLET or goto greylisterror;
-+
-+ # We continue processing the other recipients, to setup or
-+ # update their counters
-+ if ($status eq "Whitelisted")
-+ {
-+ $iswhitelisted=1;
-+ }
-+ }
-+ }
-+ elsif ($option{'method'} eq "file")
-+ {
-+ warn "codeme\n";
-+ }
-+ elsif ($option{'method'} eq "db")
-+ {
-+ warn "codeme\n";
-+ }
-+ }
-+
-+ return $iswhitelisted;
-+
-+ greylisterror:
-+ warn "Reached greylisterror: $err / $!";
-+ # delete tuplet since it apparently had issues but don't check for errors
-+ # in case it was a permission denied on write
-+ unlink ($tuplet);
-+ return $iswhitelisted;
-+}
-+
-+
- ###########################################################################
- # BODY TESTS:
- ###########################################################################
-diff -urN SpamAssassin.orig/PerMsgStatus.pm SpamAssassin/PerMsgStatus.pm
---- SpamAssassin.orig/PerMsgStatus.pm Tue Jan 20 13:40:04 2004
-+++ SpamAssassin/PerMsgStatus.pm Sun Feb 29 19:01:19 2004
-@@ -184,6 +184,9 @@
-
- # add points from Bayes, before adjusting the AWL
- $self->{hits} += $self->{learned_hits};
-+
-+ # Now, we can run rules that have to run last
-+ $self->do_res_eval_tests();
-
- # Do AWL tests last, since these need the score to have already been
- # calculated
-@@ -2010,6 +2013,11 @@
- }
-
- ###########################################################################
-+
-+sub do_res_eval_tests {
-+ my ($self) = @_;
-+ $self->run_eval_tests ($self->{conf}->{res_evals}, '');
-+}
-
- sub do_head_eval_tests {
- my ($self) = @_;
Index: branches/experimental/.cvsignore
===================================================================
--- branches/experimental/.cvsignore (revision 29)
+++ branches/experimental/.cvsignore (nonexistent)
@@ -1,7 +0,0 @@
-.*
-ACKNOWLEDGEMENTS
-CHANGELOG
-sa.html
-sa-exim.h
-sa-exim_short.conf
-
Index: branches/experimental/Makefile
===================================================================
--- branches/experimental/Makefile (revision 29)
+++ branches/experimental/Makefile (nonexistent)
@@ -1,107 +0,0 @@
-# SA-Exim can be built standalone as a loadable module with this Makefile
-# or you can copy sa-exim.c over exim's local_scan.c file if you want to
-# statically build it into exim
-#
-
-VERSION=$(shell cat version)
-
-# The idea is that you don't have to edit these values, you can override
-# them on the command line:
-# make SACONF=/etc/exim/sa-exim.conf LDFLAGS="-shared -fPIC" CC=cc
-CC=gcc
-CFLAGS=-O2 -Wall
-LDFLAGS=-shared
-SACONF=/etc/exim4/sa-exim.conf
-SPAMC=/usr/bin/spamc
-
-
-# I place the directory in exim/debian/local_scan. Adjust the path as needed
-# Actually, we will also look for the versions supplied with this source
-# if we can't find the exim source
-EXIM_SRC= ../../src
-EXIM_SRC_LOCAL = ./eximinc
-SUFF=-$(VERSION)
-
-SAFLAGS=-DSPAMASSASSIN_CONF=\"$(SACONF)\" -DSPAMC_LOCATION=\"$(SPAMC)\"
-BUILDCFLAGS=-I$(EXIM_SRC) -I$(EXIM_SRC_LOCAL) -DDLOPEN_LOCAL_SCAN $(SAFLAGS) $(CFLAGS)
-
-SONAME=$(subst .so,$(SUFF).so,sa-exim.so)
-
-DOCS=sa.html CHANGELOG ACKNOWLEDGEMENTS
-OBJECTS=$(SONAME) accept.so sa-exim_short.conf $(DOCS)
-OTHERTARGETS=sa-exim.h
-
-all: $(OBJECTS)
-
-docs: $(DOCS)
-
-
-$(SONAME) : sa-exim.c sa-exim.h
- @echo "Building $@"
- $(CC) $(BUILDCFLAGS) $(LDFLAGS) -o $@ $<
- chmod a+rx $(SONAME)
-
-accept.so: accept.c
- @echo "Building $@"
- $(CC) $(BUILDCFLAGS) $(LDFLAGS) -o $@ $<
- chmod a+rx $@
-
-ACKNOWLEDGEMENTS: Acknowledgements.html
- @echo "Generating $@"
- @links -dump $< > $@
-
-CHANGELOG: Changelog.html
- @echo "Generating $@"
- @links -dump $< > $@
-
-sa.html: Changelog.html Acknowledgements.html sa.html.template
- @echo "Generating $@"
- @bash -c 'sed "/<Changelog>/,$$ d" < sa.html.template; cat Changelog.html; sed "1,/<\/Changelog>/ d; /<Acknowledgements>/,$$ d" < sa.html.template; cat Acknowledgements.html; sed "1,/<\/Acknowledgements>/ d" < sa.html.template' > sa.html
-
-sa-exim_short.conf: sa-exim.conf
- @cat sa-exim.conf | sed "/# --- snip ---/,$$ d" > sa-exim_short.conf
- @cat sa-exim.conf | grep -v "^#" | tr '\012' 'ÿ' | sed "s/ÿÿÿ*/ÿÿ/g" | tr 'ÿ' '\012' >> sa-exim_short.conf
-
-sa-exim.h: sa-exim.c version
- echo "char *version=\"`cat version` (built `date -R 2>/dev/null || date`)\";" > sa-exim.h
-
-clean:
- @-rm -rf $(OBJECTS) $(DOCS) $(OTHERTARGETS) build-stamp configure-stamp debian/sa-exim debian/sa-exim.postrm.debhelper debian/sa-exim.substvars debian/files 2>/dev/null
-
-deb: ../sa-exim_$(VERSION).orig.tar.gz debian/*
- @make clean
- @dpkg-buildpackage -uc -us -sd -rfakeroot
- @make clean
-
-../sa-exim_$(VERSION).orig.tar.gz: * */*
- @make clean
- @( cd ..; tar chvzf sa-exim_$(VERSION).orig.tar.gz sa-exim-$(VERSION) )
-
-# This didn't work too well, I'll just ship the source with the debian tree
-#deb: ../sa-exim_$(VERSION).orig.tar.gz debian/rules
-# @make clean
-# @dpkg-buildpackage -uc -us -sd -rfakeroot
-#
-#
-#../sa-exim_$(VERSION).tar.gz: * */*
-# @make clean
-# @if [ -d debian ]; then echo "Can't rebuild $@ with debian tree unpacked, please remove it"; exit 1; fi
-# @( cd ..; tar chvzf sa-exim_$(VERSION).tar.gz sa-exim-$(VERSION) )
-#
-#
-#../sa-exim_$(VERSION).orig.tar.gz: ../sa-exim_$(VERSION).tar.gz
-# if [ -e ../sa-exim-$(VERSION).tar.gz ] ; then \
-# cp -a ../sa-exim-$(VERSION).tar.gz ../sa-exim_$(VERSION).orig.tar.gz ; \
-# else \
-# wget http://marc.merlins.org/linux/sa-exim-$(VERSION).tar.gz; \
-# mv sa-exim-$(VERSION).tar.gz ../sa-exim_$(VERSION).orig.tar.gz; \
-# fi
-#
-#
-#debian/rules:
-# @wget http://marc.merlins.org/linux/exim/files/debian/sa-exim_diff.gz
-# @zcat sa-exim_diff.gz | patch -s -p1
-# @/bin/rm sa-exim_diff.gz
-# @chmod 755 debian/rules
-#
-
Index: branches/experimental/sa.html.template
===================================================================
--- branches/experimental/sa.html.template (revision 29)
+++ branches/experimental/sa.html.template (nonexistent)
@@ -1,221 +0,0 @@
-<html>
-<head>
-<title>Exim SpamAssassin at SMTP time</title>
-</head>
-
-<body>
-
-<h1 ALIGN="CENTER">Exim SpamAssassin at SMTP time</h1>
-
-<h3>What's that?</h3>
-<pre>
-mail from: merlin@gandalf
-250 OK
-rcpt to: merlin@gandalf
-250 Accepted
-data
-354 Enter message, ending with "." on a line by itself
-From: merlin@gandalf
-To: merlin@gandalf
-Subject: $$$ Make Money Fast $$$ !!!
-
-viagra 100% GARANTEE AMAZING FULL REFUND
-This is not spam
-.
-550 Rejected
-</pre>
-(logs would show something like this:
-<tt>2004-03-10 08:27:18 1B16Y8-0001UP-4R SA: Action: permanently rejected message: hits=14.8 required=7.0 trigger=11.0 ( scanned in 2/2 secs | Message-Id: CCQPVENACPQBFLTRLICXWQVEK@gandalf). From <merlin@gandalf> (host=gandalf [127.0.0.1]) for merlin@gandalf</tt>)
-
-
-<P>
-An example of teergrube would return this instead
-<pre>
-data
-354 Enter message, ending with "." on a line by itself
-(...)
-body SEE_FOR_YOURSELF /See (?:for|it) yourself\b/i
-describe SEE_FOR_YOURSELF See for yourself
-
-body ORDER_NOW /\border (?:now|soon|fast|quickly|while)\b/i
-describe ORDER_NOW Encourages you to waste no time in ordering
-
-.
-451- wait for more output
-451- wait for more output
-451- wait for more output
-(... one line every 10 secs, 15 minutes elapse ...)
-450 Please try again later
-</pre>
-
-The idea here is to stall and waste the resources of the remote sender (BTW
-teergrube comes from german, and means tar-pitting, or stopping someone in his
-tracks)
-
-<BR><BR>
-<h3>Why?</h3>
-SpamAssassin can be run inside exim after the mail has been accepted, as shown
-<a href="http://bogmog.sourceforge.net/document_show.php3?doc_id=28">here</a>,
-but if you're not going to use my patch and you just want to run SA as an exim
-transport,
-<a href="http://dman13.dyndns.org/~dman/config_docs/exim-spamassassin/">this</a>
-version is recommended
-<P>
-Now, while this will work, we can do better, hence the reason for my code
-(just to make things clear, you do not want to run both my code, and dman's
-transports. It'd work, but you'd be scanning the message twice)
-<P>
-The reason why I wanted SpamAssassin in local scan is that I don't want to
-accept the damn spam in the first place.
-
-<ul>
-<li>While my code lets you do that, I don't like to send mails to the bit
- bucket, so you need to bounce them.
-<li>Once you accept the spam, you can't bounce it half the time, or you
- bounce it to an innocent whose Email was forged as an envelope sender
- (some spam even forges the bounce address to <em>you</em>)
-<li>If I refuse spam at SMTP time, it will remove the spam addresses from at
- least a few lists (they gotta clean their lists eventually otherwise they'd
- spend more time Emailing dead addresses than good ones)
-<li>I have the option of toying with spammers and stall their connections and
- waste their resources (see the following page for details on
- <A HREF="http://www.iks-jena.de/mitarb/lutz/usenet/teergrube.en.html">
- teergrubing</A>
-</ul>
-
-Note that you can also use this code to simply run SA on all your mails (or
-portion thereof as configured with SAEximRunCond) without having to configure SA
-in your exim.conf. In other words, this code can be configured to not reject
-any mails.
-
-<BR><BR>
-<h3>SpamAssassin? What's that?</h3>
-Ah, you need to visit <a href="http://spamassassin.org/">this page</a> first
-then
-
-
-<BR><BR>
-<h3>How does it work, what knobs are there?</h3>
-You need to configure spamassassin to flags mails as spam after a certain
-threshold (7 for instance). After that, this code can be configured to
-
-<ul>
-<li>Pretend to be processing the Email and send continuation lines to the
- remote server until it gives up (aka
- <A HREF="http://www.iks-jena.de/mitarb/lutz/usenet/teergrube.en.html">
- teergrubing</A>)
-<li>Accept but not deliver mail with a high threshold (i.e. devnull the mail)
-<li>Reject mail with a lower threshold
-<li>Temporarily reject mail with a still lower threshold (you can then inspect
- your logs to decide if you want to tweak SA so that next time the mail
- is sent, you can receive it)
-<li>In all 5 cases, mail can be optionally saved to disk so that you can
- inspect all the mails you've rejected or /dev/nulled
-</ul>
-
-You can also (and probably should <img src="/gifs/people/smile.happy.gif" alt=":-)" align=TOP WIDTH=16 HEIGHT=16>) use the new greylisting support for even
-better spam control
-
-
-<P>
-For more details, you should look at the self-documented
-<a href="files/sa-exim.conf">config file</a> and you can see
-<a href="sa-exim.demo.txt">some sample rejects and what you get in the logs</a>
-
-
-<BR><BR>
-<h3><A NAME="greylisting">Greylisting you say?</A></h3>
-While when sa-exim first came out, its strongest point was being one of the
-first programs (if not the first) that let you reject Spam at SMTP time, its
-coolest feature now is adaptive greylisting support<BR>
-In a nutshell, you get the advantages of greylisting without the disadvantages:
-<ul>
-<li>mails with a low spam score are accepted without delay
-<li>mails with an average spam score are greylisted,
- <b>and only those are delayed</b>
-<li>mails with high spam scores are rejected regardless (no greylisting)
-</ul>
-
-This method is the best combination I've seen out there so far, and
-while I've been talking about it for a while, I don't yet know of other
-programs that implement this method (if you do, please let me know so that
-I can acknowledge them)
-<BR>
-For more details on how this works, check out the <a href="files/sa-exim-cvs/README.greylisting">greylisting README</a>
-
-
-<BR><BR>
-<h3>Ok, where's the code? / Downloads</h3>
-<ul>
-<li>The latest version is here (<a href="files/sa-exim-current/">browsable tree</a> or <a href="files/sa-exim-current.tar.gz">tar.gz</a>). You can also
-get it from <A href="http://sourceforge.net/projects/sa-exim/">sf.net</a><BR>
-<li>The CVS version is here (<a href="files/sa-exim-cvs/">browsable tree</a>)
-and you can also get the CVS tree from
-<A HREF="http://sourceforge.net/cvs/?group_id=56124">sf.net</A>
-<li>The latest config file with documentation is
-<a href="files/sa-exim.conf">here</a>
-<li>Debian packages (source and binary) are <a href="files/debian/">here</a>
-</ul>
-<P>
-
-As explained in the archive, you can either copy <tt>sa-exim.c</tt> over exim's
-<tt>src/local_scan.c</tt> You need to copy local_scan in src in the exim source
-tree and rebuild it, or you can build sa-exim as a loadable module (you need
-to patch exim to support loadable modules though)
-<P>
-You can also browse all my exim files <A HREF="files/">here</A>
-
-<BR><BR>
-<h3>Mailing list</h3>
-You should probably subscribe to this low traffic
-<a href="http://lists.merlins.org/lists/listinfo/sa-exim">mailing list</a> if
-you download the code to keep apprised of bug fixes and enhancements
-
-<BR><BR>
-<h3>Integration with Exim 4</h3>
-This code works without anything in the exim conf, but you probably want to use
-some knobs to disable scanning for some users (like setting
-<tt>X-SA-Do-Not-Rej</tt> or <tt>X-SA-Do-Not-Run</tt> in the rcpt ACL and
-removing those headers in the right places).<BR>
-See <A HREF="http://marc.merlins.org/linux/exim/#conf">my exim4 conf tree</a>
-and more specifically the
-<A HREF="http://marc.merlins.org/linux/exim/exim4-conf/exim4.conf">exim4.conf</A>
-file
-<P>
-You can look at the <A HREF="files/sa-exim-cvs/README">README</A> for more
-integration details.
-
-
-<BR><BR>
-<h3>Changelog/Download</h3>
-
-<Changelog>
-</Changelog>
-
-<P>
-More generally, all the files can also be found <A HREF="files/">here</A>
-<P>
-<A HREF="/perso/contact.html">Feedback is appreciated</A> (but please
-prefer the use of the
-<a href="http://lists.merlins.org/lists/listinfo/sa-exim">sa-exim list</a>)
-
-<BR><BR>
-<h3>Acknowledgements</h3>
-
-<Acknowledgements>
-</Acknowledgements>
-
-
-<P ALIGN="center">
-<img src="/gifs/lines/misc/lampline.gif" alt="" WIDTH=720 HEIGHT=14>
-</P>
-<br>
-<img src="/gifs/misc/wizard.gif" alt="" align="middle" WIDTH=72 HEIGHT=61>
-<img src="/gifs/linux/damn-powered.gif" alt="" align="right" WIDTH=170 HEIGHT=29>
-<IMG SRC="/gifs/icons/msfree.gif" ALT="[ms free site]" ALIGN="right" WIDTH=95 HEIGHT=31>
-<a href="http://sourceforge.net"><img src="http://sourceforge.net/sflogo.php?group_id=56124&amp;type=1" width="88" height="31" border="0" align="right" alt="SourceForge.net Logo"></a>
-<A HREF="/perso/contact.html">Email</A><BR>
-<A HREF="/">Link to Home Page</A>
-<P>
-</body>
-</html>
Index: branches/experimental/accept.c
===================================================================
--- branches/experimental/accept.c (revision 29)
+++ branches/experimental/accept.c (nonexistent)
@@ -1,45 +0,0 @@
-/*************************************************
-* Exim - an Internet mail transport agent *
-*************************************************/
-
-/* Copyright (c) University of Cambridge 1995 - 2002 */
-/* See the file NOTICE for conditions of use and distribution. */
-
-
-#include "local_scan.h"
-
-/*
- * This is a basic version of local_scan that always accepts the messge.
- * It is like the template provided by Philip Hazel, except it is
- * intended to be compiled as a .so and loaded dynamically by the "real"
- * local_scan.
- */
-
-int local_scan_version_major(void)
-{
- return LOCAL_SCAN_ABI_VERSION_MAJOR;
-}
-
-int local_scan_version_minor(void)
-{
- return LOCAL_SCAN_ABI_VERSION_MINOR;
-}
-
-int local_scan_version( void )
-{
- return 1;
-}
-
-
-int local_scan(int fd, uschar **return_text)
-{
- /* Keep pedantic compilers happy */
- fd = fd;
- return_text = return_text;
-
- log_write(0, LOG_MAIN, "Message accepted by dynamically loaded dummy local_scan");
- return LOCAL_SCAN_ACCEPT;
-}
-
-
-/* End of local_scan.c */
Index: branches/experimental/LICENSE
===================================================================
--- branches/experimental/LICENSE (revision 29)
+++ branches/experimental/LICENSE (nonexistent)
@@ -1 +0,0 @@
-GPL version 2.0 ('nuff said :-D)
Index: branches/experimental/debian/config
===================================================================
--- branches/experimental/debian/config (revision 29)
+++ branches/experimental/debian/config (nonexistent)
@@ -1,5 +0,0 @@
-#!/bin/sh -e
-
-. /usr/share/debconf/confmodule
-
-exit 0
Index: branches/experimental/debian/watch
===================================================================
--- branches/experimental/debian/watch (revision 29)
+++ branches/experimental/debian/watch (nonexistent)
@@ -1,3 +0,0 @@
-version=3
-
-http://marc.merlins.org/linux/exim/sa.html files/sa-exim-(\d+(?:\.\d+)*)\.tar\.gz
Index: branches/experimental/debian/copyright
===================================================================
--- branches/experimental/debian/copyright (revision 29)
+++ branches/experimental/debian/copyright (nonexistent)
@@ -1,33 +0,0 @@
-This package was adopted by the current Debian maintainer,
-Magnus Holmgren <magnus@debian.org>, on Fri, 1 Dec 2006 19:05:58 +0100.
-
-Before that, it was maintained by Sander Smeenk <ssmeenk@debian.org>, who
-adopted it on Tue, 24 Feb 2004 19:47:11 +0100.
-
-The package was originally debianized by Andreas Metzler
-<ametzler@debian.org> on Thu, 13 Mar 2003 17:16:46 +0100.
-
-Upstream Author: Marc MERLIN <marc_soft@merlins.org>
-
-It was downloaded from http://marc.merlins.org/linux/exim/sa.html
-
-
-Copyright:
-
- This package is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; version 2 dated June, 1991.
-
- This package is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this package; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- 02110-1301, USA
-
-On Debian systems, the complete text of the GNU General
-Public License can be found in `/usr/share/common-licenses/GPL'.
-
Index: branches/experimental/debian/NEWS
===================================================================
--- branches/experimental/debian/NEWS (revision 29)
+++ branches/experimental/debian/NEWS (nonexistent)
@@ -1,18 +0,0 @@
-sa-exim (4.2.1-8) unstable; urgency=medium
-
- * Since version 4.67-1, exim4 only exports those symbols that are part
- of the official local_scan API. Unfortunately, sa-exim has all along
- cheated and declared some "extern" variables by itself, something that
- no longer works. For one of these, body_linecount, no workaround is
- currently possible, meaning that it will not be updated if the message
- body is rewritten (by way of SpamAssassin's report_safe together with
- SARewriteBody: 1 in sa-exim.conf. This means that if you use
- $body_linecount or $message_linecount in string expansions in your
- Exim configuration, they will refer to the line count before rewriting
- the message body.
-
- This change will hopefully be restored soon, either by extending the
- local_scan API or by making Exim count the lines.
-
- -- Magnus Holmgren <magnus@kibibyte.se> Thu, 26 Apr 2007 16:22:49 +0200
-
Index: branches/experimental/debian/po/ja.po
===================================================================
--- branches/experimental/debian/po/ja.po (revision 29)
+++ branches/experimental/debian/po/ja.po (nonexistent)
@@ -1,57 +0,0 @@
-#
-# Translators, if you are not familiar with the PO format, gettext
-# documentation is worth reading, especially sections dedicated to
-# this format, e.g. by running:
-# info -n '(gettext)PO Files'
-# info -n '(gettext)Header Entry'
-#
-# Some information specific to po-debconf are available at
-# /usr/share/doc/po-debconf/README-trans
-# or http://www.debian.org/intl/l10n/po-debconf/README-trans
-#
-# Developers do not need to manually edit POT or PO files.
-#
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: sa-exim 4.0-2\n"
-"Report-Msgid-Bugs-To: magnus@kibibyte.se\n"
-"POT-Creation-Date: 2006-12-02 20:15+0100\n"
-"PO-Revision-Date: 2004-08-19 15:21+0900\n"
-"Last-Translator: Hideki Yamane <henrich@samba.gr.jp>\n"
-"Language-Team: Japanese <debian-japanese@lists.debian.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=EUC-JP\n"
-"Content-Transfer-Encoding: 8bit\n"
-
-#. Type: boolean
-#. Description
-#: ../templates:1001
-msgid "Remove saved mails in spool directory?"
-msgstr "¥¹¥×¡¼¥ë¥Ç¥£¥ì¥¯¥È¥ê¤ËÊݸ¤·¤¿¥á¡¼¥ë¤òºï½ü¤·¤Þ¤¹¤«?"
-
-#. Type: boolean
-#. Description
-#: ../templates:1001
-msgid ""
-"There are some saved mails in subdirectories of /var/spool/sa-exim. "
-"Depending on the configuration sa-exim will save mails matching specific "
-"criterias (an error occured, rejected as spam, passed through although "
-"recognized as spam, ...) in subdirectories of /var/spool/sa-exim."
-msgstr ""
-"/var/spool/sa-exim ¤Î²¼¤ËÊݸ¤µ¤ì¤¿¥á¡¼¥ë¤¬¤¢¤ê¤Þ¤¹¡£sa-exim ¤ÎÀßÄê¤Ë¤è¤Ã¤Æ¡¢"
-"sa-exim ¤ÏÆÃÄê¤Î¹àÌÜ (¥¨¥é¡¼¤¬µ¯¤­¤¿¡¢spam¤È¤·¤ÆµñÈݤµ¤ì¤¿¡¢spam ¤Èǧ¼±¤µ¤ì¤¿"
-"¤Ë¤â´Ø¤ï¤é¤ºÄ̤êÈ´¤±¤¿¡¢¤Ê¤É...) ¤Ë¥Þ¥Ã¥Á¤·¤¿¥á¡¼¥ë¤ò /var/spool/sa-exim ¤Î²¼"
-"¤ËÊݸ¤·¤Þ¤¹¡£"
-
-#. Type: boolean
-#. Description
-#: ../templates:1001
-msgid ""
-"You can keep them for further analysis and later remove them manually or "
-"decide to delete them now."
-msgstr ""
-"ʬÀϤΤ¿¤á¤Ë»Ä¤·¤Æ¸å¤Ë¼êÆ°¤Çºï½ü¤¹¤ë¤«¡¢º£¤¹¤°ºï½ü¤¹¤ë¤«¤ò·è¤á¤é¤ì¤Þ¤¹¡£"
-
-#~ msgid "Should they be removed?"
-#~ msgstr "ºï½ü¤·¤Þ¤¹¤«?"
Index: branches/experimental/debian/po/it.po
===================================================================
--- branches/experimental/debian/po/it.po (revision 29)
+++ branches/experimental/debian/po/it.po (nonexistent)
@@ -1,47 +0,0 @@
-# Italian (it) translation of debconf templates for sa-exim
-# Copyright (C) 2007 Free Software Foundation, Inc.
-# This file is distributed under the same license as the sa-exim package.
-# Luca Monducci <luca.mo@tiscali.it>, 2007.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: sa-exim 4.2.1 italian debconf templates\n"
-"Report-Msgid-Bugs-To: magnus@kibibyte.se\n"
-"POT-Creation-Date: 2006-12-02 20:15+0100\n"
-"PO-Revision-Date: 2007-02-18 16:41+0100\n"
-"Last-Translator: Luca Monducci <luca.mo@tiscali.it>\n"
-"Language-Team: Italian <tp@lists.linux.it>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=ISO-8859-1\n"
-"Content-Transfer-Encoding: 8bit\n"
-
-#. Type: boolean
-#. Description
-#: ../templates:1001
-msgid "Remove saved mails in spool directory?"
-msgstr "Eliminare le mail salvate nella directory di spool?"
-
-#. Type: boolean
-#. Description
-#: ../templates:1001
-msgid ""
-"There are some saved mails in subdirectories of /var/spool/sa-exim. "
-"Depending on the configuration sa-exim will save mails matching specific "
-"criterias (an error occured, rejected as spam, passed through although "
-"recognized as spam, ...) in subdirectories of /var/spool/sa-exim."
-msgstr ""
-"Nelle sottodirectory di /var/spool/sa.exim sono state salvate delle mail. A "
-"seconda della configurazione di sa-exim le mail vengono salvate se verificano "
-"determinati criteri (si è verificato un errore, rifiutata per spam, passata "
-"nonostante identificata come spam, ecc.) nelle sottodirectory di /var/spool/"
-"sa-exim."
-
-#. Type: boolean
-#. Description
-#: ../templates:1001
-msgid ""
-"You can keep them for further analysis and later remove them manually or "
-"decide to delete them now."
-msgstr ""
-"Si possono tenere per una successiva analisi e poi eliminarle manualmente "
-"oppure cancellarle adesso."
Index: branches/experimental/debian/po/POTFILES.in
===================================================================
--- branches/experimental/debian/po/POTFILES.in (revision 29)
+++ branches/experimental/debian/po/POTFILES.in (nonexistent)
@@ -1 +0,0 @@
-[type: gettext/rfc822deb] templates
Index: branches/experimental/debian/po/vi.po
===================================================================
--- branches/experimental/debian/po/vi.po (revision 29)
+++ branches/experimental/debian/po/vi.po (nonexistent)
@@ -1,50 +0,0 @@
-# Vietnamese translation for sa-exim.
-# Copyright © 2005 Free Software Foundation, Inc.
-# Clytie Siddall <clytie@riverland.net.au>, 2005.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: sa-exim 4.2-2\n"
-"Report-Msgid-Bugs-To: magnus@kibibyte.se\n"
-"POT-Creation-Date: 2006-12-02 20:15+0100\n"
-"PO-Revision-Date: 2005-07-12 15:07+0930\n"
-"Last-Translator: Clytie Siddall <clytie@riverland.net.au>\n"
-"Language-Team: Vietnamese <gnomevi-list@lists.sourceforge.net>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=utf-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=1; plural=0\n"
-"X-Generator: LocFactoryEditor 1.2.2\n"
-
-#. Type: boolean
-#. Description
-#: ../templates:1001
-msgid "Remove saved mails in spool directory?"
-msgstr "Loại bỏ các thư đã lưu trong thư mục ống chỉ không?"
-
-#. Type: boolean
-#. Description
-#: ../templates:1001
-msgid ""
-"There are some saved mails in subdirectories of /var/spool/sa-exim. "
-"Depending on the configuration sa-exim will save mails matching specific "
-"criterias (an error occured, rejected as spam, passed through although "
-"recognized as spam, ...) in subdirectories of /var/spool/sa-exim."
-msgstr ""
-"Có một số thư đã lưu trong thư mục con của «/var/spool/sa-exim». Phụ thuộc "
-"vào cấu hình, trình sa-exim sẽ lưu thư khớp với tiêu chuẩn dứt khoát (gặp "
-"lỗi, thư bị từ chối vì rác, thư qua được dù phân loại là rác v.v.) vào thư "
-"mục con của «/var/spool/sa-exim»."
-
-#. Type: boolean
-#. Description
-#: ../templates:1001
-msgid ""
-"You can keep them for further analysis and later remove them manually or "
-"decide to delete them now."
-msgstr ""
-"Bạn có thể giữ các thư ấy để phân tích thêm nữa rồi sau đó tự loại bỏ chúng, "
-"hoặc quyết định xóa bỏ chúng ngay bây giờ."
-
-#~ msgid "Should they be removed?"
-#~ msgstr "Bạn có muốn loại bỏ các lưu ấy không?"
Index: branches/experimental/debian/po/gl.po
===================================================================
--- branches/experimental/debian/po/gl.po (revision 29)
+++ branches/experimental/debian/po/gl.po (nonexistent)
@@ -1,45 +0,0 @@
-# Galician translation of sa-exim's debconf templates
-# This file is distributed under the same license as the sa-exim package.
-# Jacobo Tarrio <jtarrio@debian.org>, 2007.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: sa-exim\n"
-"Report-Msgid-Bugs-To: magnus@kibibyte.se\n"
-"POT-Creation-Date: 2006-12-02 20:15+0100\n"
-"PO-Revision-Date: 2007-02-28 10:34+0100\n"
-"Last-Translator: Jacobo Tarrio <jtarrio@debian.org>\n"
-"Language-Team: Galician <proxecto@trasno.net>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-
-#. Type: boolean
-#. Description
-#: ../templates:1001
-msgid "Remove saved mails in spool directory?"
-msgstr "¿Borrar as mensaxes gravadas do directorio de traballo?"
-
-#. Type: boolean
-#. Description
-#: ../templates:1001
-msgid ""
-"There are some saved mails in subdirectories of /var/spool/sa-exim. "
-"Depending on the configuration sa-exim will save mails matching specific "
-"criterias (an error occured, rejected as spam, passed through although "
-"recognized as spam, ...) in subdirectories of /var/spool/sa-exim."
-msgstr ""
-"Hai algunhas mensaxes gravadas nos subdirectorios de /var/spool/sa-exim. "
-"Dependendo da configuración, sa-exim ha gravar as mensaxes que encaixen en "
-"determinados criterios (houbo un erro, rexeitada coma spam, pasada aínda que "
-"se recoñeceu coma spam, ...) en subdirectorios de /var/spool/sa-exim."
-
-#. Type: boolean
-#. Description
-#: ../templates:1001
-msgid ""
-"You can keep them for further analysis and later remove them manually or "
-"decide to delete them now."
-msgstr ""
-"Pode conservalas para seguir analizándoas e eliminalas despois manualmente "
-"ou decidir eliminalas agora."
Index: branches/experimental/debian/po/templates.pot
===================================================================
--- branches/experimental/debian/po/templates.pot (revision 29)
+++ branches/experimental/debian/po/templates.pot (nonexistent)
@@ -1,41 +0,0 @@
-# SOME DESCRIPTIVE TITLE.
-# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
-# This file is distributed under the same license as the PACKAGE package.
-# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
-#
-#, fuzzy
-msgid ""
-msgstr ""
-"Project-Id-Version: PACKAGE VERSION\n"
-"Report-Msgid-Bugs-To: magnus@kibibyte.se\n"
-"POT-Creation-Date: 2006-12-02 20:15+0100\n"
-"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Language-Team: LANGUAGE <LL@li.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=CHARSET\n"
-"Content-Transfer-Encoding: 8bit\n"
-
-#. Type: boolean
-#. Description
-#: ../templates:1001
-msgid "Remove saved mails in spool directory?"
-msgstr ""
-
-#. Type: boolean
-#. Description
-#: ../templates:1001
-msgid ""
-"There are some saved mails in subdirectories of /var/spool/sa-exim. "
-"Depending on the configuration sa-exim will save mails matching specific "
-"criterias (an error occured, rejected as spam, passed through although "
-"recognized as spam, ...) in subdirectories of /var/spool/sa-exim."
-msgstr ""
-
-#. Type: boolean
-#. Description
-#: ../templates:1001
-msgid ""
-"You can keep them for further analysis and later remove them manually or "
-"decide to delete them now."
-msgstr ""
Index: branches/experimental/debian/po/pt.po
===================================================================
--- branches/experimental/debian/po/pt.po (revision 29)
+++ branches/experimental/debian/po/pt.po (nonexistent)
@@ -1,46 +0,0 @@
-# Portuguese translation for sa-exim debconf messages.
-# Copyright (C) 2007 Pedro Ribeiro <p.m42.ribeiro@gmail.com>
-# This file is distributed under the same license as the sa-exim package.
-# Pedro Ribeiro <p.m42.ribeiro@gmail.com>, 2007
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: sa-exim 4.2.1-5\n"
-"Report-Msgid-Bugs-To: magnus@kibibyte.se\n"
-"POT-Creation-Date: 2006-12-02 20:15+0100\n"
-"PO-Revision-Date: 2007-03-19 22:08+0100\n"
-"Last-Translator: Pedro Ribeiro <p.m42.ribeiro@gmail.com>\n"
-"Language-Team: Portuguese <traduz@debianpt.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=utf-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-
-#. Type: boolean
-#. Description
-#: ../templates:1001
-msgid "Remove saved mails in spool directory?"
-msgstr "Remover os mails guardados no directório de spool?"
-
-#. Type: boolean
-#. Description
-#: ../templates:1001
-msgid ""
-"There are some saved mails in subdirectories of /var/spool/sa-exim. "
-"Depending on the configuration sa-exim will save mails matching specific "
-"criterias (an error occured, rejected as spam, passed through although "
-"recognized as spam, ...) in subdirectories of /var/spool/sa-exim."
-msgstr ""
-"Existem alguns mails guardados em sub-directórios de /var/spool/sa-exim. "
-"Dependendo da configuração, o sa-exim guarda os mails que obedecem a certos "
-"critérios (ocorreu um erro, rejeitada como spam, aceite mas marcada como "
-"spam, ...) em sub-directórios de /var/spool/sa-exim."
-
-#. Type: boolean
-#. Description
-#: ../templates:1001
-msgid ""
-"You can keep them for further analysis and later remove them manually or "
-"decide to delete them now."
-msgstr ""
-"Pode mantê-las para análise posterior e removê-las mais tarde manualmente ou "
-"apagá-las agora."
Index: branches/experimental/debian/po/da.po
===================================================================
--- branches/experimental/debian/po/da.po (revision 29)
+++ branches/experimental/debian/po/da.po (nonexistent)
@@ -1,60 +0,0 @@
-# translation of sa-exim_3.1-4-da.po to Danish
-# translation of sa-exim_3.1-4_templates.po to Danish
-#
-# Translators, if you are not familiar with the PO format, gettext
-# documentation is worth reading, especially sections dedicated to
-# this format, e.g. by running:
-# info -n '(gettext)PO Files'
-# info -n '(gettext)Header Entry'
-# Some information specific to po-debconf are available at
-# /usr/share/doc/po-debconf/README-trans
-# or http://www.debian.org/intl/l10n/po-debconf/README-trans#
-# Developers do not need to manually edit POT or PO files.
-# Claus Hindsgaul <claus_h@image.dk>, 2004.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: sa-exim_3.1-4-da\n"
-"Report-Msgid-Bugs-To: magnus@kibibyte.se\n"
-"POT-Creation-Date: 2006-12-02 20:15+0100\n"
-"PO-Revision-Date: 2004-11-19 17:21+0100\n"
-"Last-Translator: Claus Hindsgaul <claus_h@image.dk>\n"
-"Language-Team: Danish <dansk@klid.dk>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=ISO-8859-1\n"
-"Content-Transfer-Encoding: 8bit\n"
-"X-Generator: KBabel 1.9.1\n"
-"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-
-#. Type: boolean
-#. Description
-#: ../templates:1001
-msgid "Remove saved mails in spool directory?"
-msgstr "Fjern gemte breve fra spool-mappen?"
-
-#. Type: boolean
-#. Description
-#: ../templates:1001
-msgid ""
-"There are some saved mails in subdirectories of /var/spool/sa-exim. "
-"Depending on the configuration sa-exim will save mails matching specific "
-"criterias (an error occured, rejected as spam, passed through although "
-"recognized as spam, ...) in subdirectories of /var/spool/sa-exim."
-msgstr ""
-"Der er nogle gemte breve i mapperne under /var/spool/sa-exim. Afhængig af "
-"opsætningen vil sa-exim gemme breve, der opfylder bestemte kriterier (der "
-"opstod en fejl, afvist som spam, lod brevet passere på trods af at det blev "
-"genkendt som spam,...) gemme breve i mapperne under /var/spool/sa-exim."
-
-#. Type: boolean
-#. Description
-#: ../templates:1001
-msgid ""
-"You can keep them for further analysis and later remove them manually or "
-"decide to delete them now."
-msgstr ""
-"Du kan beholde dem til yderligere efterforskning og selv fjerne dem senere "
-"eller vælge at få dem slettet nu."
-
-#~ msgid "Should they be removed?"
-#~ msgstr "Skal de slettes?"
Index: branches/experimental/debian/po/cs.po
===================================================================
--- branches/experimental/debian/po/cs.po (revision 29)
+++ branches/experimental/debian/po/cs.po (nonexistent)
@@ -1,57 +0,0 @@
-#
-# Translators, if you are not familiar with the PO format, gettext
-# documentation is worth reading, especially sections dedicated to
-# this format, e.g. by running:
-# info -n '(gettext)PO Files'
-# info -n '(gettext)Header Entry'
-#
-# Some information specific to po-debconf are available at
-# /usr/share/doc/po-debconf/README-trans
-# or http://www.debian.org/intl/l10n/po-debconf/README-trans
-#
-# Developers do not need to manually edit POT or PO files.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: sa-exim\n"
-"Report-Msgid-Bugs-To: magnus@kibibyte.se\n"
-"POT-Creation-Date: 2006-12-02 20:15+0100\n"
-"PO-Revision-Date: 2005-06-27 20:12+0200\n"
-"Last-Translator: Miroslav Kure <kurem@debian.cz>\n"
-"Language-Team: Czech <debian-l10n-czech@lists.debian.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-
-#. Type: boolean
-#. Description
-#: ../templates:1001
-msgid "Remove saved mails in spool directory?"
-msgstr "Odstranit emaily v adresáři spool?"
-
-#. Type: boolean
-#. Description
-#: ../templates:1001
-msgid ""
-"There are some saved mails in subdirectories of /var/spool/sa-exim. "
-"Depending on the configuration sa-exim will save mails matching specific "
-"criterias (an error occured, rejected as spam, passed through although "
-"recognized as spam, ...) in subdirectories of /var/spool/sa-exim."
-msgstr ""
-"V podadresářích adresáře /var/spool/sa-exim se nachází nějaké uložené "
-"emaily. Podle nastavení může sa-exim ukládat do těchto adresářů emaily, "
-"které se shodují s danými kritérii (výskyt chyby, odmítnuto jako spam, "
-"předáno dále, přestože vypadá jako spam, ...)."
-
-#. Type: boolean
-#. Description
-#: ../templates:1001
-msgid ""
-"You can keep them for further analysis and later remove them manually or "
-"decide to delete them now."
-msgstr ""
-"Emaily si můžete ponechat pro budoucí analýzu a poté je smazat ručně, nebo "
-"je můžete smazat přímo teď."
-
-#~ msgid "Should they be removed?"
-#~ msgstr "Mají se odstranit?"
Index: branches/experimental/debian/po/es.po
===================================================================
--- branches/experimental/debian/po/es.po (revision 29)
+++ branches/experimental/debian/po/es.po (nonexistent)
@@ -1,63 +0,0 @@
-# sa-exim po-debconf translation to spanish
-# Copyright (C) 2004 Software in the Public Interest
-# This file is distributed under the same license as the sa-exim package.
-#
-# Changes:
-# - Initial translation
-# Rudy Godoy <rudy@kernel-panik.org>, 2006
-#
-#
-# Traductores, si no conoce el formato PO, merece la pena leer la
-# documentación de gettext, especialmente las secciones dedicadas a este
-# formato, por ejemplo ejecutando:
-# info -n '(gettext)PO Files'
-# info -n '(gettext)Header Entry'
-#
-# Equipo de traducción al español, por favor lean antes de traducir
-# los siguientes documentos:
-#
-# - El proyecto de traducción de Debian al español
-# http://www.debian.org/intl/spanish/coordinacion
-# especialmente las notas de traducción en
-# http://www.debian.org/intl/spanish/notas
-#
-# - La guía de traducción de po's de debconf:
-# /usr/share/doc/po-debconf/README-trans
-# o http://www.debian.org/intl/l10n/po-debconf/README-trans
-#
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: sa-exim 4.2.1\n"
-"Report-Msgid-Bugs-To: magnus@kibibyte.se\n"
-"POT-Creation-Date: 2006-12-02 20:15+0100\n"
-"PO-Revision-Date: 2006-12-25 11:42-0500\n"
-"Last-Translator: Rudy Godoy <rudy@kernel-panik.org>\n"
-"Language-Team: Debian l10n Spanish <debian-l10n-spanish@lists.debian.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=utf-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-
-#. Type: boolean
-#. Description
-#: ../templates:1001
-msgid "Remove saved mails in spool directory?"
-msgstr "¿Desea eliminar los correos guardados en el directorio «spool»?"
-
-#. Type: boolean
-#. Description
-#: ../templates:1001
-msgid ""
-"There are some saved mails in subdirectories of /var/spool/sa-exim. "
-"Depending on the configuration sa-exim will save mails matching specific "
-"criterias (an error occured, rejected as spam, passed through although "
-"recognized as spam, ...) in subdirectories of /var/spool/sa-exim."
-msgstr "Existen algunos correos guardados en subdirectorios de «/var/spool/sa-exim». Dependiendo de la configuración, sa-exim guardará los correos que cumplan con un criterio específico (si ha ocurrido un fallo, rechazado como spam, aceptado aunque se ha reconocido como spam, ...) en los subdirectorios de «/var/spool/sa-exim»."
-
-#. Type: boolean
-#. Description
-#: ../templates:1001
-msgid ""
-"You can keep them for further analysis and later remove them manually or "
-"decide to delete them now."
-msgstr "Puede conservarlos para un análisis posterior, y eliminarlos de forma manual más tarde, o decidir eliminarlos ahora."
Index: branches/experimental/debian/po/fr.po
===================================================================
--- branches/experimental/debian/po/fr.po (revision 29)
+++ branches/experimental/debian/po/fr.po (nonexistent)
@@ -1,58 +0,0 @@
-#
-# Translators, if you are not familiar with the PO format, gettext
-# documentation is worth reading, especially sections dedicated to
-# this format, e.g. by running:
-# info -n '(gettext)PO Files'
-# info -n '(gettext)Header Entry'
-#
-# Some information specific to po-debconf are available at
-# /usr/share/doc/po-debconf/README-trans
-# or http://www.debian.org/intl/l10n/po-debconf/README-trans
-#
-# Developers do not need to manually edit POT or PO files.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: sa-exim\n"
-"Report-Msgid-Bugs-To: magnus@kibibyte.se\n"
-"POT-Creation-Date: 2006-12-02 20:15+0100\n"
-"PO-Revision-Date: 2004-08-17 11:00+0200\n"
-"Last-Translator: Eric Madesclair <eric-m@wanadoo.fr>\n"
-"Language-Team: French <debian-l10n-french@lists.debian.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=ISO-8859-1\n"
-"Content-Transfer-Encoding: 8bit\n"
-
-#. Type: boolean
-#. Description
-#: ../templates:1001
-msgid "Remove saved mails in spool directory?"
-msgstr "Faut-il supprimer les courriers du répertoire de dépôt ? "
-
-#. Type: boolean
-#. Description
-#: ../templates:1001
-msgid ""
-"There are some saved mails in subdirectories of /var/spool/sa-exim. "
-"Depending on the configuration sa-exim will save mails matching specific "
-"criterias (an error occured, rejected as spam, passed through although "
-"recognized as spam, ...) in subdirectories of /var/spool/sa-exim."
-msgstr ""
-"Il y a plusieurs courriers sauvegardés dans les sous-répertoires de /var/"
-"spool/sa-exim. Selon la configuration, sa-exim sauvegarde les courriers qui "
-"correspondent à des critères spécifiques (p. ex. une erreur est survenue, "
-"rejeté comme spam, passé à travers, reconnu comme spam ...) dans des sous-"
-"répertoires de /var/spool/sa-exim."
-
-#. Type: boolean
-#. Description
-#: ../templates:1001
-msgid ""
-"You can keep them for further analysis and later remove them manually or "
-"decide to delete them now."
-msgstr ""
-"Vous pouvez les garder pour des analyses approfondies et les supprimer par "
-"la suite ou vous pouvez décider de les effacer maintenant."
-
-#~ msgid "Should they be removed?"
-#~ msgstr "Vous pouvez les supprimer maintenant."
Index: branches/experimental/debian/po/sv.po
===================================================================
--- branches/experimental/debian/po/sv.po (revision 29)
+++ branches/experimental/debian/po/sv.po (nonexistent)
@@ -1,56 +0,0 @@
-# Translators, if you are not familiar with the PO format, gettext
-# documentation is worth reading, especially sections dedicated to
-# this format, e.g. by running:
-# info -n '(gettext)PO Files'
-# info -n '(gettext)Header Entry'
-# Some information specific to po-debconf are available at
-# /usr/share/doc/po-debconf/README-trans
-# or http://www.debian.org/intl/l10n/po-debconf/README-trans
-# Developers do not need to manually edit POT or PO files.
-# , fuzzy
-#
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: sa-exim 4.2-2\n"
-"Report-Msgid-Bugs-To: magnus@kibibyte.se\n"
-"POT-Creation-Date: 2006-12-02 20:15+0100\n"
-"PO-Revision-Date: 2006-12-02 02:07+0100\n"
-"Last-Translator: Magnus Holmgren <magnus@kibibyte.se>\n"
-"Language-Team: Swedish <sv@li.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=iso-8859-1\n"
-"Content-Transfer-Encoding: 8bit\n"
-
-#. Type: boolean
-#. Description
-#: ../templates:1001
-msgid "Remove saved mails in spool directory?"
-msgstr "Ta bort sparad e-post i spool-mappen?"
-
-#. Type: boolean
-#. Description
-#: ../templates:1001
-msgid ""
-"There are some saved mails in subdirectories of /var/spool/sa-exim. "
-"Depending on the configuration sa-exim will save mails matching specific "
-"criterias (an error occured, rejected as spam, passed through although "
-"recognized as spam, ...) in subdirectories of /var/spool/sa-exim."
-msgstr ""
-"Det finns några sparade e-postmeddelanden i undermappar till /var/spool/sa-"
-"exim. Beroende på konfigurationen kan sa-exim spara e-post som matchar "
-"specifika kriterier (ett fel inträffade, avvisat som spam, genomsläppt trots "
-"spamklassat, ...) i undermappar till /var/spool/sa-exim."
-
-#. Type: boolean
-#. Description
-#: ../templates:1001
-msgid ""
-"You can keep them for further analysis and later remove them manually or "
-"decide to delete them now."
-msgstr ""
-"Du kan spara dom för vidare analys och senare ta bort dom manuellt eller "
-"välja att ta bort dom nu."
-
-#~ msgid "Should they be removed?"
-#~ msgstr "Ska de tas bort?"
Index: branches/experimental/debian/po/de.po
===================================================================
--- branches/experimental/debian/po/de.po (revision 29)
+++ branches/experimental/debian/po/de.po (nonexistent)
@@ -1,59 +0,0 @@
-# translation of po-debconf template to German
-#
-# Translators, if you are not familiar with the PO format, gettext
-# documentation is worth reading, especially sections dedicated to
-# this format, e.g. by running:
-# info -n '(gettext)PO Files'
-# info -n '(gettext)Header Entry'
-# Some information specific to po-debconf are available at
-# /usr/share/doc/po-debconf/README-trans
-# or http://www.debian.org/intl/l10n/po-debconf/README-trans#
-# Developers do not need to manually edit POT or PO files.
-#
-# Matthias Julius <mdeb@julius-net.net>, 2006.
-msgid ""
-msgstr ""
-"Project-Id-Version: sa-exim 4.2.1-2\n"
-"Report-Msgid-Bugs-To: magnus@kibibyte.se\n"
-"POT-Creation-Date: 2006-12-02 20:15+0100\n"
-"PO-Revision-Date: 2006-11-23 00:53-0500\n"
-"Last-Translator: Matthias Julius <mdeb@julius-net.net>\n"
-"Language-Team: German <debian-l10n-german@lists.debian.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"X-Generator: KBabel 1.11.4\n"
-
-#. Type: boolean
-#. Description
-#: ../templates:1001
-msgid "Remove saved mails in spool directory?"
-msgstr "Gespeicherte E-Mails in Spool-Verzeichnis löschen?"
-
-#. Type: boolean
-#. Description
-#: ../templates:1001
-msgid ""
-"There are some saved mails in subdirectories of /var/spool/sa-exim. "
-"Depending on the configuration sa-exim will save mails matching specific "
-"criterias (an error occured, rejected as spam, passed through although "
-"recognized as spam, ...) in subdirectories of /var/spool/sa-exim."
-msgstr ""
-"Es befinden sich einige gespeicherte E-Mails in Unterverzeichnissen von /var/"
-"spool/sa-exim. Abhängig von der Konfiguration wird sa-exim E-Mails, die "
-"bestimmte Kriterien erfüllen (ein Fehler ereignete sich, als Spam "
-"abgewiesen, durchgelassen obwohl als Spam erkannt, ...), in "
-"Unterverzeichnissen von /var/spool/sa-exim speichern."
-
-#. Type: boolean
-#. Description
-#: ../templates:1001
-msgid ""
-"You can keep them for further analysis and later remove them manually or "
-"decide to delete them now."
-msgstr ""
-"Sie können diese zur späteren Analyse aufbewahren und später löschen, oder "
-"Sie entscheiden, sie jetzt zu löschen."
-
-#~ msgid "Should they be removed?"
-#~ msgstr "Sollen die E-Mails gelöscht werden?"
Index: branches/experimental/debian/po/nl.po
===================================================================
--- branches/experimental/debian/po/nl.po (revision 29)
+++ branches/experimental/debian/po/nl.po (nonexistent)
@@ -1,35 +0,0 @@
-# SOME DESCRIPTIVE TITLE.
-# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
-# This file is distributed under the same license as the PACKAGE package.
-# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: sa-exim\n"
-"Report-Msgid-Bugs-To: magnus@kibibyte.se\n"
-"POT-Creation-Date: 2006-12-02 20:15+0100\n"
-"PO-Revision-Date: 2007-02-28 19:43+0100\n"
-"Last-Translator: Bart Cornelis <cobaco@skolelinux.no>\n"
-"Language-Team: debian-l10n-dutch <debian-l10n-dutch@lists.debian.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=utf-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-
-#. Type: boolean
-#. Description
-#: ../templates:1001
-msgid "Remove saved mails in spool directory?"
-msgstr "Wilt u dat opgeslagen e-mails verwijderd worden uit de spool-map?"
-
-#. Type: boolean
-#. Description
-#: ../templates:1001
-msgid "There are some saved mails in subdirectories of /var/spool/sa-exim. Depending on the configuration sa-exim will save mails matching specific criterias (an error occured, rejected as spam, passed through although recognized as spam, ...) in subdirectories of /var/spool/sa-exim."
-msgstr "Er zijn een aantal opgeslagen e-mails in de submappen van /var/spool/sa-exim. Afhankelijk van de configuratie slaat sa-exim e-mails die aan specifieke criteria voldoen (bv. fout opgetreden, geweigerd als spam, doorgelaten maar gemarkeerd als spam, ...) op in submappen van /var/spool/sa-exim ."
-
-#. Type: boolean
-#. Description
-#: ../templates:1001
-msgid "You can keep them for further analysis and later remove them manually or decide to delete them now."
-msgstr "U kunt deze behouden voor verdere analyse, en ze dan later handmatig verwijderen, of u kunt ze nu laten verwijderen."
-
Index: branches/experimental/debian/README.Debian
===================================================================
--- branches/experimental/debian/README.Debian (revision 29)
+++ branches/experimental/debian/README.Debian (nonexistent)
@@ -1,164 +0,0 @@
-********************************
-* SHOULD YOU USE THIS PACKAGE? *
-********************************
-
-Since version 4.50, Exim has the content-scanning extension formerly
-known as "exiscan" built-in. It has a number of advantages and
-disadvantages compared to SA-Exim.
-
-Advantages of built-in content-scanning interface:
-
- * One less configuration file to edit.
- * Spam control policy integrates better with Exim's ACL system.
- * It's possible to tell SA which user to scan for (the -u parameter of
- spamc). SA-Exim can't do that (yet).
- * Finer control over the mail header is possible, but not in a clean
- way (it involves putting all header fields you might possibly want
- to add in the report template, and using rather complicated
- expansion expressions to extract the wanted ones from
- $spam_report). At any rate, you can choose a prefix different from
- "X-Spam-".
-
-Advantages of SA-Exim:
-
- * It is possible to use the report_safe feature, which turns mail
- deemed to be spam into a message/rfc822 attachment of a report
- message. (Note however that if you do, then any X-SA-* fields added
- to help the greylisting module can't be removed.)
- * All the add_header and rewrite_header options in
- /etc/spamassassin/local.cf will be obeyed. In other words,
- everything will be *almost* as if you filtered the mail through
- spamassassin on the command line.
- * So-called teergrubing ("tarpitting") is possible in a way that
- isn't possible with exiscan (I'm not in any way saying that it
- works as a counterattack against spammers).
- * You can simply add the sa-exim package to a standard exim4
- installation and it should, in principle, instantly work (except
- you have to uncomment one line in sa-exim.conf).
-
-Both alternatives enable you to defer, greylist, reject, and blackhole
-mail, optionally saving copies, at configurable score levels.
-
-*****************
-* CONFIGURATION *
-*****************
-
-This version of the sa-exim package defaults to placing a configuration
-sniplet in /etc/exim4/conf.d/. Depending on what you have answered to the
-DebConf questions while configuring Exim4, the module will be loaded
-automatically, or human intervention is required.
-
-To find out what configuration file Exim4 is using, issue:
-
- $ exim4 -bV | tail -1
- Configuration file is /path/to/configfile
-
-If /path/to/configfile shows:
-
- - /etc/exim4/exim4.conf
- You are using the hand-crafted configuration file.
- See the 'HAND-CRAFTED' section below.
-
- - /var/lib/exim4/config.autogenerated
- You are using the debianized configuration scheme - with either
- 'split' or 'unsplit' configuration file.
- See the 'DEBIANIZED' section below.
-
-
-HAND-CRAFTED
-------------
-
-Use 'grep "local_scan_path" /etc/exim4/exim4.conf" to see if the sa-exim
-line is included in the configuration. If grep returns something, check
-if it matches the following line. If grep returns nothing, you have to
-manually add the following line to the exim4.conf file and restart exim4.
-
- local_scan_path = /usr/lib/exim4/local_scan/sa-exim.so
-
-Change or add the line above and manually restart exim4 by issuing
-'invoke-rc.d exim4 reload' or '/etc/init.d/exim4 reload' as root.
-
-
-DEBIANIZED
-----------
-
-Use 'grep "local_scan_path" /var/lib/exim4/config.autogenerated' to
-see if the sa-exim line is included in the configuration. If grep
-returns something, you're set and already using the sa-exim module. If
-grep returns nothing, we need to figure out a few things:
-
-Issue:
- $ grep "use_split_config" /etc/exim4/update-exim4.conf.conf
- dc_use_split_config='true'
-
-If your result shows 'false' where mine shows 'true', then you're
-using the unsplit configuration, generated from
-/etc/exim4/exim4.conf.template. If you haven't customized that file
-you could edit /etc/exim4/update-exim4.conf.conf by hand, change the
-'false' to 'true' and issue 'update-exim4.conf' as root. Then, check
-again if the sa-exim module line is included. It should. If it still
-isn't: mail me. If it is, restart exim4 by issuing 'invoke-rc.d exim4
-restart' or '/etc/init.d/exim4 restart' as root. If you *have*
-customized /etc/exim4/exim4.conf.template, then you'd better stick
-with the unsplit configuration scheme and add the local_scan_path
-setting by hand, like with the hand-crafted configuration file.
-
-Next, read all about greylisting and sa-exim:
-
-***************
-* GREYLISTING *
-***************
-Notes on greylisting with sa-exim.
-
-If you use SpamAssassin 3.0 or better, you do not need to patch it, you
-can just use the Greylisting module shipped with sa-exim.
-The only thing you need to do to enable it, is to copy the 4 lines below
-loadplugin in the greylisting README, and adjust the score if you wish (see
-README.Greylisting for details)
-
-
-If you use a version of SA older than 3.0 (if you are, you really,
-really should upgrade!), you will need to patch spamassassin's sources
-to support greylisting.
-
-There are two versions of the patches:
- - /usr/share/doc/sa-exim/patches/SA-greylisting-2.4x.diff
- This patch can be applied to versions 2.4x of SpamAssassin. Note
- that this patch is not fully functional anymore, it is just left as
- a template should you want to backport the current 2.6x patch.
- That said, you really ought to upgrade SA to 2.6x or 3.x
-
- - /usr/share/doc/sa-exim/patches/SA-greylisting-2.6.diff
- This patch can be applied to versions 2.6x of SpamAssassin.
-
-Please read README.Greylisting for more information on how to enable
-this feature, and what further changes are needed.
-Note that this configuration won't be supported in the future, and you
-are encouraged to upgrade to SA 3.0 or better.
-
-*************
-* BE WARNED *
-*************
-
-By applying these patches, you change the sourcecode of SpamAssassin
-(again, this is if you use a version of SpamAssassin earlier than 3.0)
-This also means that when the SpamAssassin package gets upgraded, the
-changes made by the patch are LOST.
-This *MIGHT* cause your mail setup to break. It might be best to put
-SpamAssassin on hold:
-
- $ echo "spamassassin hold" | dpkg --set-selections
-
-You can later set it to install again with:
-
- $ echo "spamassassin install" | dpkg --set-selections
-
-
-**********************************
-* NOTICE ABOUT SPAMC CONFIG FILE *
-**********************************
-
-Recent versions of spamc can read command-line parameters and switches
-from a configuration file called /etc/spamassassin/spamc.conf. If that
-file specifies conflicting options, it will prevent SA-Exim from
-working. For now, you'll have to make sure that it doesn't.
Index: branches/experimental/debian/control
===================================================================
--- branches/experimental/debian/control (revision 29)
+++ branches/experimental/debian/control (nonexistent)
@@ -1,27 +0,0 @@
-Source: sa-exim
-Section: mail
-Priority: optional
-Maintainer: Magnus Holmgren <magnus@kibibyte.se>
-Build-Depends: debhelper (>= 4.1.16), links, exim4-dev
-Standards-Version: 3.7.2
-
-Package: sa-exim
-Architecture: any
-Depends: exim4-daemon-light (>>4.30-1) | exim4-daemon-heavy (>>4.30-1) | exim4-daemon-custom (>>4.30-1), spamc, ${shlibs:Depends}, debconf (>= 1.2.0) | debconf-2.0
-Recommends: ${perl:Depends}
-Suggests: spamassassin
-Description: Use spamAssassin at SMTP time with the Exim v4 MTA
- SA-Exim lets you use spamAssassin at SMTP time with the Exim
- v4 MTA, which enables you to do many things with incoming Emails,
- including refusing them before they come in, or even teergrubing the
- sender (i.e. slowing him down, by tying his resources)
- .
- Homepage: http://marc.merlins.org/linux/exim/sa.html
- .
- Note: Most of the functionality of this package can also be achieved
- using the exiscan ACL conditions built into the "heavy" Exim daemon,
- exim-daemon-heavy. You should use this package if:
- .
- * you want to use SpamAssassin's report_safe feature, or
- * you want easier control over the header fields added, without using
- the report template to add multiple fields.
Index: branches/experimental/debian/compat
===================================================================
--- branches/experimental/debian/compat (revision 29)
+++ branches/experimental/debian/compat (nonexistent)
@@ -1 +0,0 @@
-4
Index: branches/experimental/debian/postinst
===================================================================
--- branches/experimental/debian/postinst (revision 29)
+++ branches/experimental/debian/postinst (nonexistent)
@@ -1,55 +0,0 @@
-#!/bin/sh
-set -e
-
-. /usr/share/debconf/confmodule
-
-LOCALSCANCONF=/etc/exim4/conf.d/main/15_sa-exim_plugin_path
-DISABLELOCALSCANTEXT='# sa-exim plugin is disabled, because it was uninstalled'
-DISABLELOCALSCANMD5=`echo "${DISABLELOCALSCANTEXT}" | md5sum | cut -d\ -f1`
-
-OLDCRONJOB=/etc/cron.hourly/greylistclean
-OLDCRONJOBREN=/etc/cron.hourly/.greylistclean.insecure.deleteme
-if test -f $OLDCRONJOB; then
- echo "disabling old insecure $OLDCRONJOB"
- echo "(renamed to $OLDCRONJOBREN)"
- echo "See new cronjob in /etc/cron.d/greylistclean"
- /bin/mv $OLDCRONJOB $OLDCRONJOBREN
-fi
-
-case "$1" in
- configure)
- if [ ! -e /var/spool/sa-exim ] ; then
- # Debian-exim should exist as we depend on exim4-base
- install -d -m771 -oDebian-exim -gDebian-exim \
- /var/spool/sa-exim
- elif [ -d /var/spool/sa-exim ]; then
- # Fix permissions
- chmod 771 /var/spool/sa-exim
- chown Debian-exim:Debian-exim /var/spool/sa-exim
- fi
- # Support for greylisting tuplets (written as nobody by spamd)
- if [ ! -e /var/spool/sa-exim/tuplets ] ; then
- install -d -m750 -onobody -gDebian-exim \
- /var/spool/sa-exim/tuplets
- elif [ -d /var/spool/sa-exim/tuplets ]; then
- # Fix permissions
- chmod 771 /var/spool/sa-exim/tuplets
- chown nobody:Debian-exim /var/spool/sa-exim/tuplets
- fi
- # clean up temporary file generated by postrm uninstall
- if [ -e "${LOCALSCANCONF}.rul" ] && \
- [ "`md5sum ${LOCALSCANCONF}.rul | cut -d\ -f1`" = "${DISABLELOCALSCANMD5}" ]; then
- rm ${LOCALSCANCONF}.rul
- fi
- if [ -x /etc/init.d/exim4 ]; then
- if [ -x /usr/sbin/invoke-rc.d ]; then
- invoke-rc.d exim4 reload || true
- else
- /etc/init.d/exim4 reload || true
- fi
- fi
- ;;
-
-esac
-
-#DEBHELPER#
Index: branches/experimental/debian/postrm
===================================================================
--- branches/experimental/debian/postrm (revision 29)
+++ branches/experimental/debian/postrm (nonexistent)
@@ -1,57 +0,0 @@
-#!/bin/sh
-set -e
-
-if [ -f /usr/share/debconf/confmodule ]; then
- . /usr/share/debconf/confmodule
-fi
-
-LOCALSCANCONF=/etc/exim4/conf.d/main/15_sa-exim_plugin_path
-DISABLELOCALSCANTEXT='# sa-exim plugin is disabled, because it was uninstalled'
-DISABLELOCALSCANMD5=`echo "${DISABLELOCALSCANTEXT}" | md5sum | cut -d\ -f1`
-
-case "$1" in
- remove)
- # disable local_scan_path directive to exim working
- if [ -e "$LOCALSCANCONF" ] && [ ! -e "${LOCALSCANCONF}.rul" ]; then
- echo "${DISABLELOCALSCANTEXT}" > ${LOCALSCANCONF}.rul
- fi
- if [ -x /etc/init.d/exim4 ]; then
- if [ -x /usr/sbin/invoke-rc.d ]; then
- invoke-rc.d exim4 reload || true
- else
- /etc/init.d/exim4 reload || true
- fi
- fi
- ;;
-
- purge)
- # clean up temporary file generated by postrm uninstall
- if [ -e "${LOCALSCANCONF}.rul" ] && \
- [ "`md5sum ${LOCALSCANCONF}.rul | cut -d\ -f1`" = "${DISABLELOCALSCANMD5}" ]; then
- rm ${LOCALSCANCONF}.rul
- fi
- if [ -x /etc/init.d/exim4 ]; then
- if [ -x /usr/sbin/invoke-rc.d ]; then
- invoke-rc.d exim4 reload || true
- else
- /etc/init.d/exim4 reload || true
- fi
- fi
- # In the rather uncommon event that debconf has been removed before
- # us, we have no choice but leaving the spool directory alone.
- if [ -e /var/spool/sa-exim ] &&
- ! rmdir /var/spool/sa-exim 2>/dev/null &&
- [ -f /usr/share/debconf/confmodule ]; then
- db_version 2.0
- db_input medium sa-exim/purge_spool || true
- db_go || true
- db_get sa-exim/purge_spool
- purge_spool="$RET"
- if [ "x${purge_spool}" = "xtrue" ] ; then
- rm -rf /var/spool/sa-exim
- fi
- fi
- ;;
-esac
-
-#DEBHELPER#
Index: branches/experimental/debian/changelog
===================================================================
--- branches/experimental/debian/changelog (revision 29)
+++ branches/experimental/debian/changelog (nonexistent)
@@ -1,237 +0,0 @@
-sa-exim (4.2.1-8) unstable; urgency=medium
-
- * Urgency medium to reach testing before exim4.
- * Since version 4.67-1, exim4 only exports those symbols that are part
- of the official local_scan API. Unfortunately, sa-exim cheated and
- declared three extern variables by itself:
- · primary_hostname: Now retrieved by expanding "$primary_hostname".
- · smtp_out: Use smtp_fflush() to get error indication.
- · body_linecount: No workaround; $body_linecount simply won't be
- updated. I'm working to get Exim to update it along with other
- variables such as $message_size.
- (Closes: #420443, #420555, #420736)
-
- -- Magnus Holmgren <magnus@kibibyte.se> Thu, 26 Apr 2007 16:05:26 +0200
-
-sa-exim (4.2.1-7) unstable; urgency=low
-
- * Don't depend on debconf in postrm; if we can't prompt the user,
- leave the spool directory alone (Closes: #417027).
- * Do not pass a '-u' parameter to spamc if SAspamcUser expands to the
- empty string.
-
- -- Magnus Holmgren <magnus@kibibyte.se> Tue, 3 Apr 2007 13:02:48 +0200
-
-sa-exim (4.2.1-6) unstable; urgency=low
-
- * Added Portuguese Debconf template translation (Closes: #415537).
- Thanks to Pedro Ribeiro.
- * It is now possible to pass a username to spamc. See the SAspamcUser
- option in sa-exim.conf.
- * Build-depend on exim4-dev.
-
- -- Magnus Holmgren <magnus@kibibyte.se> Tue, 20 Mar 2007 14:25:31 +0100
-
-sa-exim (4.2.1-5) unstable; urgency=low
-
- * Added Italian debconf template translation (Closes: #411396). Thanks
- to Luca Monducci.
- * Added Galician Debconf template translation (Closes: #412804).
- Thanks to Jacobo Tarrio.
- * Added Dutch debconf template translation (Closes: #413702). Thanks
- to Bart Cornelis.
- * Added debian/watch.
-
- -- Magnus Holmgren <magnus@kibibyte.se> Wed, 7 Mar 2007 15:46:16 +0100
-
-sa-exim (4.2.1-4) unstable; urgency=low
-
- * Added Spanish debconf template translation (Closes: #404490).
- Thanks to Rudy Godoy.
-
- -- Magnus Holmgren <magnus@kibibyte.se> Tue, 9 Jan 2007 16:39:43 +0100
-
-sa-exim (4.2.1-3) unstable; urgency=low
-
- * New maintainer (Closes: #352533).
- * Updated package description to explain what SA-Exim can do that
- exim-daemon-heavy can't, and vice versa (Closes: #378732).
- * Added German debconf template translation (Closes: #399963).
- Thanks to Matthias Julius.
- * Updated Swedish debconf templates.
- * Encourage use of ACL variables in sa-exim.conf. Also exclude ::1
- from SA scanning.
- * Removed unnecessary question in long description of debconf
- template.
- * Upgraded to Standards-Version 3.7.2. No changes needed.
- * Moved greylistclean to /usr/share/sa-exim. If you have modified
- the crontab file, you have to update it manually.
- * Added Recommends: perl (needed by greylistclean, but greylistclean
- isn't completely necessary.
-
- -- Magnus Holmgren <magnus@kibibyte.se> Sun, 3 Dec 2006 00:41:01 +0100
-
-sa-exim (4.2.1-2) unstable; urgency=medium
-
- * Fixed rights on /var/spool/sa-exim. Closes: #297623
- + Content-type bug closed by 4.2.1-1: Closes: #286069
- * Fixed README.greylisting Closes: #325335
- + Added cs, sv, vi translations Closes: #315995, #332363, #317869
- + Added note about unsupported linecontinuation to README
- sa-exim.conf already has note Closes: #276080
- + Removed SAtempreject from default sa-exim.conf Closes: #281567
-
- -- Sander Smeenk <ssmeenk@debian.org> Mon, 27 Mar 2006 13:42:06 +0200
-
-sa-exim (4.2.1-1) unstable; urgency=high
-
- * SECURITY: new upstream does a better job at being safe when deleting
- greylisting tuplets Closes: #345071
- * Fixed sa-exim.conf typo Closes: #305890
- * Disable former insecure /etc/cron.daily/greylistclean
-
- -- Sander Smeenk <ssmeenk@debian.org> Mon, 09 Jan 2006 09:01:25 -0800
-
-sa-exim (4.2-1) unstable; urgency=high
-
- * New upstream version
- * Ship new SA-Exim Greylisting plugin for SA 3.0 or better
- * Ship new /etc/cron.daily/greylistclean
- * Updated README.Debian
-
- -- Marc MERLIN <marc_soft@merlins.org> Mon, 17 Dec 2005 00:14:03 -0800
-
-sa-exim (4.1-1) unstable; urgency=high
-
- * New upstream version
- * SECURITY: new upstream provides SA greylisting patch with shell safe
- filenames and directories (only affected users who use the SA greylisting
- patch _and_ an unsafe shell cron job to delete old files and directories)
- * Updated README.debian to warn that the SA 2.4 greylisting patch is out
- of date and unmaintained.
-
- -- Marc MERLIN <marc_soft@merlins.org> Mon, 16 Aug 2004 08:32:36 -0700
-
-sa-exim (4.0-3) unstable; urgency=low
-
- + Changed hard depend on spamc, since that's all sa-exim needs.
- You have to choose to install spamassassin, or run spamc to
- another host. This entry closes: #253393
- + Documentation was assed to explain about sa-exim defaulting
- to exim4 configured to use exim4/use_split_config. Devine
- intervention is needed when using monolithic configs. One day
- sa-exim might detect this and act on it?
- This entry closes: #251755, #265820
- + Incorrect scoring of messages due to incorrect last-Received:
- header is now fixed by newer versions of the exim4 package.
- Dependencies have been changed. This entry closes: #250726, #246715
- + Updated Japanese translations of debconf templates. A typo in the
- english templates has been fixed too. This entry closes: #252341
-
- -- Sander Smeenk <ssmeenk@debian.org> Wed, 15 Aug 2004 19:40:05 +0200
-
-sa-exim (4.0-2) unstable; urgency=low
-
- * Clarified SA-greylisting patches in README.Debian
- Closes: #245573
- + Added Danish translations
- + Added French translations
- Closes: #238537, #239258
-
- -- Sander Smeenk <ssmeenk@debian.org> Sat, 24 Apr 2004 11:34:35 +0200
-
-sa-exim (4.0-1) unstable; urgency=low
-
- * New upstream version
- * Added new docs (README.greylisting / SA patches)
- * Create /var/spool/sa-exim/tuplets for the new greylisting support
-
- -- Marc MERLIN <marc_soft@merlins.org> Tue, 03 Mar 2004 08:52:49 -0800
-
-sa-exim (3.1-4) unstable; urgency=low
-
- * Fixed minor packaging bugs.
- * Debconf gettextized for translators (Closes: #237105)
-
- -- Sander Smeenk <ssmeenk@debian.org> Sun, 07 Mar 2004 15:38:47 +0100
-
-sa-exim (3.1-3) unstable; urgency=low
-
- * Clean up properly on purge, asking per debconf about removing saved mails
- in spool-directory if necessary.
- * Update to work with exim4 running as Debian-exim (don't include
- /var/spool/sa-exim in deb, generate it in postinst; stricter
- dependencies).
- * sa-exim uses spamc - Correct depends accordingly.
-
- -- Sander Smeenk <ssmeenk@debian.org> Sun, 22 Feb 2004 10:32:03 +0100
-
-sa-exim (3.1-2) unstable; urgency=low
-
- * Minor updates to control suggested by Andreas Metzler
- * Minor updates on upstream source (INSTALL / sa-exim.conf)
- * Uploaded to Debian (Closes: #196100)
-
- -- Marc MERLIN <marc_soft@merlins.org> Wed, 20 Aug 2003 09:18:42 -0700
-
-sa-exim (3.1-1) unstable; urgency=low
-
- * Upstream update
-
- -- Marc MERLIN <marc_soft@merlins.org> Tue, 19 Aug 2003 09:48:13 -0700
-
-sa-exim (3.0+cvs-20030802) unstable; urgency=low
-
- * Updated sa-exim to cvs version
- * Restored plugin location to /usr/lib/exim4/local_scan/
- * Added contrib contents to docs
-
- -- Marc MERLIN <marc_soft@merlins.org> Sat, 02 Aug 2003 20:57:50 -0700
-
-sa-exim (3.0+cvs-20030728) unstable; urgency=low
-
- * Updated sa-exim to cvs version
-
- -- Marc MERLIN <marc_soft@merlins.org> Mon, 28 Jul 2003 21:08:24 -0500
-
-sa-exim (3.0+cvs-1) unstable; urgency=low
-
- * Updated sa-exim to cvs version (and new sa-exim.conf config file)
-
- -- Marc MERLIN <marc_soft@merlins.org> Mon, 08 Jun 2003 23:19:11 -0700
-
-sa-exim (3.0-3) unstable; urgency=low
-
- * Taken over from Andreas, thanks for the template
- * Rewrote description in control
- * Updated docs to contain all the documentation files
- * /var/spool/sa-exim will contain the saved mails and is 770/mail.mail
- * Do not patch sample sa-exim.conf, run sed during the install
- * Removed ${misc:Depends} from control, my dpkg-gencontrol says it's unknown
- * Fixes to debian/control, debian/rules and debian/copyright for policy
- compliance and to make lintian more happy. Increased Standards-Version to
- 3.5.10. (Andreas Metzler)
- * Add some magic to maintainerscripts, disabling the sa-exim part of exim's
- main configuration file when sa-exim is uninstalled. (Andreas Metzler)
-
- -- Marc MERLIN <marc_soft@merlins.org> Mon, 26 May 2003 23:22:56 -0700
-
-sa-exim (3.0-2) unstable; urgency=low
-
- * Small fixes
-
- -- Andreas Metzler <ametzler@debian.org> Fri, 2 May 2003 20:20:11 +0200
-
-sa-exim (3.0-1) unstable; urgency=low
-
- * renamed package to sa-exim
- * upgrade to 3.0
-
- -- Andreas Metzler <ametzler@debian.org> Fri, 2 May 2003 17:36:28 +0200
-
-exim4-sa-plugin (2.2-1) unstable; urgency=low
-
- * Initial Release.
-
- -- Andreas Metzler <ametzler@debian.org> Thu, 13 Mar 2003 17:16:46 +0100
-
Index: branches/experimental/debian/docs
===================================================================
--- branches/experimental/debian/docs (revision 29)
+++ branches/experimental/debian/docs (nonexistent)
@@ -1,8 +0,0 @@
-ACKNOWLEDGEMENTS
-Acknowledgements.html
-README
-README.greylisting
-sa.html
-TODO
-contrib/sa-exim-stats.txt
-contrib/spam_resend.txt
Index: branches/experimental/debian/rules
===================================================================
--- branches/experimental/debian/rules (revision 29)
+++ branches/experimental/debian/rules (nonexistent)
@@ -1,87 +0,0 @@
-#!/usr/bin/make -f
-# Sample debian/rules that uses debhelper.
-# GNU copyright 1997 to 1999 by Joey Hess.
-
-# Uncomment this to turn on verbose mode.
-#export DH_VERBOSE=1
-
-CFLAGS = -Wall -g
-
-ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
- CFLAGS += -O0
-else
- CFLAGS += -O2
-endif
-ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
- INSTALL_PROGRAM += -s
-endif
-
-configure: configure-stamp
-configure-stamp:
- dh_testdir
- touch configure-stamp
-
-build: build-stamp
-build-stamp: configure-stamp
- dh_testdir
- $(MAKE) BUILDCFLAGS='-I/usr/include/exim4 -fPIC $$(CFLAGS)'
- touch build-stamp
-
-clean:
- dh_testdir
- dh_testroot
- rm -f build-stamp configure-stamp
- -$(MAKE) clean
- dh_clean
-
-install: build
- dh_testdir
- dh_testroot
- dh_clean -k
- dh_installdirs
- install -m755 sa-exim-*so \
- $(CURDIR)/debian/sa-exim/usr/lib/exim4/local_scan/sa-exim.so
- install -m755 accept*so \
- $(CURDIR)/debian/sa-exim/usr/lib/exim4/local_scan/accept.so
- sed "s/\/var\/spool\/exim/\/var\/spool\/sa-exim/" < sa-exim.conf > \
- $(CURDIR)/debian/sa-exim/etc/exim4/sa-exim.conf
- chmod 644 $(CURDIR)/debian/sa-exim/etc/exim4/sa-exim.conf
- install -m644 debian/15_sa-exim_plugin_path \
- $(CURDIR)/debian/sa-exim/etc/exim4/conf.d/main
- install -m644 SA-greylisting-2.4x.diff \
- $(CURDIR)/debian/sa-exim/usr/share/doc/sa-exim/sa2.xpatches
- install -m644 SA-greylisting-2.6.diff \
- $(CURDIR)/debian/sa-exim/usr/share/doc/sa-exim/sa2.xpatches
- install -m644 Greylisting.pm \
- $(CURDIR)/debian/sa-exim/usr/share/perl5/Mail/SpamAssassin/Plugin/Greylisting.pm
- install -m644 greylistclean.cron \
- $(CURDIR)/debian/sa-exim/etc/cron.d/greylistclean
- install -m755 greylistclean \
- $(CURDIR)/debian/sa-exim/usr/share/sa-exim/greylistclean
-
-# Build architecture-independent files here.
-binary-indep: build install
-# We have nothing to do by default.
-
-# Build architecture-dependent files here.
-binary-arch: build install
- dh_testdir
- dh_testroot
- dh_installchangelogs Changelog.html
- dh_installdocs
- dh_installexamples
- dh_installdebconf
- dh_installman
- dh_link
- dh_strip
- dh_compress
- dh_fixperms -Xvar/spool/sa-exim
- dh_perl
- dh_installdeb
- dh_shlibdeps
- dh_gencontrol
- dh_md5sums
- dh_builddeb
-
-binary: binary-indep binary-arch
-.PHONY: build clean binary-indep binary-arch binary install configure
/branches/experimental/debian/rules
Property changes:
Deleted: svn:executable
Index: branches/experimental/debian/templates
===================================================================
--- branches/experimental/debian/templates (revision 29)
+++ branches/experimental/debian/templates (nonexistent)
@@ -1,11 +0,0 @@
-Template: sa-exim/purge_spool
-Type: boolean
-Default: false
-_Description: Remove saved mails in spool directory?
- There are some saved mails in subdirectories of /var/spool/sa-exim.
- Depending on the configuration sa-exim will save mails matching specific
- criterias (an error occured, rejected as spam, passed through although
- recognized as spam, ...) in subdirectories of /var/spool/sa-exim.
- .
- You can keep them for further analysis and later remove them manually or
- decide to delete them now.
Index: branches/experimental/debian/dirs
===================================================================
--- branches/experimental/debian/dirs (revision 29)
+++ branches/experimental/debian/dirs (nonexistent)
@@ -1,7 +0,0 @@
-usr/lib/exim4/local_scan
-usr/share/doc/sa-exim/patches
-etc/exim4/conf.d/main
-usr/share/perl5/Mail/SpamAssassin/Plugin
-usr/share/sa-exim
-etc/cron.d
-usr/sbin
Index: branches/experimental/debian/15_sa-exim_plugin_path
===================================================================
--- branches/experimental/debian/15_sa-exim_plugin_path (revision 29)
+++ branches/experimental/debian/15_sa-exim_plugin_path (nonexistent)
@@ -1,9 +0,0 @@
-# This will enable sa-exim, but it won't actually scan and possibly reject
-# messsages before you enable this in sa-exim.conf (see SAEximRunCond)
-#
-# For a starter, you'd probably want to read the documentation at:
-# /usr/share/doc/sa-exim/README.Debian
-# and
-# /usr/share/doc/sa-exim/README.gz
-#
-local_scan_path = /usr/lib/exim4/local_scan/sa-exim.so
Index: branches/experimental/sa-exim.c
===================================================================
--- branches/experimental/sa-exim.c (revision 29)
+++ branches/experimental/sa-exim.c (nonexistent)
@@ -1,1538 +0,0 @@
-/* Spamassassin in local_scan by Marc MERLIN <marc_soft@merlins.org> */
-/* $Id: sa-exim.c,v 1.71 2005/03/08 20:39:51 marcmerlin Exp $ */
-/*
-
-The inline comments and minidocs were moved to the distribution tarball
-
-You can get the up to date version of this file and full tarball here:
-http://sa-exim.sourceforge.net/
-http://marc.merlins.org/linux/exim/sa.html
-The discussion list is here:
-http://lists.merlins.org/lists/listinfo/sa-exim
-*/
-
-
-
-#include <stdio.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <errno.h>
-#include <string.h>
-#include <stdlib.h>
-#include <time.h>
-#include <ctype.h>
-#include <signal.h>
-#include <setjmp.h>
-#include <sys/wait.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include "sa-exim.h"
-
-/* Exim includes */
-#include <local_scan.h>
-//extern int body_linecount; /* Line count in body */
-
-#ifdef DLOPEN_LOCAL_SCAN
-
-/* Karsten Engelke <me@kaeng.org> says this is missing on openbsd */
-#ifndef RTLD_NOW
-#define RTLD_NOW 0x002
-#endif
-
-/* Return the verion of the local_scan ABI, if being compiled as a .so */
-int local_scan_version_major(void)
-{
- return LOCAL_SCAN_ABI_VERSION_MAJOR;
-}
-
-int local_scan_version_minor(void)
-{
- return LOCAL_SCAN_ABI_VERSION_MINOR;
-}
-
-/* Left over for compatilibility with old patched exims that didn't have
- a version number with minor an major. Keep in mind that it will not work
- with older exim4s (I think 4.11 is required) */
-#ifdef DLOPEN_LOCAL_SCAN_OLD_API
-int local_scan_version(void)
-{
- return 1;
-}
-#endif
-#endif
-
-#ifndef SAFEMESGIDCHARS
-#define SAFEMESGIDCHARS "!#%( )*+,-.0123456789:<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_abcdefghijklmnopqrstuvwxyz{|}~";
-#endif
-
-
-/******************************/
-/* Compile time config values */
-/******************************/
-#ifndef SPAMC_LOCATION
-#define SPAMC_LOCATION "/usr/bin/spamc"
-#endif
-
-#ifndef SPAMASSASSIN_CONF
-#define SPAMASSASSIN_CONF "/etc/exim4/sa-exim.conf"
-#endif
-static const char conffile[]=SPAMASSASSIN_CONF;
-
-
-/********************/
-/* Code starts here */
-/********************/
-static const char nospamstatus[]="<error finding status>";
-
-static char *buffera[4096];
-static char *buffer=(char *)buffera;
-static int SAEximDebug=0;
-static int SAPrependArchiveWithFrom=1;
-static jmp_buf jmp_env;
-
-static char *where="Error handler called without error string";
-static int line=-1;
-static char *panicerror;
-
-#define MIN(a,b) (a<b?a:b)
-
-#define CHECKERR(mret, mwhere, mline) \
- if (mret < 0) \
- { \
- where=mwhere; \
- line=mline; \
- goto errexit; \
- }
-
-#define PANIC(merror) \
- panicerror=merror; \
- goto panicexit;
-
-
-static void alarm_handler(int sig)
-{
- sig = sig; /* Keep picky compilers happy */
- longjmp(jmp_env, 1);
-}
-
-
-/* Comparing header lines isn't fun, especially since the comparison has to
- be caseless, so we offload this to this function
- You can scan on partial headers, just give the root to scan for
- Return 1 if the header was found, 0 otherwise */
-static int compare_header(char *buffertocompare, char *referenceheader)
-{
- int idx;
- int same=1;
-
- for (idx=0; idx<strlen(referenceheader); idx++)
- {
- if ( tolower(referenceheader[idx]) != tolower(buffertocompare[idx]) )
- {
- same=0;
- break;
- }
- }
-
- if (SAEximDebug > 7)
- {
- if (same)
- {
- log_write(0, LOG_MAIN, "SA: Debug8: Found %s in %s", referenceheader, buffertocompare);
- }
- else if (SAEximDebug > 8)
- {
- log_write(0, LOG_MAIN, "SA: Debug9: Did not find %s in %s", referenceheader, buffertocompare);
- }
- }
-
- return same;
-}
-
-
-/* returns a header from a buffer line */
-static char *get_header(char *buffer)
-{
- char *start;
- char *end;
- char *header;
-
- start=buffer;
- end=strstr(buffer, ":");
-
- header=string_copyn(start, end-start);
-
- if (SAEximDebug>5)
- {
- log_write(0, LOG_MAIN, "SA: Debug6: Extracted header %s in buffer %s", header, buffer);
- }
-
- return header;
-}
-
-
-/* Rejected mails can be archived in a spool directory */
-/* filename will contain a double / before the filename, I prefer two to none */
-static int savemail(int readfd, off_t fdstart, char *dir, char *dirvarname,
- char *filename, int SAmaxarchivebody, char *condition)
-{
- header_line *hl;
- int writefd=0;
- int ret;
- ssize_t stret;
- off_t otret;
- char *expand;
- char *fake_env_from;
- int towrite;
- int chunk;
- struct stat bufst;
-
- if (dir == NULL)
- {
- if (SAEximDebug>4)
- {
- log_write(0, LOG_MAIN, "SA: Debug5: Not saving message because %s in undefined", dirvarname);
- }
- return 0;
- }
-
- if (condition[0] != '1' || condition[1] != 0)
- {
- expand=expand_string(condition);
- if (expand == NULL)
- {
- /* Can't use PANIC within this function :( */
- CHECKERR(-1, string_sprintf("savemail condition expansion failure on %s", condition), __LINE__ - 1);
- }
-
- if (SAEximDebug > 2)
- {
- log_write(0, LOG_MAIN, "SA: Debug3: savemail condition expand returned: '%s'", expand);
- }
-
- if (expand[0] == 0 || (expand[0] == '0' && expand[1] == 0))
- {
- if (SAEximDebug > 1)
- {
- log_write(0, LOG_MAIN, "SA: Debug2: savemail condition expanded to false, not saving message to disk");
- }
- return 0;
- }
- }
-
- if (SAEximDebug)
- {
- log_write(0, LOG_MAIN, "SA: Debug: Writing message to %s/new/%s", dir, filename);
-
- }
-
- if (stat(string_sprintf("%s/new/", dir), &bufst) == -1)
- {
- log_write(0, LOG_MAIN, "SA: Notice: creating maildir tree in %s", dir);
- if (stat(dir, &bufst) == -1)
- {
- ret=mkdir (dir, 0770);
- CHECKERR(ret,string_sprintf("mkdir %s", dir),__LINE__);
- }
- ret=mkdir (string_sprintf("%s/new", dir), 0770);
- CHECKERR(ret,string_sprintf("mkdir %s/new/", dir),__LINE__);
- ret=mkdir (string_sprintf("%s/cur", dir), 0770);
- CHECKERR(ret,string_sprintf("mkdir %s/cur/", dir),__LINE__);
- ret=mkdir (string_sprintf("%s/tmp", dir), 0770);
- CHECKERR(ret,string_sprintf("mkdir %s/tmp/", dir),__LINE__);
- }
-
- /* Let's not worry about you receiving two spams at the same second
- * with the same message ID. If you do, the second one will overwrite
- * the first one */
- writefd=creat(string_sprintf("%s/new/%s", dir, filename), S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH);
- CHECKERR(writefd, string_sprintf("creat %s/new/%s", dir, filename),__LINE__);
-
- /* make the file look like a valid mbox -- idea from dman */
- /* Although now that we use maildir format, this isn't really necessary */
- /* Richard Lithvall made this an option */
- if(SAPrependArchiveWithFrom == 1)
- {
- fake_env_from=string_sprintf("From %s Thu Jan 1 00:00:01 1970\n",sender_address);
- stret=write(writefd, fake_env_from, strlen(fake_env_from));
- CHECKERR(stret,string_sprintf("'From ' line write in %s", filename),__LINE__);
- }
-
- /* First we need to get the header lines from exim, and then we can read
- the body from writefd */
- hl=header_list;
- while (hl != NULL)
- {
- /* type '*' means the header is internal, don't print it */
- if (hl->type == '*')
- {
- hl=hl->next;
- continue;
- }
- stret=write(writefd,hl->text,strlen(hl->text));
- CHECKERR(stret,string_sprintf("header line write in %s", filename),__LINE__);
- hl=hl->next;
- }
- stret=write(writefd,"\n",1);
- CHECKERR(stret,string_sprintf("header separation write in %s", filename),__LINE__);
-
- /* Now copy the body to the save file */
- /* we already read from readfd, so we need to reset it */
- otret=lseek(readfd, fdstart, SEEK_SET);
- CHECKERR(otret, "lseek reset on spooled message", __LINE__);
-
- if (SAEximDebug > 8)
- {
- log_write(0, LOG_MAIN, "SA: Debug9: Archive body write starts: writing up to %d bytes in %d byte blocks", SAmaxarchivebody, sizeof(buffera));
- }
-
- towrite=SAmaxarchivebody;
- chunk=0;
- while (towrite>0 && (stret=read(readfd, buffer, MIN(sizeof(buffera), towrite))) > 0)
- {
- chunk++;
- if (SAEximDebug > 8)
- {
- log_write(0, LOG_MAIN, "SA: Debug9: Processing archive body chunk %d (read %.0f, and %.0f can still be written)", chunk, (double)stret, (double)towrite);
- }
- towrite-=stret;
- stret=write(writefd, buffer, stret);
- CHECKERR(stret,string_sprintf("body write in %s", filename),__LINE__);
- }
- CHECKERR(stret, "read body for archival", __LINE__ - 8);
- ret=close(writefd);
- CHECKERR(ret, "Closing spooled message",__LINE__);
- return 0;
-
- /* catch the global errexit, clean up, and return the error up */
- errexit:
- close(writefd);
- return -1;
-}
-
-/*
- * let's add the X-SA-Exim-Connect-IP, X-SA-Exim-Rcpt-To, and
- * X-SA-Exim-Mail-From headers.
- * Those are all required by the greylisting with SA implementation
- * And From/Rcpt-To can also be used for personalized SA rules
- */
-void AddSAEheaders(char *rcptlist, int SAmaxrcptlistlength)
-{
- if (sender_host_address)
- {
- header_add(' ', "X-SA-Exim-Connect-IP: %s\n", sender_host_address);
- }
- else
- {
- header_add(' ', "X-SA-Exim-Connect-IP: <locally generated>\n");
- }
-
- /* Create a mega envelope-to header with all the recipients */
- /* Note, if you consider this a privacy violation, you can remove the header
- * in exim's system filter.
- * This is very useful to see who a message was really sent to, and can
- * be used by Spamassassin to do additional scoring */
- if (strlen(rcptlist) <= SAmaxrcptlistlength)
- {
- header_add(' ', "X-SA-Exim-Rcpt-To: %s\n", rcptlist);
- }
- /* Therefore SAmaxrcptlistlength set to 0 disables the header completely */
- else if (SAmaxrcptlistlength)
- {
- header_add(' ', "X-SA-Exim-Rcpt-To: too long (recipient list exceeded maximum allowed size of %d bytes)\n", SAmaxrcptlistlength);
- }
-
- header_add(' ', "X-SA-Exim-Mail-From: %s\n", sender_address);
-}
-
-void RemoveHeaders(char *headername)
-{
- header_line *hl;
-
- /* Remove headers that SA can set */
- hl=header_list;
- while (hl != NULL)
- {
-
- /* type '*' means the header is internal or deleted */
- if (hl->type == '*')
- {
- hl=hl->next;
- continue;
- }
-
- /* Strip all SA and SA-Exim headers on incoming mail */
- if ( compare_header((char *)hl->text, headername) )
- {
- if (SAEximDebug > 2)
- {
- log_write(0, LOG_MAIN, "SA: Debug3: removing header %s on incoming mail '%s'", headername, (char *)hl->text);
- }
- hl->type = '*';
- }
- hl=hl->next;
- }
-}
-
-
-/*
- * Headers can be multi-line (in theory all of them can I think). Parsing them
- * is a little more work than a simple line scan, so we're off-loading this to
- * a function
- */
-int parsemlheader(char *buffer, FILE *readfh, char *headername, char **header)
-{
- header_line *hl;
- char *dummy;
- char *foundheadername;
-
- if (SAEximDebug > 4)
- {
- log_write(0, LOG_MAIN, "SA: Debug5: looking for header %s", headername);
- }
-
- if (header == NULL)
- {
- header=&dummy;
- }
-
- if (compare_header(buffer, string_sprintf("%s", headername)))
- {
- *header=string_copy(buffer);
-
- /* Read the next line(s) in case this is a multi-line header */
- while ((fgets((char *)buffer,sizeof(buffera),readfh)) != NULL)
- {
- /* Remove trailing newline */
- if (buffer[strlen(buffer)-1] == '\n')
- {
- buffer[strlen(buffer)-1]=0;
- }
- if (SAEximDebug > 5)
- {
- log_write(0, LOG_MAIN, "SA: Debug6: while parsing header %s, read %s", headername, buffer);
- }
- /* concatenated lines only start with space or tab. right? */
- if (buffer[0] != ' ' && buffer[0] != '\t')
- {
- break;
- }
-
- /* Guard against humongous header lines */
- if (strlen(*header) < 8000)
- {
- /* Slight waste of memory here, oh well... */
- *header=string_sprintf("%s\n%s", *header, buffer);
- }
- else
- {
- log_write(0, LOG_MAIN, "SA: Warning: while parsing header %s, ignoring the following trailing line due to header size overflow: %s", headername, buffer);
-
- }
- }
- if (SAEximDebug > 5)
- {
- log_write(0, LOG_MAIN, "SA: Debug6: header pieced up %s as: '%s'", headername, *header);
- }
-
- /* Headers need a newline at the end before being handed out to exim */
- /* Slight waste of memory here, oh well... */
- *header=string_sprintf("%s\n", *header);
-
- foundheadername=get_header(*header);
-
- /* Mark the former header as deleted if it's already present */
- /* Note that for X-Spam, it won't since we already deleted it earlier */
- hl=header_list;
- while (hl != NULL)
- {
- /* type '*' means the header is internal or deleted */
- if (hl->type == '*')
- {
- hl=hl->next;
- continue;
- }
-
- if ( compare_header((char *)hl->text, foundheadername) )
- {
- if (SAEximDebug > 5)
- {
- log_write(0, LOG_MAIN, "SA: Debug6: removing old copy of header '%s' and replacing with new one: '%s'", (char *)hl->text, *header);
- }
- hl->type = '*';
- break;
- }
- hl=hl->next;
- }
-
- header_add(' ', "%s", *header);
- return 1;
- }
- return 0;
-}
-
-
-char *cleanmsgid(char *msgid, char *SAsafemesgidchars)
-{
- char *safemesgid;
- char *ptr;
-
- /* In case the message-Id is too long, let's truncate it */
- safemesgid=string_copyn(msgid, 220);
- ptr=safemesgid;
-
- /* Clean Message-ID to make sure people can't write on our FS */
- while (*ptr)
- {
- /* This might be more aggressive than you want, but since you
- * potentially have shell programs dealing with the resulting filenames
- * let's make it a bit safer */
- if (strchr(SAsafemesgidchars, *ptr) == NULL)
- {
- *ptr='_';
- }
- ptr++;
- }
-
- if (SAEximDebug > 1)
- {
- log_write(0, LOG_MAIN, "SA: Debug2: Message-Id taken from Exim and cleaned from: %s to: %s", msgid, safemesgid);
- }
-
- return safemesgid;
-}
-
-
-/* Exim calls us here, feeds us a fd on the message body, and expects a return
- message in *return_text */
-int local_scan(volatile int fd, uschar **return_text)
-{
-#warning you should not worry about the "might be clobbered by longjmp", see source
- int ret;
- ssize_t stret;
- int pid;
- int writefd[2];
- int readfd[2];
- char *spamc_argv[10];
- int i;
- /* These are the only values that we want working after the longjmp
- * The automatic ones can be clobbered, but we don't really care */
- volatile FILE *readfh;
- volatile char *mesgfn=NULL;
- volatile off_t fdsize;
- volatile off_t scansize;
- volatile off_t fdstart;
- volatile char *rcptlist;
- volatile void *old_sigchld;
- char *safemesgid=NULL;
- int isspam=0;
- int gotsa=0;
- int chunk;
- off_t towrite;
- char *mailinfo;
- float spamvalue=0.0;
- char *spamstatus=NULL;
- time_t beforescan;
- time_t afterscan;
- time_t afterwait;
- time_t scantime=0;
- time_t fulltime=0;
- struct stat stbuf;
-
- uschar *expand;
- header_line *hl;
-
- static int readconffile=0;
- static int wrotedebugenabled=0;
-
- /* Options we read from /etc/exim4/sa-exim.conf */
- static char *SAspamcpath=SPAMC_LOCATION;
- static char *SAsafemesgidchars=SAFEMESGIDCHARS
- static char *SAspamcSockPath=NULL;
- static char *SAspamcPort="783";
- static char *SAspamcHost="127.0.0.1";
- static char *SAspamcUser=NULL;
- static char *SAEximRunCond="0";
- static char *SAEximRejCond="1";
- static int SAmaxbody=250*1024;
- static char *SATruncBodyCond="0";
- static int SARewriteBody=0;
- static int SAmaxarchivebody=20*1048576;
- static int SAerrmaxarchivebody=1024*1048576;
- static int SAmaxrcptlistlength=0;
- static int SAaddSAEheaderBeforeSA=1;
- static int SAtimeout=240;
- static char *SAtimeoutsave=NULL;
- static char *SAtimeoutSavCond="1";
- static char *SAerrorsave=NULL;
- static char *SAerrorSavCond="1";
- static int SAtemprejectonerror=0;
- static char *SAteergrube="1048576";
- static float SAteergrubethreshold;
- /* This is obsolete, since SAteergrube (now a condition) can do the same */
- static char *SAteergrubecond="1";
- static int SAteergrubetime=900;
- static char *SAteergrubeSavCond="1";
- static char *SAteergrubesave=NULL;
- static int SAteergrubeoverwrite=1;
- static char *SAdevnull="1048576";
- static float SAdevnullthreshold;
- static char *SAdevnullSavCond="1";
- static char *SAdevnullsave=NULL;
- static char *SApermreject="1048576";
- static float SApermrejectthreshold;
- static char *SApermrejectSavCond="1";
- static char *SApermrejectsave=NULL;
- static char *SAtempreject="1048576";
- static float SAtemprejectthreshold;
- static char *SAtemprejectSavCond="1";
- static char *SAtemprejectsave=NULL;
- static int SAtemprejectoverwrite=1;
- static char *SAgreylistiswhitestr="GREYLIST_ISWHITE";
- static float SAgreylistraisetempreject=3.0;
- static char *SAspamacceptsave=NULL;
- static char *SAspamacceptSavCond="0";
- static char *SAnotspamsave=NULL;
- static char *SAnotspamSavCond="0";
- /* Those variables can take a %s to show the spam info */
- static char *SAmsgteergrubewait="wait for more output";
- static char *SAmsgteergruberej="Please try again later";
- static char *SAmsgpermrej="Rejected";
- static char *SAmsgtemprej="Please try again later";
- /* Do not put a %s in there, or you'll segfault */
- static char *SAmsgerror="Temporary local error while processing message, please contact postmaster";
-
- /* This needs to be retrieved through expand_string in order
- not to violate the API. */
- static uschar *primary_hostname;
- if (!primary_hostname)
- primary_hostname = expand_string("$primary_hostname");
-
- /* New values we read from spamassassin */
- char *xspamstatus=NULL;
- char *xspamflag=NULL;
-
-
- /* Any error can write the faulty message to mesgfn, so we need to
- give it a value right now. We'll set the real value later */
- /* message_id here comes from Exim, it's an internal disk Mesg-Id format
- which doesn't correlate to the actual message's Mesg-Id. We shouldn't
- need to clean it, and besides, SAsafemesgidchars hasn't been read from
- the config file yet, but eh, safety is always a good thing, right? */
- safemesgid=cleanmsgid(message_id, SAsafemesgidchars);
- mesgfn=string_sprintf("%d_%s", time(NULL), safemesgid);
-
- /* We won't scan local messages. I think exim bypasses local_scan for a
- * bounce generated after a locally submitted message, but better be safe */
- /* This is commented out now, because you can control it with SAEximRunCond
- if (!sender_host_address)
- {
- return LOCAL_SCAN_ACCEPT;
- }
- */
-
- /* If you discard a mail with exim ACLs, we get 0 recipients, so let's just
- * accept the mail, which won't matter either way since it'll get dropped
- * (thanks to John Horne for reporting this corner case) */
- if (recipients_count == 0)
- {
- return LOCAL_SCAN_ACCEPT;
- }
-
- /*
- * We keep track of whether we've alrady read the config file, but since
- * exim spawns itself, it will get read by exim children even though you
- * didn't restart exim. That said, after you change the config file, you
- * should restart exim to make sure all the instances pick up the new
- * config file
- */
- if (!readconffile)
- {
- ret=open(conffile, 0);
- CHECKERR(ret,string_sprintf("conf file open for %s", conffile),__LINE__);
- readfh=fdopen(ret, "r");
- CHECKERR(readfh,"fdopen",__LINE__);
-
- while ((fgets((char *)buffer, sizeof(buffera), (FILE *)readfh)) != NULL)
- {
- if (*buffer == '#' || *buffer == '\n' )
- {
- continue;
- }
-
- if (*buffer != 'S' || *(buffer+1) != 'A')
- {
- log_write(0, LOG_MAIN, "SA: Warning: error while reading configuration file %s. Line does not begin with a SA directive: '%s', ignoring", conffile, buffer);
- continue;
- }
-
-#define M_CHECKFORVAR(VAR, TYPE) \
- if (strstr(buffer, #VAR ": ") == buffer) \
- { \
- if (sscanf(buffer, #VAR ": " TYPE, &VAR)) \
- { \
- if (SAEximDebug > 3) \
- { \
- if (SAEximDebug && ! wrotedebugenabled) \
- { \
- log_write(0, LOG_MAIN, "SA: Debug4: Debug enabled, reading config from file %s", conffile); \
- wrotedebugenabled=1; \
- } \
- else \
- { \
- log_write(0, LOG_MAIN, "SA: Debug4: config read " #VAR " = " TYPE, VAR); \
- }\
- }\
- } \
- else \
- { \
- log_write(0, LOG_MAIN, "SA: Warning: error while reading configuration file %s. Can't parse value in: '%s', ignoring", conffile, buffer); \
- } \
- continue; \
- }
-
-#define M_CHECKFORSTR(VAR) \
- if (strstr(buffer, #VAR ": ") == buffer) \
- { \
- VAR = strdup(buffer+strlen( #VAR )+2); \
- if (VAR == NULL) \
- { \
- log_write(0, LOG_MAIN, "SA: PANIC: malloc failed, quitting..."); \
- exit(-1); \
- } \
- \
- if (VAR[strlen(VAR)-1] == '\n') \
- { \
- VAR[strlen(VAR)-1]=0; \
- } \
- if (SAEximDebug > 3) \
- { \
- log_write(0, LOG_MAIN, "SA: Debug4: config read " #VAR " = %s", VAR); \
- } \
- continue; \
- }
-
- M_CHECKFORVAR(SAEximDebug, "%d");
- M_CHECKFORSTR(SAspamcpath);
- M_CHECKFORSTR(SAsafemesgidchars);
- M_CHECKFORSTR(SAspamcSockPath);
- M_CHECKFORSTR(SAspamcPort);
- M_CHECKFORSTR(SAspamcHost);
- M_CHECKFORSTR(SAspamcUser);
- M_CHECKFORSTR(SAEximRunCond);
- M_CHECKFORSTR(SAEximRejCond);
- M_CHECKFORVAR(SAmaxbody, "%d");
- M_CHECKFORSTR(SATruncBodyCond);
- M_CHECKFORVAR(SARewriteBody, "%d");
- M_CHECKFORVAR(SAPrependArchiveWithFrom, "%d");
- M_CHECKFORVAR(SAmaxarchivebody, "%d");
- M_CHECKFORVAR(SAerrmaxarchivebody, "%d");
- M_CHECKFORVAR(SAmaxrcptlistlength, "%d");
- M_CHECKFORVAR(SAaddSAEheaderBeforeSA, "%d");
- M_CHECKFORVAR(SAtimeout, "%d");
- M_CHECKFORSTR(SAtimeoutsave);
- M_CHECKFORSTR(SAtimeoutSavCond);
- M_CHECKFORSTR(SAerrorsave);
- M_CHECKFORSTR(SAerrorSavCond);
- M_CHECKFORVAR(SAtemprejectonerror, "%d");
- M_CHECKFORSTR(SAteergrube);
- M_CHECKFORSTR(SAteergrubecond);
- M_CHECKFORVAR(SAteergrubetime, "%d");
- M_CHECKFORSTR(SAteergrubeSavCond);
- M_CHECKFORSTR(SAteergrubesave);
- M_CHECKFORVAR(SAteergrubeoverwrite, "%d");
- M_CHECKFORSTR(SAdevnull);
- M_CHECKFORSTR(SAdevnullSavCond);
- M_CHECKFORSTR(SAdevnullsave);
- M_CHECKFORSTR(SApermreject);
- M_CHECKFORSTR(SApermrejectsave);
- M_CHECKFORSTR(SApermrejectSavCond);
- M_CHECKFORSTR(SAtempreject);
- M_CHECKFORSTR(SAtemprejectSavCond);
- M_CHECKFORSTR(SAtemprejectsave);
- M_CHECKFORVAR(SAtemprejectoverwrite, "%d");
- M_CHECKFORSTR(SAgreylistiswhitestr);
- M_CHECKFORVAR(SAgreylistraisetempreject, "%f");
- M_CHECKFORSTR(SAspamacceptsave);
- M_CHECKFORSTR(SAspamacceptSavCond);
- M_CHECKFORSTR(SAnotspamsave);
- M_CHECKFORSTR(SAnotspamSavCond);
- M_CHECKFORSTR(SAmsgteergrubewait);
- M_CHECKFORSTR(SAmsgteergruberej);
- M_CHECKFORSTR(SAmsgpermrej);
- M_CHECKFORSTR(SAmsgtemprej);
- M_CHECKFORSTR(SAmsgerror);
-
-
- }
-
- readconffile=1;
- }
-
-#define M_CONDTOFLOAT(VAR) \
- if ((expand=expand_string( VAR )) == NULL) \
- { \
- PANIC(string_sprintf(#VAR " config expansion failure on %s", #VAR ));\
- } \
- sscanf(expand, "%f", &VAR ## threshold); \
- if (SAEximDebug > 2) \
- { \
- log_write(0, LOG_MAIN, "SA: Debug3: expanded " #VAR " = %.2f", VAR ## threshold); \
- }\
-
- M_CONDTOFLOAT(SAteergrube);
- M_CONDTOFLOAT(SAdevnull);
- M_CONDTOFLOAT(SApermreject);
- M_CONDTOFLOAT(SAtempreject);
-
- /* Initialize the list of recipients here */
- rcptlist=string_copy(recipients_list[0].address);
- for (i=1; i < recipients_count && strlen((char *)rcptlist) < 7998 - strlen(recipients_list[i].address); i++)
- {
- rcptlist=string_sprintf("%s, %s", rcptlist, recipients_list[i].address);
- }
-
- if (sender_host_address != NULL)
- {
- mailinfo=string_sprintf("From <%s> (host=%s [%s]) for",
- sender_address, sender_host_name, sender_host_address);
- }
- else
- {
- mailinfo=string_sprintf("From <%s> (local) for", sender_address);
- }
- mailinfo=string_sprintf("%s %s", mailinfo, rcptlist);
-
-
- /* Remove SA-Exim headers that could have been set before we add ours*/
- RemoveHeaders("X-SA-Exim-");
-
- if(SAaddSAEheaderBeforeSA)
- {
- AddSAEheaders((char *)rcptlist, SAmaxrcptlistlength);
- }
-
- /* This is used later if we need to rewind and save the body elsewhere */
- fdstart=lseek(fd, 0, SEEK_CUR);
- CHECKERR(fdstart,"lseek SEEK_CUR",__LINE__);
-
- ret=fstat(fd, &stbuf);
- CHECKERR(ret,"fstat fd",__LINE__);
- /* this is the body size plus a few bytes (exim msg ID) */
- /* it should be 18 bytes, but I'll assume it could be more or less */
- fdsize=stbuf.st_size;
-
- if (SAEximDebug > 3)
- {
- log_write(0, LOG_MAIN, "SA: Debug4: Message body is about %.0f bytes and the initial offset is %.0f", (double)(fdsize-18), (double)fdstart);
- }
-
- if (fdsize > SAmaxbody)
- {
- if (SATruncBodyCond[0] != '1' || SATruncBodyCond[1] != 0)
- {
- expand=expand_string(SATruncBodyCond);
- if (expand == NULL)
- {
- PANIC(string_sprintf("SATruncBodyCond expansion failure on %s", SATruncBodyCond));
- }
-
- if (SAEximDebug)
- {
- log_write(0, LOG_MAIN, "SA: Debug: SATruncBodyCond expand returned: '%s'", expand);
- }
-
- if (expand[0] == 0 || (expand[0] == '0' && expand[1] == 0))
- {
- log_write(0, LOG_MAIN, "SA: Action: check skipped due to message size (%.0f bytes) and SATruncBodyCond expanded to false (Message-Id: %s). %s", (double)(fdsize-18), safemesgid, mailinfo);
- header_add(' ', "X-SA-Exim-Scanned: No (on %s); Message bigger than SAmaxbody (%d)\n", primary_hostname, SAmaxbody);
- return LOCAL_SCAN_ACCEPT;
- }
- }
-
- if (SAEximDebug > 1)
- {
- log_write(0, LOG_MAIN, "SA: Debug2: Message body is about %.0f bytes and SATruncBodyCond expanded to true, will feed a truncated body to SA", (double)(fdsize-18));
- }
-
- /* Let's feed exactly spamc will accept */
- scansize=SAmaxbody;
- header_add(' ', "X-SA-Exim-Scan-Truncated: Fed %.0f bytes of the body to SA instead of %.0f\n", (double)scansize, (double)fdsize);
- }
- else
- {
- scansize=fdsize;
- }
-
- expand=expand_string(SAEximRunCond);
- if (expand == NULL)
- {
- PANIC(string_sprintf("SAEximRunCond expansion failure on %s", SAEximRunCond));
- }
-
- if (SAEximDebug)
- {
- log_write(0, LOG_MAIN, "SA: Debug: SAEximRunCond expand returned: '%s'", expand);
- }
-
-
- /* Bail from SA if the expansion string says so */
- if (expand[0] == 0 || (expand[0] == '0' && expand[1] == 0))
- {
- log_write(0, LOG_MAIN, "SA: Action: Not running SA because SAEximRunCond expanded to false (Message-Id: %s). %s", safemesgid, mailinfo);
- header_add(' ', "X-SA-Exim-Scanned: No (on %s); SAEximRunCond expanded to false\n", primary_hostname);
- return LOCAL_SCAN_ACCEPT;
- }
-
- if (SAEximDebug)
- {
- log_write(0, LOG_MAIN, "SA: Debug: check succeeded, running spamc");
- }
-
- /* Ok, so now that we know we're running SA, we remove the X-Spam headers */
- /* that might have been there */
- RemoveHeaders("X-Spam-");
-
-
- beforescan=time(NULL);
- /* Fork off spamc, and get ready to talk to it */
- ret=pipe(writefd);
- CHECKERR(ret,"write pipe",__LINE__);
- ret=pipe(readfd);
- CHECKERR(ret,"read pipe",__LINE__);
-
- /* Ensure that SIGCHLD isn't being ignored. */
- old_sigchld = signal(SIGCHLD, SIG_DFL);
-
- if ((pid=fork()) < 0)
- {
- CHECKERR(pid, "fork", __LINE__ - 1);
- }
-
- if (pid == 0)
- {
- close(readfd[0]);
- close(writefd[1]);
-
- ret=dup2(writefd[0],0);
- CHECKERR(ret,"dup2 stdin",__LINE__);
- ret=dup2(readfd[1],1);
- CHECKERR(ret,"dup2 stdout",__LINE__);
- ret=dup2(readfd[1],2);
- CHECKERR(ret,"dup2 stderr",__LINE__);
-
- i = 0;
- spamc_argv[i++] = "spamc";
- if (SAspamcUser && SAspamcUser[0])
- {
- expand=expand_string(SAspamcUser);
- if (expand == NULL)
- {
- log_write(0, LOG_MAIN | LOG_PANIC, "SA: SAspamcUser expansion failure on %s, will run as Exim user instead.", SAspamcUser);
- }
- else if (expand[0] != '\0')
- {
- spamc_argv[i++] = "-u";
- spamc_argv[i++] = expand;
- }
- }
-
- /*
- * I could implement the spamc protocol and talk to spamd directly
- * instead of forking spamc, but considering the overhead spent
- * in spamd, forking off spamc seemed acceptable rather than
- * re-implementing and tracking the spamc/spamd protocol or linking
- * with a possibly changing library
- */
- /* Ok, we cheat, spamc cares about how big the whole message is and
- * we only know about the body size, so I'll give an extra 16K
- * to account for any headers that can accompany the message */
-
- spamc_argv[i++] = "-s";
- spamc_argv[i++] = string_sprintf("%d", SAmaxbody+16384);
-
- if(SAspamcSockPath)
- {
- spamc_argv[i++] = "-U";
- spamc_argv[i++] = SAspamcSockPath;
- }
- else
- {
- spamc_argv[i++] = "-d";
- spamc_argv[i++] = SAspamcHost;
- spamc_argv[i++] = "-p";
- spamc_argv[i++] = SAspamcPort;
- }
- spamc_argv[i++] = NULL;
-
- ret=execv(SAspamcpath, spamc_argv);
- CHECKERR(ret,string_sprintf("exec %s", SAspamcpath),__LINE__);
- }
-
- if (SAEximDebug > 8)
- {
- log_write(0, LOG_MAIN, "SA: Debug9: forked spamc");
- }
-
- ret=close(readfd[1]);
- CHECKERR(ret,"close r",__LINE__);
- ret=close(writefd[0]);
- CHECKERR(ret,"close w",__LINE__);
- readfh=fdopen(readfd[0], "r");
-
- if (SAEximDebug > 8)
- {
- log_write(0, LOG_MAIN, "SA: Debug9: closed filehandles");
- }
-
- /* Ok, we're ready for spewing the mail at spamc */
- /* First we need to get the header lines from exim, and then we can read
- the body from fd */
- hl=header_list;
- while (hl != NULL)
- {
- /* type '*' means the header is internal, don't print it */
- if (hl->type == '*')
- {
- hl=hl->next;
- continue;
- }
-
- stret=write(writefd[1],hl->text,strlen(hl->text));
- CHECKERR(stret,"header line write",__LINE__);
-
- hl=hl->next;
- }
- stret=write(writefd[1],"\n",1);
- CHECKERR(stret,"header separation write",__LINE__);
-
- if (SAEximDebug > 6)
- {
- log_write(0, LOG_MAIN, "SA: Debug7: sent headers to spamc pipe. Sending body...");
- }
-
- towrite=scansize;
- chunk=0;
- while (towrite>0 && (stret=read(fd, buffer, MIN(sizeof(buffera), towrite))) > 0)
- {
- chunk++;
- if (SAEximDebug > 8)
- {
- log_write(0, LOG_MAIN, "SA: Debug9: spamc body going to write chunk %d (read %.0f, %.0f left to write)", chunk, (double)stret, (double)towrite);
- }
- towrite-=stret;
- stret=write(writefd[1], buffer, stret);
- CHECKERR(stret,"body write in",__LINE__);
- if (SAEximDebug > 8)
- {
- log_write(0, LOG_MAIN, "SA: Debug9: Spamc body wrote chunk %d (wrote %.0f, %.0f left to write)", chunk, (double)stret, (double)towrite);
- }
- }
- CHECKERR(stret, "read body", __LINE__ - 14);
- close(writefd[1]);
-
- if (SAEximDebug > 5)
- {
- log_write(0, LOG_MAIN, "SA: Debug6: fed spam to spamc, reading result");
- }
-
- if (SAtimeout)
- {
- if (SAEximDebug > 2)
- {
- log_write(0, LOG_MAIN, "SA: Debug3: Setting timeout of %d secs before reading from spamc", SAtimeout);
- }
- /* SA can take very long to run for various reasons, let's not wait
- * forever, that's just bad at SMTP time */
- if (setjmp(jmp_env) == 0)
- {
- signal(SIGALRM, alarm_handler);
- alarm (SAtimeout);
- }
- else
- {
- /* Make sure that all your variables here are volatile or static */
- signal(SIGCHLD, old_sigchld);
- fclose((FILE *)readfh);
-
- header_add(' ', "X-SA-Exim-Scanned: No (on %s); SA Timed out after %d secs\n", primary_hostname, SAtimeout);
-
- /* We sent it to LOG_REJECT too so that we get a header dump */
- log_write(0, LOG_MAIN | LOG_REJECT, "SA: Action: spamd took more than %d secs to run, accepting message (scanned in %d/%d secs | Message-Id: %s). %s", SAtimeout, scantime, fulltime, safemesgid, mailinfo);
-
- ret=savemail(fd, fdstart, SAtimeoutsave, "SAtimeoutsave", (char *)mesgfn, SAerrmaxarchivebody, SAtimeoutSavCond);
- CHECKERR(ret,where,line);
-
- /* Make sure we kill spamc in case SIGPIPE from fclose didn't */
- kill(pid, SIGTERM);
- return LOCAL_SCAN_ACCEPT;
-
- }
- }
-
- /* Let's see what SA has to tell us about this mail and store the headers */
- while ((fgets((char *)buffer,sizeof(buffera),(FILE *) readfh)) != NULL)
- {
- /* Remove trailing newline */
- if (buffer[strlen(buffer)-1] == '\n')
- {
- buffer[strlen(buffer)-1]=0;
- }
-restart:
- if (SAEximDebug > 5)
- {
- log_write(0, LOG_MAIN, "SA: Debug6: spamc read: %s", buffer);
- }
-
- /* Let's handle special multi-line headers first, what a pain... */
- /* We feed the one line we read and the filehandle because we'll need
- to check whether more lines need to be concatenated */
- /* This is ugly, there is an order dependency so we return to the
- beginning of the loop without reading a new line since we already
- did that */
- if (parsemlheader(buffer, (FILE *)readfh, "Subject", NULL)) goto restart;
- if ((SARewriteBody == 1) && parsemlheader(buffer, (FILE *)readfh, "Content-Type", NULL)) goto restart;
- if ((SARewriteBody == 1) && parsemlheader(buffer, (FILE *)readfh, "Content-Transfer-Encoding", NULL)) goto restart;
-
- if (parsemlheader(buffer, (FILE *)readfh, "X-Spam-Flag", &xspamflag))
- {
- if (xspamflag[13] == 'Y')
- {
- isspam=1;
- }
- if (SAEximDebug > 2)
- {
- log_write(0, LOG_MAIN, "SA: Debug3: isspam read from X-Spam-Flag: %d", isspam);
- }
- goto restart;
- }
-
- if (parsemlheader(buffer, (FILE *)readfh, "X-Spam-Status", &xspamstatus))
- {
- char *start;
- char *end;
-
- gotsa=1;
-
- /* if we find the preconfigured greylist string (and it is defined
- * in sa-exim.conf), we can raise the threshold for tempreject just
- * for this mail, since it's been whitelisted */
- if (SAgreylistiswhitestr && strstr(xspamstatus, SAgreylistiswhitestr))
- {
- SAtemprejectthreshold+=SAgreylistraisetempreject;
- if (SAEximDebug > 2)
- {
- log_write(0, LOG_MAIN, "SA: Debug3: read %s string, SAtempreject is now changed to %f", SAgreylistiswhitestr, SAtemprejectthreshold);
- }
- }
- else
- {
- if (SAEximDebug > 2)
- {
- log_write(0, LOG_MAIN, "SA: Debug3: did not find read GREYLIST_ISWHITE string in X-Spam-Status");
- }
- }
-
- start=strstr(xspamstatus, "hits=");
- /* Support SA 3.0 format */
- if (start == NULL)
- {
- start=strstr(xspamstatus, "score=");
- }
-
- end=strstr(xspamstatus, " tests=");
- if (end == NULL)
- {
- if (SAEximDebug > 5)
- {
- log_write(0, LOG_MAIN, "SA: Debug6: Could not find old spamstatus format, trying new one...");
- }
- end=strstr(xspamstatus, "\n tests=");
- }
- if (start!=NULL && end!=NULL)
- {
- spamstatus=string_copyn(start, end-start);
- if (SAEximDebug > 2)
- {
- log_write(0, LOG_MAIN, "SA: Debug3: Read from X-Spam-Status: %s", spamstatus);
- }
- }
- else
- {
- PANIC(string_sprintf("SA: could not parse X-Spam-Status: to extract hits and required. Bad!. Got: '%s'", xspamstatus));
- }
-
- start=strstr(spamstatus, "=");
- end=strstr(spamstatus, " ");
- if (start!=NULL && end!=NULL)
- {
- start++;
- sscanf(start, "%f", &spamvalue);
- }
- else
- {
- PANIC(string_sprintf("SA: spam value extract failed in '%s'. Bad!", xspamstatus));
- }
-
- goto restart;
- }
-
- if (parsemlheader(buffer, (FILE *)readfh, "X-Spam-", NULL)) goto restart;
-
- /* Ok, now we can do normal processing */
-
- /* If no more headers here, we're done */
- if (buffer[0] == 0)
- {
- if (SAEximDebug > 5)
- {
- log_write(0, LOG_MAIN, "SA: Debug6: spamc read got newline, end of headers", buffer);
- }
- goto exit;
- }
-
- if (compare_header(buffer, "Message-Id: "))
- {
- char *start;
- char *end;
- char *mesgid=NULL;
-
- start=strchr(buffer, '<');
- end=strchr(buffer, '>');
-
- if (start == NULL || end == NULL)
- {
- /* we keep the default mesgfn (unix date in seconds) */
- if (SAEximDebug)
- {
- log_write(0, LOG_MAIN, "SA: Debug: Could not get Message-Id from %s", buffer);
- }
- }
- else if ((mesgid=string_copyn(start+1,end-start-1)) && mesgid[0])
- {
- /* We replace the exim Message-ID with the one read from
- the message * as we use this to detect dupes when we
- send 45x and get the same * message multiple times */
- safemesgid=cleanmsgid(mesgid, SAsafemesgidchars);
- mesgfn=string_sprintf("%d_%s", time(NULL), safemesgid);
-
- if (SAEximDebug > 5)
- {
- log_write(0, LOG_MAIN, "SA: Debug6: Message-Id received and cleaned as: %s", safemesgid);
- }
- }
- continue;
- }
- }
-
- exit:
-
-
- if (isspam && SARewriteBody == 1)
- {
- int line;
-
- if (SAEximDebug)
- {
- log_write(0, LOG_MAIN, "SA: Debug: SARewriteBody == 1, rewriting message body");
- }
-
- /* already read from fd? Better reset it... */
- ret=lseek(fd, fdstart, SEEK_SET);
- CHECKERR(ret, "lseek reset on spooled message", __LINE__);
-
- line=1;
- while ((fgets((char *)buffer,sizeof(buffera),(FILE *) readfh)) != NULL)
- {
- if (SAEximDebug > 8)
- {
- log_write(0, LOG_MAIN, "SA: Debug9: Read body from SA; line %d (read %d)", line, strlen(buffer));
- }
-
- stret=write(fd, buffer, strlen(buffer));
- CHECKERR(stret,string_sprintf("SA body write to msg"),__LINE__);
- if (SAEximDebug > 8)
- {
- log_write(0, LOG_MAIN, "SA: Debug9: Wrote to msg; line %d (wrote %d)", line, ret);
- }
- if (buffer[strlen(buffer)-1] == '\n')
- {
- line++;
- }
- }
-
-/* if (SAEximDebug > 1)
- {
- log_write(0, LOG_MAIN, "SA: Debug2: body_linecount before SA: %d", body_linecount);
- }
-*/
- /* update global variable $body_linecount to reflect the new body size*/
-/* body_linecount = (line - 1);
-
- if (SAEximDebug > 1)
- {
- log_write(0, LOG_MAIN, "SA: Debug2: body_linecount after SA: %d", body_linecount);
- }
-*/
- }
-
- fclose((FILE *)readfh);
-
- afterscan=time(NULL);
- scantime=afterscan-beforescan;
-
- wait(&ret);
- signal(SIGCHLD, old_sigchld);
-
- if (ret)
- {
- sprintf(buffer, "%d", ret);
- PANIC(string_sprintf("wait on spamc child yielded, %s", buffer));
- }
-
- afterwait=time(NULL);
- fulltime=afterwait-beforescan;
-
- if(!SAaddSAEheaderBeforeSA)
- {
- AddSAEheaders((char *)rcptlist, SAmaxrcptlistlength);
- }
-
- header_add(' ', "X-SA-Exim-Version: %s\n",version);
-
- if (gotsa == 0)
- {
- header_add(' ', "X-SA-Exim-Scanned: No (on %s); Unknown failure\n", primary_hostname);
- log_write(0, LOG_MAIN, "SA: Action: SA didn't successfully run against message, accepting (time: %d/%d secs | Message-Id: %s). %s", scantime, fulltime, safemesgid, mailinfo);
- return LOCAL_SCAN_ACCEPT;
- }
-
- header_add(' ', "X-SA-Exim-Scanned: Yes (on %s)\n", primary_hostname);
-
- if (spamstatus == NULL)
- {
- spamstatus = (char *) nospamstatus;
- }
- if (isspam)
- {
- int dorej=1;
- int doteergrube=0;
-
- if (SAEximRejCond[0] != '1' || SAEximRejCond[1] != 0)
- {
- expand=expand_string(SAEximRejCond);
- if (expand == NULL)
- {
- PANIC(string_sprintf("SAEximRejCond expansion failure on %s", SAEximRejCond));
- }
-
- if (SAEximDebug)
- {
- log_write(0, LOG_MAIN, "SA: Debug: SAEximRejCond expand returned: '%s'", expand);
- }
-
- if (expand[0] == 0 || (expand[0] == '0' && expand[1] == 0))
- {
- log_write(0, LOG_MAIN, "SA: Notice: SAEximRejCond expanded to false, not applying reject rules");
- dorej=0;
- }
- }
-
- if (dorej && spamvalue >= SAteergrubethreshold)
- {
- doteergrube=1;
- if (SAteergrubecond[0] != '1' || SAteergrubecond[1] != 0)
- {
- expand=expand_string(SAteergrubecond);
- if (expand == NULL)
- {
- PANIC(string_sprintf("SAteergrubecond expansion failure on %s", SAteergrubecond));
- }
-
- if (SAEximDebug)
- {
- log_write(0, LOG_MAIN, "SA: Debug: SAteergrubecond expand returned: '%s'", expand);
- }
-
- if (expand[0] == 0 || (expand[0] == '0' && expand[1] == 0))
- {
- log_write(0, LOG_MAIN, "SA: Notice: SAteergrubecond expanded to false, not teergrubing known peer");
- doteergrube=0;
- }
- }
- }
-
- if (dorej && doteergrube)
- {
- char *teergrubewaitstr;
- teergrubewaitstr=string_sprintf(SAmsgteergrubewait, spamstatus);
-
- /* By default, we'll only save temp bounces by message ID so
- * that when the same message is submitted several times, we
- * overwrite the same file on disk and not create a brand new
- * one every single time */
- if (SAteergrubeoverwrite)
- {
- ret=savemail(fd, fdstart, SAteergrubesave, "SAteergrubesave", safemesgid, SAmaxarchivebody, SAteergrubeSavCond);
- CHECKERR(ret,where,line);
- }
- else
- {
- ret=savemail(fd, fdstart, SAteergrubesave, "SAteergrubesave", (char *)mesgfn, SAmaxarchivebody, SAteergrubeSavCond);
- CHECKERR(ret,where,line);
- }
-
- spamstatus=string_sprintf("%s trigger=%.1f", spamstatus, SAteergrubethreshold);
- /* Exim might want to stop us if we run for too long, but that's
- * exactly what we're trying to do, so let's override that */
- alarm(0);
-
- for (i=0;i<SAteergrubetime/10;i++)
- {
- smtp_printf("451-%s\r\n", teergrubewaitstr);
- ret=smtp_fflush();
- if (ret != 0)
- {
- log_write(0, LOG_MAIN | LOG_REJECT, "SA: Action: teergrubed sender for %d secs until it closed the connection: %s (scanned in %d/%d secs | Message-Id: %s). %s", i*10, spamstatus, scantime, fulltime, safemesgid, mailinfo);
- /* The other side closed the connection, nothing to print */
- *return_text="";
- return LOCAL_SCAN_TEMPREJECT_NOLOGHDR;
- }
- sleep(10);
- }
-
- log_write(0, LOG_MAIN | LOG_REJECT, "SA: Action: teergrubed sender until full configured duration of %d secs: %s (scanned in %d/%d secs | Message-Id: %s). %s", SAteergrubetime, spamstatus, scantime, fulltime, safemesgid, mailinfo);
- *return_text=string_sprintf(SAmsgteergruberej, spamstatus);
- return LOCAL_SCAN_TEMPREJECT_NOLOGHDR;
- }
- else if (dorej && spamvalue >= SAdevnullthreshold)
- {
- ret=savemail(fd, fdstart, SAdevnullsave, "SAdevnullsave", (char *)mesgfn, SAmaxarchivebody, SAdevnullSavCond);
- CHECKERR(ret,where,line);
-
- recipients_count=0;
- spamstatus=string_sprintf("%s trigger=%.1f", spamstatus, SAdevnullthreshold);
- log_write(0, LOG_REJECT | LOG_MAIN, "SA: Action: silently tossed message: %s (scanned in %d/%d secs | Message-Id: %s). %s", spamstatus, scantime, fulltime, safemesgid, mailinfo);
- return LOCAL_SCAN_ACCEPT;
- }
- else if (dorej && spamvalue >= SApermrejectthreshold)
- {
- ret=savemail(fd, fdstart, SApermrejectsave, "SApermrejectsave", (char *)mesgfn, SAmaxarchivebody, SApermrejectSavCond);
- CHECKERR(ret,where,line);
-
- spamstatus=string_sprintf("%s trigger=%.1f", spamstatus, SApermrejectthreshold);
- log_write(0, LOG_MAIN | LOG_REJECT, "SA: Action: permanently rejected message: %s (scanned in %d/%d secs | Message-Id: %s). %s", spamstatus, scantime, fulltime, safemesgid, mailinfo);
- *return_text=string_sprintf(SAmsgpermrej, spamstatus);
- return LOCAL_SCAN_REJECT_NOLOGHDR;
- }
- else if (dorej && spamvalue >= SAtemprejectthreshold)
- {
- /* Yeah, gotos are harmful, but that'd be a function with a lot
- * of options to send, so, here's a small shortcut */
- goto dotempreject;
- }
- else
- {
- ret=savemail(fd, fdstart, SAspamacceptsave, "SAspamacceptsave", (char *)mesgfn, SAmaxarchivebody, SAspamacceptSavCond);
- CHECKERR(ret,where,line);
- log_write(0, LOG_MAIN, "SA: Action: flagged as Spam but accepted: %s (scanned in %d/%d secs | Message-Id: %s). %s", spamstatus, scantime, fulltime, safemesgid, mailinfo);
- return LOCAL_SCAN_ACCEPT;
- }
- }
- else
- {
- /* This is an exception to the rule, for grey listing, we allow for
- * sending back a tempreject on SA scores that aren't considered as
- * spam (greylisting is now done directly in spamassassin though */
- if (spamvalue >= SAtemprejectthreshold)
- {
- dotempreject:
-
- /* By default, we'll only save temp bounces by message ID so
- * that when the same message is submitted several times, we
- * overwrite the same file on disk and not create a brand new
- * one every single time */
- if (SAtemprejectoverwrite)
- {
- ret=savemail(fd, fdstart, SAtemprejectsave, "SAtemprejectsave", safemesgid, SAmaxarchivebody, SAtemprejectSavCond);
- CHECKERR(ret,where,line);
- }
- else
- {
- ret=savemail(fd, fdstart, SAtemprejectsave, "SAtemprejectsave", (char *)mesgfn, SAmaxarchivebody, SAtemprejectSavCond);
- CHECKERR(ret,where,line);
- }
-
- spamstatus=string_sprintf("%s trigger=%.1f", spamstatus, SAtemprejectthreshold);
- log_write(0, LOG_MAIN | LOG_REJECT, "SA: Action: temporarily rejected message: %s (scanned in %d/%d secs | Message-Id: %s). %s", spamstatus, scantime, fulltime, safemesgid, mailinfo);
- *return_text=string_sprintf(SAmsgtemprej, spamstatus);
- return LOCAL_SCAN_TEMPREJECT_NOLOGHDR;
- }
- else
- {
- ret=savemail(fd, fdstart, SAnotspamsave, "SAnotspamsave", (char *)mesgfn, SAmaxarchivebody, SAnotspamSavCond);
- CHECKERR(ret,where,line);
- log_write(0, LOG_MAIN, "SA: Action: scanned but message isn't spam: %s (scanned in %d/%d secs | Message-Id: %s). %s", spamstatus, scantime, fulltime, safemesgid, mailinfo);
- return LOCAL_SCAN_ACCEPT;
- }
- }
-
-
-
- errexit:
- if (SAtemprejectonerror)
- {
- log_write(0, LOG_MAIN | LOG_PANIC, "SA: PANIC: Unexpected error on %s, file "__FILE__", line %d: %s", where, line-1, strerror(errno));
- }
- else
- {
- log_write(0, LOG_MAIN, "SA: PANIC: Unexpected error on %s (but message was accepted), file "__FILE__", line %d: %s", where, line-1, strerror(errno));
- }
-
- header_add(' ', "X-SA-Exim-Scanned: No (on %s); Exit with error (see exim mainlog)\n", primary_hostname);
-
- ret=savemail(fd, fdstart, SAerrorsave, "SAerrorsave", (char *)mesgfn, SAerrmaxarchivebody, SAerrorSavCond);
- if (ret < 0)
- {
- log_write(0, LOG_MAIN | LOG_PANIC, "SA: PANIC: Error in error handler while trying to save mail to %s, file "__FILE__", line %d: %s", string_sprintf("%s/%s", SAerrorsave, mesgfn), __LINE__ - 3, strerror(errno));
- }
-
- if (SAtemprejectonerror)
- {
- *return_text=SAmsgerror;
- return LOCAL_SCAN_TEMPREJECT_NOLOGHDR;
- }
- else
- {
- return LOCAL_SCAN_ACCEPT;
- }
-
-
- panicexit:
- if (SAtemprejectonerror)
- {
- log_write(0, LOG_MAIN | LOG_PANIC, "SA: PANIC: %s", panicerror);
- }
- else
- {
- log_write(0, LOG_MAIN | LOG_PANIC, "SA: PANIC: %s (but message was accepted)", panicerror);
- }
-
- header_add(' ', "X-SA-Exim-Scanned: No (on %s); Panic (see exim mainlog)\n", primary_hostname);
-
- ret=savemail(fd, fdstart, SAerrorsave, "SAerrorsave", (char *)mesgfn, SAerrmaxarchivebody, SAerrorSavCond);
- if (ret < 0)
- {
- log_write(0, LOG_MAIN | LOG_PANIC , "SA: PANIC: Error in error handler while trying to save mail to %s, file "__FILE__", line %d: %s", string_sprintf("%s/%s", SAerrorsave, mesgfn), __LINE__ - 3, strerror(errno));
- }
-
- if (SAtemprejectonerror)
- {
- *return_text=SAmsgerror;
- return LOCAL_SCAN_TEMPREJECT_NOLOGHDR;
- }
- else
- {
- return LOCAL_SCAN_ACCEPT;
- }
-}
Index: branches/experimental/version
===================================================================
--- branches/experimental/version (revision 29)
+++ branches/experimental/version (nonexistent)
@@ -1 +0,0 @@
-4.2.1