aboutsummaryrefslogtreecommitdiffstats
path: root/LIST/minimalist-251-251.2.diff
blob: 929bdd054c3ff9bbac09fbb7dde2adf110a7bf71 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
--- minimalist.pl	2004-02-19 15:26:30.000000000 +0200
+++ minimalist-2.5.2.2.pl	2004-03-04 10:51:43.000000000 +0200
@@ -29,7 +29,7 @@
 use Fcntl ':flock';	# LOCK_* constants
 use integer;
 
-$version = '2.5(1) (Idleness)';
+$version = '2.5(1.2) (Idleness)';
 $config = "/usr/local/etc/minimalist.conf";
 
 # Program name and arguments for launching if commands in message's body
@@ -379,6 +379,10 @@
  chdir("$directory/$list");
  read_config("config");
 
+ # Check and remove X-Been-There
+ if ($header =~ s/(^|\n)x-been-there:\s+(.*)\n/$1/i) {
+   exit 0 if ($2 eq "$list\@$domain"); }
+
  if ($modify_subject ne 'no') {
    $orig_subj = $subject;
    if ($modify_subject eq 'more') {	# Remove leading "Re: "
@@ -555,9 +559,8 @@
     }		# list's gecos
 
    # Remove conflicting headers
-   $header =~ s/x-list-server:\s+.*\n([ \t]+.*\n)*//ig;
-   $header =~ s/x-sender:\s+.*\n([ \t]+.*\n)*//ig;
-   $header =~ s/precedence:\s+.*\n//ig;
+   $header =~ s/(^|\n)x-list-server:\s+.*\n([ \t]+.*\n)*/$1/ig;
+   $header =~ s/(^|\n)precedence:\s+.*\n/$1/ig;
 
    if ($remove_resent eq 'yes') {
      $header =~ s/(^|\n)(resent-.*\n([ \t]+.*\n)*)*/$1/ig;
@@ -571,7 +574,7 @@
 
    chomp ($header);
    $header .= "\nPrecedence: list\n";	# For vacation and similar programs
-#   $header .= "X-Sender: $mesender\n";
+   $header .= "X-Been-There: $list\@$domain\n";
 
    # Remove original Reply-To unconditionally, set configured one if it is
    $header =~ s/(^|\n)reply-to:\s+.*\n([ \t]+.*\n)*/$1/ig;
@@ -989,6 +992,7 @@
 	 if ($bound eq $boundary[$level]."--") { $difflevel = 1; }
 	 # End of previous level?
 	 elsif ($bound eq $boundary[$level-1]."--") { $difflevel = 2; }
+	 else { $difflevel = 0; }
 
 	 if ($difflevel) {
 	   $pos += 1; $level -= $difflevel;