View | Details | Raw Unified | Return to bug 268087 | Differences between
and this patch

Collapse All | Expand All

(-)maia/Makefile (-1 / +1 lines)
Lines 1-6 Link Here
1
PORTNAME=	maia
1
PORTNAME=	maia
2
DISTVERSION=	1.0.4
2
DISTVERSION=	1.0.4
3
PORTREVISION=	10
3
PORTREVISION=	11
4
CATEGORIES=	security
4
CATEGORIES=	security
5
5
6
MAINTAINER=	ek@purplehat.org
6
MAINTAINER=	ek@purplehat.org
(-)maia/files/patch-maia.conf.dist (-3 / +65 lines)
Lines 1-6 Link Here
1
--- maia.conf.dist.orig	2022-04-25 16:08:35 UTC
1
--- maia.conf.dist.orig	2022-03-02 01:05:20 UTC
2
+++ maia.conf.dist
2
+++ maia.conf.dist
3
@@ -52,7 +52,7 @@ $local_cf_dir = undef;  # default: let the script find
3
@@ -1,7 +1,7 @@
4
 ###################################################################
5
 #           Maia Mailguard Script Configuration File              #
6
 #                                                                 #
7
-# This file (/etc/maia.conf) contains configuration information   #
8
+# This file (/usr/local/etc/maia/maia.conf) contains configuration information   #
9
 # used by Maia Mailguard's Perl maintenance scripts.              #
10
 ###################################################################
11
 
12
@@ -9,16 +9,16 @@
13
 $dsn = 'DBI:mysql:maia:localhost:3306';
14
 
15
 # Your Maia database user's login name
16
-$username = 'maia';
17
+$username = 'vscan';
18
 
19
 # Your Maia database user's password
20
 $password = 'password';
21
 
22
 # The directory where Maia's Perl scripts can be found.
23
-$script_dir = '/var/lib/maia/scripts';
24
+$script_dir = '/usr/local/share/maia/scripts';
25
 
26
 # Location of your sa-learn script
27
-$sa_learn = '/usr/bin/sa-learn';
28
+$sa_learn = '/usr/local/bin/sa-learn';
29
 
30
 # Address rewriting type [0..5] (see config.php)
31
 $address_rewriting_type = 0;
32
@@ -45,19 +45,19 @@ $preserve_case = 0;
33
 # The directory where SpamAssassin's local.cf file can be found.
34
 #$local_cf_dir = '/etc/mail/spamassassin';
35
 #$local_cf_dir = '/etc/spamassassin';
36
-$local_cf_dir = undef;  # default: let the script find it
37
+$local_cf_dir = '/usr/local/etc/mail/spamassassin';  # default: let the script find it
38
 
39
 # The directory where SpamAssassin's core rules can be found.
40
 # If you wish to specify the directory yourself, you can use the 
4
 # %%VERSION%% macro to replace the actual SpamAssassin version number.
41
 # %%VERSION%% macro to replace the actual SpamAssassin version number.
5
 #$system_rules_dir = '/usr/share/spamassassin';
42
 #$system_rules_dir = '/usr/share/spamassassin';
6
 #$system_rules_dir = '/var/lib/spamassassin/%%VERSION%%';  # sa-update
43
 #$system_rules_dir = '/var/lib/spamassassin/%%VERSION%%';  # sa-update
Lines 8-11 Link Here
8
+$system_rules_dir = '/var/db/spamassassin';  # default: let the script find it
45
+$system_rules_dir = '/var/db/spamassassin';  # default: let the script find it
9
 
46
 
10
 # The directory where your amavis user's user_prefs file can be found.
47
 # The directory where your amavis user's user_prefs file can be found.
11
 #$user_rules_dir = '/var/lib/maia/.spamassassin';
48
-#$user_rules_dir = '/var/lib/maia/.spamassassin';
49
+#$user_rules_dir = '/usr/local/share/maia/.spamassassin';
50
 #$user_rules_dur = '~/.spamassassin';
51
-$user_rules_dir = undef;  # default: let the script find it
52
+$user_rules_dir = '/var/maiad/.spamassassin';  # default: let the script find it
53
 
54
 
55
 ### process-quarantine.pl
56
@@ -96,7 +96,7 @@ $log_dir = '/var/log/maia';
57
 $workers = 10;
58
 
59
 # Location of your encryption key file, or undef to disable
60
-#$key_file = '/var/lib/maia/blowfish.key';
61
+#$key_file = '/usr/local/share/maia/blowfish.key';
62
 $key_file = undef;
63
 
64
 # Items larger than this size (in bytes) will not be learned/reported.
