]> git.pld-linux.org Git - packages/amavis-ng.git/blame - amavis-ng-courier.patch
- added logrotate script
[packages/amavis-ng.git] / amavis-ng-courier.patch
CommitLineData
496903fa
AA
1diff -Nur old/AMAVIS/MTA/Courier.pm new/AMAVIS/MTA/Courier.pm
2--- old/AMAVIS/MTA/Courier.pm 2003-03-17 23:04:11.000000000 +0000
3+++ new/AMAVIS/MTA/Courier.pm 2004-07-15 16:22:43.000000000 +0000
4@@ -97,7 +97,7 @@
5 my $message_id;
6 while (1) {
7 $message_id = sprintf("%.8x-%.4x",time,$$);
8- unless (defined mkpath ($prefix.$message_id, 0, 0770)) {
9+ unless (defined mkpath ($prefix.$message_id, 0, 0775)) {
10 if (++$i > 10) {
11 return 0;
12 }
13@@ -174,19 +174,16 @@
14 my $args = shift;
15 writelog($args,LOG_INFO, __PACKAGE__.": Accepting message");
16
17- #TODO Courier filters cannot rewrite MIME messages, we'd like
18- #to be able to add a header or something to this message but
19- #we can't.(yet). Sorry
20-
21 ##Rewrite the message in the queue if we need to add a header
22- #if ($cfg_x_header) {
23- # my $queuefile = IO::File->new("+>$$args{'messagefile'}");
24- # print $queuefile "$cfg_x_header_tag: $cfg_x_header_line\n";
25- # while (my $line=$$args{'filehandle'}->getline()) {
26- # print $queuefile $line;
27- # }
28- # close($queuefile);
29- #}
30+ if ($cfg_x_header) {
31+ my $queuefile = IO::File->new("+>$$args{'messagefile'}");
32+ print $queuefile "$cfg_x_header_tag: $cfg_x_header_line\n";
33+ while (my $line=$$args{'filehandle'}->getline()) {
34+ print $queuefile $line;
35+ }
36+ print STDOUT $queuefile;
37+ close($queuefile);
38+ }
39
40 $$args{'status'} = 'accept';
41
45b6273d
AA
42diff -Nur old/doc/amavis-ng.texi new/doc/amavis-ng.texi
43--- old/doc/amavis-ng.texi 2003-04-14 15:18:47.000000000 +0000
44+++ new/doc/amavis-ng.texi 2004-07-22 21:31:38.000000000 +0000
45@@ -1044,36 +1044,32 @@
46
47 @example
48 @verbatim
49-chown -R daemon:daemon /var/spool/amavis-ng/quarantine/
50+chown -R daemon /var/{spool,log}/amavis-ng/
51 @end verbatim
52 @end example
53
54 @node Configuring Courier to use @command{AMaViS-ng}
55 @subsubsection Configuring Courier to use @command{AMaViS-ng}
56-
57 When @command{AMaViS-ng} is configured for Courier support, the program
58 @command{amavis} is the application which should be configured for use with
59-@command{perlfilter}. Proper configuation of the Courier perlfilter interface
60-is beyond the scope of this document. It is suggested that the
61-reader attempt to configure the @command{perlfilter-example.pl} perlfilter
62-as distributed with Courier in order to ensure a proper and working
63-@command{perlfilter} installation before proceeding. The following man
64-pages distribute with Courier may also prove helpful:
65+@command{perlfilter}.
66+
67+Example perlfilter configuration:
68+@example
69+@verbatim
70+echo "all" > /etc/courier/filters/perlfilter-mode
71+echo "30" > /etc/courier/filters/perlfilter-numprocs
72+echo "/usr/bin/amavis" > /etc/courier/filters/perlfilter
73+filterctl start perlfilter
74+@end verbatim
75+@end example
76+
77 @itemize @bullet
78 @item
79 @cite{courierfilter(8)}
80 @item
81 @cite{courierperlfilter(8)}
82 @end itemize
83-After configuring a working perlfilter, put the following line into@*
84-@file{/etc/courier/filters/perlfilter}, substituting the pathname to
85-@command{amavis} with the correct path for your installation:
86-
87-@example
88-@verbatim
89-/usr/bin/amavis
90-@end verbatim
91-@end example
92
93 Reload the perlfilter and start the virus filter with the commands:
94
496903fa
AA
95diff -Nur old/etc/amavis.conf new/etc/amavis.conf
96--- old/etc/amavis.conf 2003-04-08 14:09:56.000000000 +0000
97+++ new/etc/amavis.conf 2004-07-15 16:20:34.000000000 +0000
98@@ -54,7 +54,7 @@
99 ; notifiers=Sender, Recipients, Admin
100
101 ;; What should be inserted into the message's headers if it is let
102-;; through? This does not work for the Milter or Courier interfaces.
103+;; through? This does not work for the Milter interface.
104
105 ; x-header = true
106 ; x-header-tag = X-Scanned-By
This page took 0.065122 seconds and 4 git commands to generate.