aboutsummaryrefslogtreecommitdiffstats
path: root/mail/qmail-scanner1/files/patch-qmail-scanner-queue.template
blob: ad27289790329f1075b4c6816adeaf6d7a9268ea (plain) (blame)
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
--- qmail-scanner-queue.template.orig   Wed Mar 10 21:02:05 2004
+++ qmail-scanner-queue.template    Mon Mar 15 01:26:52 2004
@@ -85,11 +85,17 @@
 
 
 #From: line  information used when making reports
-my $V_FROM='USERNAME@MAILDOMAIN';
-my $V_FROMNAME='System Anti-Virus Administrator';
+my $V_FROM='ADMIN_MAIL';
+my $V_FROMNAME='ADMIN_REALNAME';
 
 # Address carbon-copied on any virus reports
-my $QUARANTINE_CC='USERNAME@MAILDOMAIN';
+my $QUARANTINE_CC='ADMIN_MAIL';
+
+# Address to where spams are redirected
+my $SPAMSADMIN='SPAMS_REDIRECT';
+
+# Suffix to alter recipients with (when spam detected)
+my $SPAMSSUFFIX='SPAMS_TOSUFFIX';
 
 #Array of local domains that are checked against for
 #deciding whether or not to send recipient alerts to
@@ -302,6 +308,7 @@
 }
 
 my ($quarantine_event,$quarantine_event_tmp,$quarantine_DOS)=0;
+my $spam_event=0;
 
 my $file_id = &uniq_id();
 
@@ -424,7 +431,18 @@
     &email_quarantine_report;
   } else {
     &qmail_parent_check;
-    &qmail_requeue($env_returnpath,$env_recips,"$scandir/$wmaildir/new/$file_id"); 
+    if ($spam_event) {
+      if ($SPAMSADMIN) {
+        &qmail_requeue($env_returnpath,"T$SPAMSADMIN\0\0","$scandir/$wmaildir/new/$file_id"); 
+      } elsif ($SPAMSSUFFIX) {
+   $env_recips =~ s/\@/\-$SPAMSSUFFIX\@/g;
+        &qmail_requeue($env_returnpath,$env_recips,"$scandir/$wmaildir/new/$file_id"); 
+      } else {
+        &qmail_requeue($env_returnpath,$env_recips,"$scandir/$wmaildir/new/$file_id"); 
+      }
+    } else {
+      &qmail_requeue($env_returnpath,$env_recips,"$scandir/$wmaildir/new/$file_id"); 
+    }
   }
   alarm 0;
 };