List Info

Thread: process-quarantine with user_rules_dir




process-quarantine with user_rules_dir
country flaguser name
Japan
2007-05-24 02:44:38
Maia is all setup, and as far as I know it all appears to
run. But in 
the process of setting up the crontabs required, I ran into
a problem.

# sudo -u amavis process-quarantine.pl
config: cannot write to //.spamassassin/user_prefs: No such
file or 
directory
config: failed to create default user preference file 
//.spamassassin/user_prefs
bayes: expire_old_tokens: locker: safe_lock: cannot create
tmp lockfile 
//.spamassassin/bayes.lock.mx01.unix.9986 for 
//.spamassassin/bayes.lock: No such file or directory

So it seems that it fails to auto-detect the SA
directory(ies). So I 
have changed maia.conf to define them as:

$local_cf_dir =
"/usr/perl5/5.8.4/etc/mail/spamassassin";

$system_rules_dir =
"/usr/perl5/5.8.4/share/spamassassin";

$user_rules_dir = "/var/amavis/.spamassassin";

(I can confirm local.cf exists in that dir, and rules are
listed in the 
system_rules directory. And yes I do use
"/var/amavis/" and not 
"/var/amavisd/".)

# load-sa-rules.pl --debug
2007-05-24 16:24:17 Maia: [load-sa-rules] SpamAssassin core
rules 
directory = /usr/perl5/5.8.4/share/spamassassin
2007-05-24 16:24:17 Maia: [load-sa-rules] SpamAssassin
local.cf 
directory = /usr/perl5/5.8.4/etc/mail/spamassassin
2007-05-24 16:24:17 Maia: [load-sa-rules] SpamAssassin
user_prefs 
directory = /var/amavis/.spamassassin

That looks good and yet, the same errors when I try to run 
"process-quarantine.pl", almost like it doesn't
use the "user_rules_dir" 
setting at all? Or should I create a user_prefs manually?
The install 
guide does not say to create it. Not that it made any
difference when I 
tried.


Any hints?


-- 
Jorgen Lundman       | <lundmanlundman.net>
Unix Administrator   | +81 (0)3 -5456-2687 ext 1017 (work)
Shibuya-ku, Tokyo    | +81 (0)90-5578-8500          (cell)
Japan                | +81 (0)3 -3375-1767          (home)
_______________________________________________
Maia-users mailing list
Maia-usersrenaissoft.com
http://www.renaissoft.com/mailman/listinfo/maia-users

Re: process-quarantine with user_rules_dir
country flaguser name
Japan
2007-05-24 02:53:30
If I were to guess myself, it seems that MySQL was loaded by
the initial 
guess, which was wrong as it could not find the information.
So now that 
I have set it, I need to reload MySQL data. Is there a
procedure to do this?

Lund



Jorgen Lundman wrote:
> Maia is all setup, and as far as I know it all appears
to run. But in 
> the process of setting up the crontabs required, I ran
into a problem.
> 
> # sudo -u amavis process-quarantine.pl
> config: cannot write to //.spamassassin/user_prefs: No
such file or 
> directory
> config: failed to create default user preference file 
> //.spamassassin/user_prefs
> bayes: expire_old_tokens: locker: safe_lock: cannot
create tmp lockfile 
> //.spamassassin/bayes.lock.mx01.unix.9986 for 
> //.spamassassin/bayes.lock: No such file or directory
> 
> So it seems that it fails to auto-detect the SA
directory(ies). So I 
> have changed maia.conf to define them as:
> 
> $local_cf_dir =
"/usr/perl5/5.8.4/etc/mail/spamassassin";
> 
> $system_rules_dir =
"/usr/perl5/5.8.4/share/spamassassin";
> 
> $user_rules_dir =
"/var/amavis/.spamassassin";
> 
> (I can confirm local.cf exists in that dir, and rules
are listed in the 
> system_rules directory. And yes I do use
"/var/amavis/" and not 
> "/var/amavisd/".)
> 
> # load-sa-rules.pl --debug
> 2007-05-24 16:24:17 Maia: [load-sa-rules] SpamAssassin
core rules 
> directory = /usr/perl5/5.8.4/share/spamassassin
> 2007-05-24 16:24:17 Maia: [load-sa-rules] SpamAssassin
local.cf 
> directory = /usr/perl5/5.8.4/etc/mail/spamassassin
> 2007-05-24 16:24:17 Maia: [load-sa-rules] SpamAssassin
user_prefs 
> directory = /var/amavis/.spamassassin
> 
> That looks good and yet, the same errors when I try to
run 
> "process-quarantine.pl", almost like it
doesn't use the "user_rules_dir" 
> setting at all? Or should I create a user_prefs
manually? The install 
> guide does not say to create it. Not that it made any
difference when I 
> tried.
> 
> 
> Any hints?
> 
> 

