1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-10-21 20:38:45 +00:00
freebsd-ports/mail/qmail-scanner1/files/patch-qmail-scanner-queue.template
Sergei Kolobov 46a4563118 Add qmail-scanner 1.20.r4, Content/Anti-virus Scanner for qmail.
Qmail-Scanner is e-mail content scanner that enables a qmail server to
scan all messages it receives for certain characteristics (normally viruses),
and react accordingly.

If you have a commercial virus scanner (eg, Sophos sweep, McAfee
uvscan, etc) installed when you build qmail-scanner, qmail-scanner
will configure itself to use that.  Otherwise, it will only use its
internal content filter which only allows you to block mail based
on text in the subject/body, general types of attachments, etc.

WWW:	http://qmail-scanner.sourceforge.net/

PR:		55941
Submitted by:	moeti <freebsd@simplerezo.com>
2003-12-11 11:40:35 +00:00

52 lines
1.6 KiB
Plaintext

--- qmail-scanner-queue.template.orig Thu Oct 16 02:05:10 2003
+++ qmail-scanner-queue.template Thu Dec 11 14:28:48 2003
@@ -85,11 +85,17 @@ $qsmsgid=tolower("$V_HEADER-message-id")
#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
@@ -294,6 +300,7 @@ if (! -d "$scandir/tmp") {
}
my $quarantine_event=0;
+my $spam_event=0;
my $file_id = &uniq_id();
@@ -415,7 +422,18 @@ eval {
&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;
};