Commit | Line | Data |
---|---|---|
59371ea7 PH |
1 | # max_rcpt and connection_max_messages (2x parallel) |
2 | need_ipv4 | |
3 | # | |
4 | # There are deliveries in parallel in this script, and the processes that | |
5 | # run in parallel may not finish in the same order on different hosts. (Indeed, | |
6 | # they always seem to finish in precisely the opposite orders on Linux and | |
7 | # FreeBSD.) For that reason, we do a hacked-up sort on the log file right at | |
8 | # the end, to ensure that the log lines are always in the same order. | |
9 | # | |
10 | exim -odq a b c d e f | |
11 | . | |
12 | **** | |
13 | server PORT_S 2 | |
14 | 220 ESMTP | |
15 | EHLO | |
16 | 250-OK | |
17 | 250 HELP | |
18 | MAIL FROM: | |
19 | 250 Sender OK | |
20 | RCPT TO: | |
21 | 250 Recipient OK | |
22 | RCPT TO: | |
23 | 250 Recipient OK | |
24 | DATA | |
25 | 354 Send data | |
26 | . | |
27 | 250 OK | |
28 | MAIL FROM: | |
29 | 250 Sender OK | |
30 | RCPT TO: | |
31 | 550 Recipient not OK | |
32 | QUIT | |
33 | 250 OK | |
34 | *eof | |
35 | 220 ESMTP | |
36 | EHLO | |
37 | 250-OK | |
38 | 250 HELP | |
39 | MAIL FROM: | |
40 | 250 Sender OK | |
41 | RCPT TO: | |
42 | 550 Recipient not OK | |
43 | RCPT TO: | |
44 | 250 Recipient OK | |
45 | DATA | |
46 | 354 Send data | |
47 | . | |
48 | 250 OK | |
49 | MAIL FROM: | |
50 | 250 Sender OK | |
51 | RCPT TO: | |
52 | 250 Recipient OK | |
53 | DATA | |
54 | 354 Send data | |
55 | . | |
56 | 250 OK | |
57 | QUIT | |
58 | 250 OK | |
59 | **** | |
60 | exim -q | |
61 | **** | |
62 | exim -q | |
63 | **** | |
64 | exim -odq a b c d e f g h | |
65 | . | |
66 | **** | |
67 | server PORT_S 2 | |
68 | 220 ESMTP | |
69 | EHLO | |
70 | 250-OK | |
71 | 250 HELP | |
72 | MAIL FROM: | |
73 | 250 Sender OK | |
74 | RCPT TO: | |
75 | 550 Recipient not OK | |
76 | RCPT TO: | |
77 | 550 Recipient not OK | |
78 | RSET | |
79 | 250 OK | |
80 | MAIL FROM: | |
81 | 250 Sender OK | |
82 | RCPT TO: | |
83 | 250 Recipient OK | |
84 | RCPT TO: | |
85 | 250 Recipient OK | |
86 | DATA | |
87 | 354 Send data | |
88 | . | |
89 | 250 OK | |
90 | QUIT | |
91 | 250 OK | |
92 | *eof | |
93 | 220 ESMTP | |
94 | EHLO | |
95 | 250-OK | |
96 | 250 HELP | |
97 | MAIL FROM: | |
98 | 250 Sender OK | |
99 | RCPT TO: | |
100 | 550 Recipient not OK | |
101 | RCPT TO: | |
102 | 550 Recipient not OK | |
103 | RSET | |
104 | 250 OK | |
105 | MAIL FROM: | |
106 | 250 Sender OK | |
107 | RCPT TO: | |
108 | 250 Recipient OK | |
109 | RCPT TO: | |
110 | 250 Recipient OK | |
111 | DATA | |
112 | 354 Send data | |
113 | . | |
114 | 250 OK | |
115 | QUIT | |
116 | 250 OK | |
117 | **** | |
118 | exim -q | |
119 | **** | |
120 | exim -q | |
121 | **** | |
122 | # This is the hack to sort the log lines. Search for groups of delivery log | |
123 | # lines (**, =>, and -> lines), and sort them according to the local part of | |
124 | # the address. | |
125 | # | |
126 | sudo perl | |
127 | open(IN, "DIR/spool/log/mainlog") || | |
128 | die "Can't open DIR/spool/log/mainlog: $!\n"; | |
129 | @lines = <IN>; | |
130 | close(IN); | |
131 | ||
132 | for ($i = 0; $i < @lines; $i++) | |
133 | { | |
134 | next unless $lines[$i] =~ / \*\* | => | -> /; | |
135 | for ($j = $i + 1; $j < @lines; $j++) | |
136 | { last if $lines[$j] !~ / \*\* | => | -> /; } | |
137 | ||
138 | @sublist = splice @lines, $i, $j - $i; | |
139 | @sublist = sort { | |
140 | my($x) = $a =~ /(?: \*\* | => | -> )([^@]+)/; | |
141 | my($y) = $b =~ /(?: \*\* | => | -> )([^@]+)/; | |
142 | return $x cmp $y; | |
143 | } @sublist; | |
144 | ||
145 | splice @lines, $i, 0, @sublist; | |
146 | $i = $j; | |
147 | } | |
148 | ||
149 | open (OUT, ">DIR/spool/log/mainlog") || | |
150 | die "Can't open DIR/spool/log/mainlog: $!\n"; | |
151 | print OUT @lines; | |
152 | close(OUT); | |
153 | **** |