-- 
Jorgen Lundman       | <lundmanlundman.net>
Unix Administrator   | +81 (0)3 -5456-2687 ext 1017 (work)
Shibuya-ku, Tokyo    | +81 (0)90-5578-8500          (cell)
Japan                | +81 (0)3 -3375-1767          (home)
_______________________________________________
Maia-users mailing list
Maia-usersrenaissoft.com
http://www.renaissoft.com/mailman/listinfo/maia-users

Re: process-quarantine with user_rules_dir
country flaguser name
Japan
2007-05-25 00:28:21
That was wrong too. This probably isn't the correct way, but
this did 
appear to work:

--- process-quarantine-sub.pl   Fri May 25 11:49:51 2007
+++
/usr/local/src/mx/maia-1.0.2/scripts/process-quarantine-sub.
pl 
Thu Apr  6 15:11:49 2006
 -539,11
+539,7 
      } else {
          $sa_debug_level = $debug;
      }
-    my $sa = new Mail::SpamAssassin({ debug =>
$sa_debug_level,
-           userprefs_filename => $user_rules_dir ? 
"$user_rules_dir/user_prefs" : undef,
-       userstate_dir => $user_rules_dir ?
$user_rules_dir : undef });
-
+    my $sa = new Mail::SpamAssassin({ debug =>
$sa_debug_level });
      $sa->init (1);

      while (row = $sth->fetchrow_array()) {
 -642,10
+638,7 
      } else {
          $sa_debug_level = $debug;
      }