65
@@ -156,7 +156,7 @@ $mail_types = 1 + 2 + 4 + 8 + 16;
66
 $base_url = 'http://example.com/';
67
 
68
 # Template directory
69
-$template_dir = '/etc/maia/templates/';
70
+$template_dir = '/usr/local/etc/maia/templates/';
71
 
72
 # How you want the digest sorted (choose one per cache type)
73
 # (note: non spam/ham caches don't have score to sort by)
(-)maia/files/patch-maiad (+12 lines)
Line 0 Link Here
1
--- maiad.orig	2022-11-30 18:39:52 UTC
2
+++ maiad
3
@@ -3833,9 +3833,6 @@ sub maia_store_mail($$$$$@) {
4
     $subject = substr($subject, 0, 255) if length($subject) > 255;
5
     $subject = untaint($subject);
6
     $sender = substr($sender, 0, 255) if length($sender) > 255;
7
-    if ($document_charset ne "") {
8
-	from_to($contents, $document_charset, 'UTF-8');
9
-    }
10
 
11
     if (!$oversized) {
12
         if ($dbtype =~ /^mysql$/si) { # MySQL
(-)maia/files/patch-maiad.conf.dist (-1 / +25 lines)
Lines 1-5 Link Here
1
--- maiad.conf.dist.orig	2022-04-25 17:16:14 UTC
1
--- maiad.conf.dist.orig	2022-03-02 01:05:20 UTC
2
+++ maiad.conf.dist
2
+++ maiad.conf.dist
3
@@ -21,20 +21,20 @@ $max_servers = 2;
4
 # Maiad will run as user ($daemon_user)
5
 #   * Typically 'maia'; sometimes 'amavis' or 'vscan'
6
 
7
-$daemon_user  = 'maia';
8
+$daemon_user  = 'vscan';
9
 
10
 
11
 # Maiad will run as group ($daemon_group)
12
 #   * Typically 'maia'; sometimes 'amavis' or 'vscan'
13
 
14
-$daemon_group = 'maia';
15
+$daemon_group = 'vscan';
16
 
17
 
18
 # Maiad's home directory ($MYHOME)
19
 #   * Where maiad expects to find supporting files
20
 #   * Should be owned by $daemon_user, group $daemon_group
21
 
22
-$MYHOME = '/var/lib/maia';
23
+$MYHOME = '/var/maiad';
24
 $TEMPBASE = "$MYHOME/tmp";
25
 
26
 ###########################################################################
3
@@ -55,8 +55,8 @@ $daemon_chroot_dir = undef;
27
@@ -55,8 +55,8 @@ $daemon_chroot_dir = undef;
4
 # Path overrides for chrooted environments
28
 # Path overrides for chrooted environments
5
 #   * Uncomment and adjust as necessary if using chroot
29
 #   * Uncomment and adjust as necessary if using chroot
(-)maia/files/patch-scripts_configtest.pl (+11 lines)
Lines 6-8 Link Here
6
 
6
 
7
 # $Id: configtest.pl 1570 2011-07-01 19:09:55Z rjl $
7
 # $Id: configtest.pl 1570 2011-07-01 19:09:55Z rjl $
8
 
8
 
9
@@ -94,8 +94,8 @@
10
     # name of this script
11
     my $script_name = "configtest";
12
 
13
-    # read configuration file (/etc/maia/maia.conf)
14
-    my $config_file = "/etc/maia/maia.conf";
15
+    # read configuration file (/usr/local/etc/maia/maia.conf)
16
+    my $config_file = "/usr/local/etc/maia/maia.conf";
17
     unless (my $rv = do $config_file) {
18
         die("Maia: [$script_name] Couldn't parse $config_file: $@\n") if $@;
19
         die("Maia: [$script_name] Couldn't open $config_file\n") if (!defined($rv) || !$rv);
(-)maia/files/patch-scripts_expire-quarantine-cache.pl (+20 lines)
Lines 6-8 Link Here
6
 
6
 
7
 # $Id: expire-quarantine-cache.pl 1528 2011-05-31 10:09:15Z rjl $
7
 # $Id: expire-quarantine-cache.pl 1528 2011-05-31 10:09:15Z rjl $
8
 
8
 
9
@@ -128,8 +128,8 @@
10
     # name of this script
11
     my $script_name = "expire-quarantine-cache";
12
 
13
-    # read configuration file (/etc/maia/maia.conf)
14
-    my $config_file = "/etc/maia/maia.conf";
15
+    # read configuration file (/usr/local/etc/maia/maia.conf)
16
+    my $config_file = "/usr/local/etc/maia/maia.conf";
17
     unless (my $rv = do $config_file) {
18
         fatal(sprintf("Couldn't parse %s: %s", $config_file, $@)) if $@;
19
         fatal(sprintf("Couldn't open %s", $config_file)) if (!defined($rv) || !$rv);
20
@@ -168,7 +168,7 @@
21
     close(PID_FILE);
22
 
23
 
24
-    # defaults (overridden by settings in /etc/maia/maia.conf)
25
+    # defaults (overridden by settings in /usr/local/etc/maia/maia.conf)
26
     $mail_types = (ALL - CONFIRMED_NONSPAM - CONFIRMED_SPAM) 
27
         if !defined($mail_types);
28
 
(-)maia/files/patch-scripts_load-sa-rules.pl (+20 lines)
Lines 6-8 Link Here
6
 
6
 
7
 # $Id: load-sa-rules.pl 1528 2011-05-31 10:09:15Z rjl $
7
 # $Id: load-sa-rules.pl 1528 2011-05-31 10:09:15Z rjl $
8
 
8
 
9
@@ -118,8 +118,8 @@
10
     # name of this script
11
     my $script_name = "load-sa-rules";
12
 
13
-    # read configuration file (/etc/maia/maia.conf)
14
-    my $config_file = "/etc/maia/maia.conf";
15
+    # read configuration file (/usr/local/etc/maia/maia.conf)
16
+    my $config_file = "/usr/local/etc/maia/maia.conf";
17
     unless (my $rv = do $config_file) {
18
         fatal(sprintf("Couldn't parse %s: %s", $config_file, $@)) if $@;
19
         fatal(sprintf("Couldn't open %s", $config_file)) if (!defined($rv) || !$rv);
20
@@ -162,7 +162,7 @@
21
     my $sa_version = $sa->VERSION;
22
     my $sa_prefix = $sa->{PREFIX};
23
 
24
-    # defaults (overridden by values in /etc/maia/maia.conf)
25
+    # defaults (overridden by values in /usr/local/etc/maia/maia.conf)
26
     if (defined($local_cf_dir)) {
27
         $local_cf_dir = expand_macros($sa_version, $sa_prefix, $local_cf_dir);
28
         fatal(sprintf("Directory %s does not exist!", $local_cf_dir))
(-)maia/files/patch-scripts_maiadbtool.pl (+18 lines)
Lines 6-8 Link Here
6
 
6
 
7
 # $Id: $
7
 # $Id: $
8
 
8
 
9
@@ -130,14 +130,14 @@ sub export_wblist_csv($$$$);
10
 # name of this script
11
 my $script_name = "maiadbtool";
12
 
13
-# read configuration file (/etc/maia/maia.conf)
14
-my $config_file = "/etc/maia/maia.conf";
15
+# read configuration file (/usr/local/etc/maia/maia.conf)
16
+my $config_file = "/usr/local/etc/maia/maia.conf";
17
 unless (my $rv = do $config_file) {
18
     fatal(sprintf("Couldn't parse %s: %s", $config_file, $@)) if $@;
19
     fatal(sprintf("Couldn't open %s", $config_file)) if (!defined($rv) || !$rv);
20
 };
21
 
22
-# defaults (overridden by settings in /etc/maia/maia.conf)
23
+# defaults (overridden by settings in /usr/local/etc/maia/maia.conf)
24
 $sa_learn = "sa-learn" if !defined($sa_learn);
25
 $address_rewriting_type = 0 if !defined($address_rewriting_type);
26
 $routing_domain = "" if !defined($routing_domain);
(-)maia/files/patch-scripts_process-quarantine.pl (+20 lines)
Lines 6-8 Link Here
6
 
6
 
7
 package Maia::ProcessQuarantine;
7
 package Maia::ProcessQuarantine;
8
 
8
 
9
@@ -51,7 +51,7 @@ Mail::SpamAssassin::Message->import();
10
 use Mail::SpamAssassin::PerMsgLearner;
11
 use Mail::SpamAssassin::Reporter;
12
 
13
-# config file variables from /etc/maia/maia.conf
14
+# config file variables from /usr/local/etc/maia/maia.conf
15
 use vars qw( $key_file $default_max_size $pq_log_level $log_dir
16
              $learning_options $report_options $pid_dir
17
              $autolearn_ham_threshold $autolearn_spam_threshold
18
@@ -150,8 +150,8 @@ if ($0 =~ /^(.*\/)*(.+)\.pl$/i) {
19
    $script_name = 'process-quarantine'; # sane default;
20
 }
21
 
22
-# read configuration file (/etc/maia/maia.conf)
23
-load_config_file('/etc/maia/maia.conf');
24
+# read configuration file (/usr/local/etc/maia/maia.conf)
25
+load_config_file('/usr/local/etc/maia/maia.conf');
26
 
27
 # defaults (overridden by settings in maia.conf)
28
 $default_workers = NWORKERS if !defined($default_workers);
(-)maia/files/patch-scripts_resend.pl (+11 lines)
Lines 6-8 Link Here
6
 
6
 
7
 # $Id: $
7
 # $Id: $
8
 
8
 
9
@@ -89,8 +89,8 @@ sub resend_mail($$$$$$);
10
 # name of this script
11
 my $script_name = "resend";
12
 
13
-# read configuration file (/etc/maia/maia.conf)
14
-my $config_file = "/etc/maia/maia.conf";
15
+# read configuration file (/usr/local/etc/maia/maia.conf)
16
+my $config_file = "/usr/local/etc/maia/maia.conf";
17
 unless (my $rv = do $config_file) {
18
     fatal(sprintf("Couldn't parse %s: %s", $config_file, $@)) if $@;
19
     fatal(sprintf("Couldn't open %s", $config_file)) if (!defined($rv) || !$rv);
(-)maia/files/patch-scripts_send-quarantine-digests.pl (+20 lines)
Lines 6-8 Link Here
6
 
6
 
7
 # $Id$
7
 # $Id$
8
 
8
 
9
@@ -91,8 +91,8 @@ sub generate_confirm_token($$);
10
 # name of this script
11
 my $script_name = "send-quarantine-digests";
12
 
13
-# read configuration file (/etc/maia/maia.conf)
14
-my $config_file = "/etc/maia/maia.conf";
15
+# read configuration file (/usr/local/etc/maia/maia.conf)
16
+my $config_file = "/usr/local/etc/maia/maia.conf";
17
 unless (my $rv = do $config_file) {
18
     fatal(sprintf("Couldn't parse %s: %s", $config_file, $@)) if $@;
19
     fatal(sprintf("Couldn't open %s", $config_file)) if (!defined($rv) || !$rv);
20
@@ -131,7 +131,7 @@ print PID_FILE "$$";
21
 close(PID_FILE);
22
 
23
 
24
-# defaults (overridden by settings in /etc/maia/maia.conf)
25
+# defaults (overridden by settings in /usr/local/etc/maia/maia.conf)
26
 $base_url = "http://example.com/" if !defined($base_url);
27
 $template_dir = "/var/lib/maia/templates" if !defined($template_dir);
28
 
(-)maia/files/patch-scripts_send-quarantine-reminders.pl (+11 lines)
Lines 6-8 Link Here
6
 
6
 
7
 # $Id: send-quarantine-reminders.pl 1528 2011-05-31 10:09:15Z rjl $
7
 # $Id: send-quarantine-reminders.pl 1528 2011-05-31 10:09:15Z rjl $
8
 
8
 
9
@@ -89,8 +89,8 @@
10
     # name of this script
11
     my $script_name = "send-quarantine-reminders";
12
 
13
-    # read configuration file (/etc/maia/maia.conf)
14
-    my $config_file = "/etc/maia/maia.conf";
15
+    # read configuration file (/usr/local/etc/maia/maia.conf)
16
+    my $config_file = "/usr/local/etc/maia/maia.conf";
17
     unless (my $rv = do $config_file) {
18
         fatal(sprintf("Couldn't parse %s: %s", $config_file, $@)) if $@;
19
         fatal(sprintf("Couldn't open %s", $config_file)) if (!defined($rv) || !$rv);
(-)maia/files/patch-scripts_stats-snapshot.pl (+11 lines)
Lines 6-8 Link Here
6
 
6
 
7
 # $Id: stats-snapshot.pl 1528 2011-05-31 10:09:15Z rjl $
7
 # $Id: stats-snapshot.pl 1528 2011-05-31 10:09:15Z rjl $
8
 
8
 
9
@@ -86,8 +86,8 @@
10
     # name of this script
11
     my $script_name = "stats-snapshot";
12
 
13
-    # read configuration file (/etc/maia/maia.conf)
14
-    my $config_file = "/etc/maia/maia.conf";
15
+    # read configuration file (/usr/local/etc/maia/maia.conf)
16
+    my $config_file = "/usr/local/etc/maia/maia.conf";
17
     unless (my $rv = do $config_file) {
18
         fatal(sprintf("Couldn't parse %s: %s", $config_file, $@)) if $@;
19
         fatal(sprintf("Couldn't open %s", $config_file)) if (!defined($rv) || !$rv);

Return to bug 268087