]> git.pld-linux.org Git - packages/amavis-ng.git/blob - amavis-ng-courier.patch
0d59f9db68accb1d5ab08a333d7822ca4f756ec6
[packages/amavis-ng.git] / amavis-ng-courier.patch
1 diff -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    
42 diff -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-23 12:07:46.000000000 +0000
45 @@ -1044,36 +1044,33 @@
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 +chown daemon.daemon /etc/courier/filters/perlfilter*
74 +filterctl start perlfilter
75 +@end verbatim
76 +@end example
77 +
78  @itemize @bullet
79  @item
80  @cite{courierfilter(8)}
81  @item
82  @cite{courierperlfilter(8)}
83  @end itemize
84 -After configuring a working perlfilter, put the following line into@*
85 -@file{/etc/courier/filters/perlfilter}, substituting the pathname to
86 -@command{amavis} with the correct path for your installation:
87 -
88 -@example
89 -@verbatim
90 -/usr/bin/amavis
91 -@end verbatim
92 -@end example
93  
94  Reload the perlfilter and start the virus filter with the commands:
95  
96 diff -Nur old/etc/amavis.conf new/etc/amavis.conf
97 --- old/etc/amavis.conf 2003-04-08 14:09:56.000000000 +0000
98 +++ new/etc/amavis.conf 2004-07-15 16:20:34.000000000 +0000
99 @@ -54,7 +54,7 @@
100  ; notifiers=Sender, Recipients, Admin
101  
102  ;; What should be inserted into the message's headers if it is let
103 -;; through? This does not work for the Milter or Courier interfaces.
104 +;; through? This does not work for the Milter interface.
105  
106  ; x-header = true
107  ; x-header-tag = X-Scanned-By
This page took 0.030154 seconds and 2 git commands to generate.