-    my $sa = new Mail::SpamAssassin({ debug =>
$sa_debug_level,
-        userprefs_filename => $user_rules_dir ? 
"$user_rules_dir/user_prefs" : undef,
-        userstate_dir => $user_rules_dir ?
$user_rules_dir : undef });
-
+    my $sa = new Mail::SpamAssassin({debug =>
$sa_debug_level});
      $sa->init (1);

      while (row = $sth->fetchrow_array()) {



Not entirely sure what the $sa=Mail::SpamAssassin::new call
near the 
top, in global space, is for, and it is not released either.
But the 
Subroutines define a local $sa so I assume it is not used
before 
checking version.

Lund




Jorgen Lundman wrote:
> If I were to guess myself, it seems that MySQL was
loaded by the initial 
> guess, which was wrong as it could not find the
information. So now that 
> I have set it, I need to reload MySQL data. Is there a
procedure to do this?
> 
> Lund
> 
> 
> 
> Jorgen Lundman wrote:
>> Maia is all setup, and as far as I know it all
appears to run. But in 
>> the process of setting up the crontabs required, I
ran into a problem.
>>
>> # sudo -u amavis process-quarantine.pl
>> config: cannot write to //.spamassassin/user_prefs:
No such file or 
>> directory
>> config: failed to create default user preference
file 
>> //.spamassassin/user_prefs
>> bayes: expire_old_tokens: locker: safe_lock: cannot
create tmp lockfile 
>> //.spamassassin/bayes.lock.mx01.unix.9986 for 
>> //.spamassassin/bayes.lock: No such file or
directory
>>
>> So it seems that it fails to auto-detect the SA
directory(ies). So I 
>> have changed maia.conf to define them as:
>>
>> $local_cf_dir =
"/usr/perl5/5.8.4/etc/mail/spamassassin";
>>
>> $system_rules_dir =
"/usr/perl5/5.8.4/share/spamassassin";
>>
>> $user_rules_dir =
"/var/amavis/.spamassassin";
>>
>> (I can confirm local.cf exists in that dir, and
rules are listed in the 
>> system_rules directory. And yes I do use
"/var/amavis/" and not 
>> "/var/amavisd/".)
>>
>> # load-sa-rules.pl --debug
>> 2007-05-24 16:24:17 Maia: [load-sa-rules]
SpamAssassin core rules 
>> directory = /usr/perl5/5.8.4/share/spamassassin
>> 2007-05-24 16:24:17 Maia: [load-sa-rules]
SpamAssassin local.cf 
>> directory = /usr/perl5/5.8.4/etc/mail/spamassassin
>> 2007-05-24 16:24:17 Maia: [load-sa-rules]
SpamAssassin user_prefs 
>> directory = /var/amavis/.spamassassin
>>
>> That looks good and yet, the same errors when I try
to run 
>> "process-quarantine.pl", almost like it
doesn't use the "user_rules_dir" 
>> setting at all? Or should I create a user_prefs
manually? The install 
>> guide does not say to create it. Not that it made
any difference when I 
>> tried.
>>
>>
>> Any hints?
>>
>>
> 

-- 
Jorgen Lundman       | <lundmanlundman.net>
Unix Administrator   | +81 (0)3 -5456-2687 ext 1017 (work)
Shibuya-ku, Tokyo    | +81 (0)90-5578-8500          (cell)
Japan                | +81 (0)3 -3375-1767          (home)
_______________________________________________
Maia-users mailing list
Maia-usersrenaissoft.com
http://www.renaissoft.com/mailman/listinfo/maia-users

Re: process-quarantine with user_rules_dir
country flaguser name
Canada
2007-05-25 01:38:00
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Jorgen Lundman wrote:
> Maia is all setup, and as far as I know it all appears
to run. But in 
> the process of setting up the crontabs required, I ran
into a problem.
> 
> # sudo -u amavis process-quarantine.pl
> config: cannot write to //.spamassassin/user_prefs: No
such file or 
> directory
> config: failed to create default user preference file 
> //.spamassassin/user_prefs
> bayes: expire_old_tokens: locker: safe_lock: cannot
create tmp lockfile 
> //.spamassassin/bayes.lock.mx01.unix.9986 for 
> //.spamassassin/bayes.lock: No such file or directory
> 
> So it seems that it fails to auto-detect the SA
directory(ies). 

No, that's not the problem here.  Which version of
SpamAssassin are you
using?

SpamAssassin is looking for a Berkeley-style Bayes database,
due to the
way you've configured things in your local.cf file.  Most
likely you
want to be using the SQL (or MySQL or PgSQL) storage engine
for your
Bayes database.  See the example local.cf file
<http://www.maiamailguard.com/maia/wiki/SAConfigFile> as a guideline.


> So I have changed maia.conf to define them as:
> 
> $local_cf_dir =
"/usr/perl5/5.8.4/etc/mail/spamassassin";
> 
> $system_rules_dir =
"/usr/perl5/5.8.4/share/spamassassin";
> 
> $user_rules_dir =
"/var/amavis/.spamassassin";
> 
> (I can confirm local.cf exists in that dir, and rules
are listed in the 
> system_rules directory. And yes I do use
"/var/amavis/" and not 
> "/var/amavisd/".)

Ugh...no, don't do that.  The /usr/perl5/5.8.4 subtree is
for your Perl
installation and Perl modules, and will be overwritten the
next time you
update or upgrade Perl.

You should have your local.cf file somewhere under /etc,
e.g.
/etc/mail/spamassassin, /etc/spamassassin, etc.  Leaving
$local_cf_dir
set to "undef" will let the script find it for you
using the same
algorithm SpamAssassin uses.

Your $system_rules_dir should be left set to
"undef" as well because
that directory changes the first time you run sa-update or
upgrade
SpamAssassin.  Initially it's usually something like
/usr/share/spamassassin, but after running sa-update it
becomes
/var/lib/spamassassin/<version>.  Leaving
$system_rules_dir set to
"undef" will let process-quarantine find it
properly on its own.

Truly, you should leave all three of the path settings at
"undef" unless
you know what you're doing; if the process-quarantine script
can't find
the proper directories on its own, SpamAssassin won't be
able to do so
either, so you've obviously got things installed in a
non-standard location.


> That looks good and yet, the same errors when I try to
run 
> "process-quarantine.pl", almost like it
doesn't use the "user_rules_dir" 
> setting at all? Or should I create a user_prefs
manually? The install 
> guide does not say to create it. Not that it made any
difference when I 
> tried.

You can create the user_prefs directory if you like, but
frankly what
you're seeing is just a symptom of a much larger
misconfiguration issue.
 You need to get SpamAssassin installed properly before
going any further.

- --
Robert LeBlanc <rjlrenaissoft.com>
Renaissoft, Inc.
Maia Mailguard <http://www.maiamail
guard.com/>

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFGVoRIGmqOER2NHewRAkPoAJ9vuNQ2CcG+q6eRwvZDA/0Xefb1dACe
KY7a
JK6yORkSzhw/+rZf9+uoe0g=
=bUBT
-----END PGP SIGNATURE-----
_______________________________________________
Maia-users mailing list
Maia-usersrenaissoft.com
http://www.renaissoft.com/mailman/listinfo/maia-users

Re: process-quarantine with user_rules_dir
country flaguser name
Canada
2007-05-25 01:41:14
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Jorgen Lundman wrote:

> If I were to guess myself, it seems that MySQL was
loaded by the initial 
> guess, which was wrong as it could not find the
information. So now that 
> I have set it, I need to reload MySQL data. Is there a
procedure to do this?

I don't understand what you're saying, here.  If you mean
that you need
to reload the data from the maia-mysql.sql (or
maia-pgsql.sql) schema,
you can do that by first dropping the existing database and
then
repeating Step 2 of the installation docs:
<ht
tp://www.maiamailguard.com/maia/wiki/Install>

- --
Robert LeBlanc <rjlrenaissoft.com>
Renaissoft, Inc.
Maia Mailguard <http://www.maiamail
guard.com/>

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFGVoUKGmqOER2NHewRAn2PAJ0WMdlkNLH1Xa9FfWMZUvZzCJ4w7wCf
R6DO
r2JKHouvMZPDSvVvZTGOzVs=
=aCQu
-----END PGP SIGNATURE-----
_______________________________________________
Maia-users mailing list
Maia-usersrenaissoft.com
http://www.renaissoft.com/mailman/listinfo/maia-users

Re: process-quarantine with user_rules_dir
country flaguser name
Canada
2007-05-25 01:45:56
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Jorgen Lundman wrote:
> That was wrong too. This probably isn't the correct
way, but this did 
> appear to work:
> 
> --- process-quarantine-sub.pl   Fri May 25 11:49:51
2007
> +++
/usr/local/src/mx/maia-1.0.2/scripts/process-quarantine-sub.
pl 
> Thu Apr  6 15:11:49 2006
>  -539,11 +539,7 
>       } else {
>           $sa_debug_level = $debug;
>       }
> -    my $sa = new Mail::SpamAssassin({ debug =>
$sa_debug_level,
> -           userprefs_filename => $user_rules_dir ?

> "$user_rules_dir/user_prefs" : undef,
> -       userstate_dir => $user_rules_dir ?
$user_rules_dir : undef });
> -
> +    my $sa = new Mail::SpamAssassin({ debug =>
$sa_debug_level });
>       $sa->init (1);
> 
>       while (row = $sth->fetchrow_array()) {
>  -642,10 +638,7 
>       } else {
>           $sa_debug_level = $debug;
>       }
> -    my $sa = new Mail::SpamAssassin({ debug =>
$sa_debug_level,
> -        userprefs_filename => $user_rules_dir ? 
> "$user_rules_dir/user_prefs" : undef,
> -        userstate_dir => $user_rules_dir ?
$user_rules_dir : undef });
> -
> +    my $sa = new Mail::SpamAssassin({debug =>
$sa_debug_level});
>       $sa->init (1);
> 
>       while (row = $sth->fetchrow_array()) {

Now I'm really starting to wonder what version of
SpamAssassin you're
using.  The code you're changing works fine with modern
versions of
SpamAssassin, but if you're using something ancient (e.g.
2.64, 2.55,
etc.) that might explain it.  In that case, upgrade to
SpamAssassin
3.1.8, which is vastly improved on so many levels.

- --
Robert LeBlanc <rjlrenaissoft.com>
Renaissoft, Inc.
Maia Mailguard <http://www.maiamail
guard.com/>

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFGVoYkGmqOER2NHewRApyMAKCDnyjZsitNVjviPVQF4N6v2rjvWgCg
hXnc
RAwL5vM7r1WuwGRGsJEf4bA=
=ChId
-----END PGP SIGNATURE-----
_______________________________________________
Maia-users mailing list
Maia-usersrenaissoft.com
http://www.renaissoft.com/mailman/listinfo/maia-users

Re: process-quarantine with user_rules_dir
country flaguser name
Japan
2007-05-25 03:13:12
Ok, I shall roll back what I have done and start up again.

Fresh Solaris 10, using perl 5.8.4 that comes with it, and
using "cpan 
install Mail::SpamAssassin" which at the time, meant it
installed:

/usr/perl5/5.8.4/bin/spamassassin -V
SpamAssassin version 3.2.0
   running on Perl version 5.8.4

I made no other changes, but your email seem to indicate
that I should 
create a local.cf, and not use the one that ships with it.
Since I did 
not do anything with local.cf, it will not know to connect
to MySQL. 
Re-reading the Install guide, I now see it is indeed
mentioned and comes 
with sample local.cf.

Ignore my emails, and I will try again properly. That's the
problem with 
you work on several projects at the same time 

Sorry for the noise.

Lund


Robert LeBlanc wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Jorgen Lundman wrote:
>> Maia is all setup, and as far as I know it all
appears to run. But in 
>> the process of setting up the crontabs required, I
ran into a problem.
>>
>> # sudo -u amavis process-quarantine.pl
>> config: cannot write to //.spamassassin/user_prefs:
No such file or 
>> directory
>> config: failed to create default user preference
file 
>> //.spamassassin/user_prefs
>> bayes: expire_old_tokens: locker: safe_lock: cannot
create tmp lockfile 
>> //.spamassassin/bayes.lock.mx01.unix.9986 for 
>> //.spamassassin/bayes.lock: No such file or
directory
>>
>> So it seems that it fails to auto-detect the SA
directory(ies). 
> 
> No, that's not the problem here.  Which version of
SpamAssassin are you
> using?
> 
> SpamAssassin is looking for a Berkeley-style Bayes
database, due to the
> way you've configured things in your local.cf file. 
Most likely you
> want to be using the SQL (or MySQL or PgSQL) storage
engine for your
> Bayes database.  See the example local.cf file
> <http://www.maiamailguard.com/maia/wiki/SAConfigFile> as a guideline.
> 
> 
>> So I have changed maia.conf to define them as:
>>
>> $local_cf_dir =
"/usr/perl5/5.8.4/etc/mail/spamassassin";
>>
>> $system_rules_dir =
"/usr/perl5/5.8.4/share/spamassassin";
>>
>> $user_rules_dir =
"/var/amavis/.spamassassin";
>>
>> (I can confirm local.cf exists in that dir, and
rules are listed in the 
>> system_rules directory. And yes I do use
"/var/amavis/" and not 
>> "/var/amavisd/".)
> 
> Ugh...no, don't do that.  The /usr/perl5/5.8.4 subtree
is for your Perl
> installation and Perl modules, and will be overwritten
the next time you
> update or upgrade Perl.
> 
> You should have your local.cf file somewhere under
/etc, e.g.
> /etc/mail/spamassassin, /etc/spamassassin, etc. 
Leaving $local_cf_dir
> set to "undef" will let the script find it
for you using the same
> algorithm SpamAssassin uses.
> 
> Your $system_rules_dir should be left set to
"undef" as well because
> that directory changes the first time you run sa-update
or upgrade
> SpamAssassin.  Initially it's usually something like
> /usr/share/spamassassin, but after running sa-update it
becomes
> /var/lib/spamassassin/<version>.  Leaving
$system_rules_dir set to
> "undef" will let process-quarantine find it
properly on its own.
> 
> Truly, you should leave all three of the path settings
at "undef" unless
> you know what you're doing; if the process-quarantine
script can't find
> the proper directories on its own, SpamAssassin won't
be able to do so
> either, so you've obviously got things installed in a
non-standard location.
> 
> 
>> That looks good and yet, the same errors when I try
to run 
>> "process-quarantine.pl", almost like it
doesn't use the "user_rules_dir" 
>> setting at all? Or should I create a user_prefs
manually? The install 
>> guide does not say to create it. Not that it made
any difference when I 
>> tried.
> 
> You can create the user_prefs directory if you like,
but frankly what
> you're seeing is just a symptom of a much larger
misconfiguration issue.
>  You need to get SpamAssassin installed properly before
going any further.
> 
> - --
> Robert LeBlanc <rjlrenaissoft.com>
> Renaissoft, Inc.
> Maia Mailguard <http://www.maiamail
guard.com/>
> 
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.6 (GNU/Linux)
> 
>
iD8DBQFGVoRIGmqOER2NHewRAkPoAJ9vuNQ2CcG+q6eRwvZDA/0Xefb1dACe
KY7a
> JK6yORkSzhw/+rZf9+uoe0g=
> =bUBT
> -----END PGP SIGNATURE-----
> _______________________________________________
> Maia-users mailing list
> Maia-usersrenaissoft.com
> http://www.renaissoft.com/mailman/listinfo/maia-users
> 

-- 
Jorgen Lundman       | <lundmanlundman.net>
Unix Administrator   | +81 (0)3 -5456-2687 ext 1017 (work)
Shibuya-ku, Tokyo    | +81 (0)90-5578-8500          (cell)
Japan                | +81 (0)3 -3375-1767          (home)
_______________________________________________
Maia-users mailing list
Maia-usersrenaissoft.com
http://www.renaissoft.com/mailman/listinfo/maia-users

Re: process-quarantine with user_rules_dir
country flaguser name
Canada
2007-05-25 04:08:13
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Jorgen Lundman wrote:
> Ok, I shall roll back what I have done and start up
again.
> 
> Fresh Solaris 10, using perl 5.8.4 that comes with it,
and using "cpan 
> install Mail::SpamAssassin" which at the time,
meant it installed:
> 
> /usr/perl5/5.8.4/bin/spamassassin -V
> SpamAssassin version 3.2.0

If this is ultimately going to be for a production system,
you'll
probably want to avoid SpamAssassin 3.2.0 for the moment, as
it still
has a number of issues (see
<http://www.renaissoft.com/pipermail/maia-
users/2007-May/009702.html>).
 Either wait for 3.2.1, or stick with the stable 3.1.8
(which is
available from the SpamAssassin project downloads page,
<http://spamassassin.apache.org/downloads.cgi
?update=200705021400>).

- --
Robert LeBlanc <rjlrenaissoft.com>
Renaissoft, Inc.
Maia Mailguard <http://www.maiamail
guard.com/>

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFGVqd9GmqOER2NHewRAiK8AKCJWSuQSyw5h8BP5DpVgXLsvomS+ACf
ey2V
E9C6ywEnq3XXL8oVYmDOC0o=
=n2Ap
-----END PGP SIGNATURE-----
_______________________________________________
Maia-users mailing list
Maia-usersrenaissoft.com
http://www.renaissoft.com/mailman/listinfo/maia-users

Re: process-quarantine with user_rules_dir
country flaguser name
Japan
2007-05-28 01:04:35
I cleaned up MySQL, and re-added the mysql.sql file. rsynced
the 
original script files over my changes.

Thanks for your Spamassassin version warning, but we are not
going live 
until Nov sometime and we are just testing for the time
being.



It would appear that on Solaris, when using OS perl, that
the local.cf 
file should be
"/usr/perl5/5.8.4/etc/mail/spamassassin/local.cf".
I 
tried creating just /etc/mail/spamassassin - but truss
confirms it only 
attempts to read things under the
"/usr/perl5/5.8.4/" tree. Most likely 
as Solaris ships with several versions of perl, and you can
pick the 
version you want by changing the symlinks.


I copied the default example local.cf, changing mysql to my
db. (I have 
to add the hostname, but the documentatios indicate I just
tag on ":ip" 
on the DBI: line).


Loading the rules appear to pick the correct paths
automatically:

2007-05-28 14:43:58 Maia: [load-sa-rules] SpamAssassin core
rules 
directory = /usr/perl5/5.8.4/share/spamassassin
2007-05-28 14:43:58 Maia: [load-sa-rules] SpamAssassin
local.cf 
directory = /usr/perl5/5.8.4/etc/mail/spamassassin
2007-05-28 14:43:58 Maia: [load-sa-rules] SpamAssassin
user_prefs 
directory = /var/amavis/.spamassassin
[snip]
2007-05-28 14:44:09 Maia: [load-sa-rules] 842 new rules
added (842 rules 
total), all scores updated.






Running the first crontab:


# sudo -u amavis truss -o /var/tmp/truss -fi
./process-quarantine.pl

config: cannot write to //.spamassassin/user_prefs: No such
file or 
directory

config: failed to create default user preference file 
//.spamassassin/user_prefs

netset: cannot include 127.0.0.1/32 as it has already been
included
2007-05-28 14:45:15 Maia: [process-quarantine-sub] 0 spam
items 
processed (0 learned, 0 reported)

config: cannot write to //.spamassassin/user_prefs: No such
file or 
directory

config: failed to create default user preference file 
//.spamassassin/user_prefs

netset: cannot include 127.0.0.1/32 as it has already been
included

2007-05-28 14:45:16 Maia: [process-quarantine-sub] 0
non-spam items 
processed (0 learned)

2007-05-28 14:45:16 Maia: [process-quarantine] Processing
completed: 0 
items processed in 0 runs.


Should I simply ignore the "user_prefs" errors?
Seem rather unattractive.

Amusing myself, I comment out the suggested:
"trusted_networks                   
127.0.0.1/32"
line from "local.cf" and sure enough, the
"netset: cannot include 127*" 
warning disappears, which would indicate that it is reading
the new 
local.cf file.

Lund



Robert LeBlanc wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Jorgen Lundman wrote:
>> Maia is all setup, and as far as I know it all
appears to run. But in 
>> the process of setting up the crontabs required, I
ran into a problem.
>>
>> # sudo -u amavis process-quarantine.pl
>> config: cannot write to //.spamassassin/user_prefs:
No such file or 
>> directory
>> config: failed to create default user preference
file 
>> //.spamassassin/user_prefs
>> bayes: expire_old_tokens: locker: safe_lock: cannot
create tmp lockfile 
>> //.spamassassin/bayes.lock.mx01.unix.9986 for 
>> //.spamassassin/bayes.lock: No such file or
directory
>>
>> So it seems that it fails to auto-detect the SA
directory(ies). 
> 
> No, that's not the problem here.  Which version of
SpamAssassin are you
> using?
> 
> SpamAssassin is looking for a Berkeley-style Bayes
database, due to the
> way you've configured things in your local.cf file. 
Most likely you
> want to be using the SQL (or MySQL or PgSQL) storage
engine for your
> Bayes database.  See the example local.cf file
> <http://www.maiamailguard.com/maia/wiki/SAConfigFile> as a guideline.
> 
> 
>> So I have changed maia.conf to define them as:
>>
>> $local_cf_dir =
"/usr/perl5/5.8.4/etc/mail/spamassassin";
>>
>> $system_rules_dir =
"/usr/perl5/5.8.4/share/spamassassin";
>>
>> $user_rules_dir =
"/var/amavis/.spamassassin";
>>
>> (I can confirm local.cf exists in that dir, and
rules are listed in the 
>> system_rules directory. And yes I do use
"/var/amavis/" and not 
>> "/var/amavisd/".)
> 
> Ugh...no, don't do that.  The /usr/perl5/5.8.4 subtree
is for your Perl
> installation and Perl modules, and will be overwritten
the next time you
> update or upgrade Perl.
> 
> You should have your local.cf file somewhere under
/etc, e.g.
> /etc/mail/spamassassin, /etc/spamassassin, etc. 
Leaving $local_cf_dir
> set to "undef" will let the script find it
for you using the same
> algorithm SpamAssassin uses.
> 
> Your $system_rules_dir should be left set to
"undef" as well because
> that directory changes the first time you run sa-update
or upgrade
> SpamAssassin.  Initially it's usually something like
> /usr/share/spamassassin, but after running sa-update it
becomes
> /var/lib/spamassassin/<version>.  Leaving
$system_rules_dir set to
> "undef" will let process-quarantine find it
properly on its own.
> 
> Truly, you should leave all three of the path settings
at "undef" unless
> you know what you're doing; if the process-quarantine
script can't find
> the proper directories on its own, SpamAssassin won't
be able to do so
> either, so you've obviously got things installed in a
non-standard location.
> 
> 
>> That looks good and yet, the same errors when I try
to run 
>> "process-quarantine.pl", almost like it
doesn't use the "user_rules_dir" 
>> setting at all? Or should I create a user_prefs
manually? The install 
>> guide does not say to create it. Not that it made
any difference when I 
>> tried.
> 
> You can create the user_prefs directory if you like,
but frankly what
> you're seeing is just a symptom of a much larger
misconfiguration issue.
>  You need to get SpamAssassin installed properly before
going any further.
> 
> - --
> Robert LeBlanc <rjlrenaissoft.com>
> Renaissoft, Inc.
> Maia Mailguard <http://www.maiamail
guard.com/>
> 
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.6 (GNU/Linux)
> 
>
iD8DBQFGVoRIGmqOER2NHewRAkPoAJ9vuNQ2CcG+q6eRwvZDA/0Xefb1dACe
KY7a
> JK6yORkSzhw/+rZf9+uoe0g=
> =bUBT
> -----END PGP SIGNATURE-----
> _______________________________________________
> Maia-users mailing list
> Maia-usersrenaissoft.com
> http://www.renaissoft.com/mailman/listinfo/maia-users
> 

-- 
Jorgen Lundman       | <lundmanlundman.net>
Unix Administrator   | +81 (0)3 -5456-2687 ext 1017 (work)
Shibuya-ku, Tokyo    | +81 (0)90-5578-8500          (cell)
Japan                | +81 (0)3 -3375-1767          (home)
_______________________________________________
Maia-users mailing list
Maia-usersrenaissoft.com
http://www.renaissoft.com/mailman/listinfo/maia-users

Re: process-quarantine with user_rules_dir
country flaguser name
Canada
2007-05-28 04:03:33
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Jorgen Lundman wrote:

> It would appear that on Solaris, when using OS perl,
that the local.cf 
> file should be
"/usr/perl5/5.8.4/etc/mail/spamassassin/local.cf".
I 
> tried creating just /etc/mail/spamassassin - but truss
confirms it only 
> attempts to read things under the
"/usr/perl5/5.8.4/" tree. Most likely 
> as Solaris ships with several versions of perl, and you
can pick the 
> version you want by changing the symlinks.

That seems very strange--either incorrect or insane.  Can
you point me
to whatever documentation told you that this should be the
case?  How
did you install SpamAssassin?  Did the installer choose that
location?

The "/usr/perl5/<version>" layout is common
to all Unix variants (I have
5.8.5, 5.8.6, 5.8.7, and 5.8.8 installed on one Linux
server), but this
is merely used to store Perl /modules/, not application
configuration
information (which is generally stored somewhere under /etc
or
/usr/etc/, /usr/local/etc, or somesuch, since it is
independent of your
Perl version).  Why?  Well, suppose you wanted to switch
Perl versions
from 5.8.4 to 5.8.8 (which you should, if you're using
SpamAssassin
3.2.0).  With everything installed under your 5.8.4 subtree,
you'll end
up having to either reinstall SpamAssassin (and presumably
any other
Perl applications that have installed themselves under the
5.8.4
subtree) or move/relink the subtree that contains your
configuration
information.  A very awkward arrangement.

All of that said, if it works, I suppose that's something.


> # sudo -u amavis truss -o /var/tmp/truss -fi
./process-quarantine.pl
> 
> config: cannot write to //.spamassassin/user_prefs: No
such file or 
> directory
> 
> config: failed to create default user preference file 
> //.spamassassin/user_prefs

You can silence the harmless warning by just creating the
subdirectory
it's looking for:

  touch /var/amavis/.spamassassin/user_prefs

Make sure it's readable and writable by your amavis user, of
course.


> netset: cannot include 127.0.0.1/32 as it has already
been included
> 2007-05-28 14:45:15 Maia: [process-quarantine-sub] 0
spam items 
> processed (0 learned, 0 reported)

Yes, this is new in SpamAssassin 3.2.0--you no longer need
to include
127.0.0.1 in your internal_networks or trusted_networks
setting; the
localhost is now presumed to be trustworthy.  You can (and
should)
remove this entry from your local.cf.

- --
Robert LeBlanc <rjlrenaissoft.com>
Renaissoft, Inc.
Maia Mailguard <http://www.maiamail
guard.com/>

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFGWprlGmqOER2NHewRAll6AKCTDz3RKa8ZpHImdi/igPsWI6fn2QCg
g+b0
+sgQU9ZMkPctQ+AndzyK5z8=
=WeFK
-----END PGP SIGNATURE-----
_______________________________________________
Maia-users mailing list
Maia-usersrenaissoft.com
http://www.renaissoft.com/mailman/listinfo/maia-users

[1-10] [11-12]

about | contact  Other archives ( Real Estate discussion Medical topics )