Koozali.org: home of the SME Server

Spamassassin error

Charlie

Spamassassin error
« on: July 05, 2003, 08:43:11 PM »
I got the following in my .procmailrc file after attempting to install spamassassin on an SME 5.5 server following the howto floating around here.

# ------------
# some logging
# ------------
VERBOSE=no
LOGFILE=$HOME/procmail.log
Program fragment delivered error Unable to open spamassassin configuration dbase. at /etc/e-smith/templates-user//.procmailrc/30spamassassin line 6.''
Program fragment delivered error Unable to open configuration dbase. at /etc/e-smith/templates-user//.procmailrc/95saSort line 14.''

I stopped receiving mail and the only way to fix it was to change my email account to "deliver only" in user manager. I'm afraid that the next time I update anything I will go back to not getting mail. Anyone have any ideas?

Charlie

Re: Spamassassin error
« Reply #1 on: July 09, 2003, 05:43:58 AM »
I think I found the problem. Note the "//" after "template-user". Shouldn't it be a single "/"? Any help would be appreciated

Charlie Brady

Re: Spamassassin error
« Reply #2 on: July 09, 2003, 08:06:01 AM »
Charlie wrote:

> I think I found the problem. Note the "//" after
> "template-user". Shouldn't it be a single "/"?

'//' and '/' are equivalent in linux pathnames (i.e. file and directory names).

Charlie

Patric

Re: Spamassassin error
« Reply #3 on: August 13, 2003, 06:50:37 PM »
same error here...after a week of spamassassin..

Unable to open configuration dbase. at /etc/e-smith/templates-user//.procmailrc/95saSort line 14
this is what  he wil be do:

###Create an Object to SME config dbase
my $dbh2 = esmith::ConfigDB->open_ro()
  || die "Unable to open configuration dbase.";
someone a answer ??

Patric

Re: Spamassassin error
« Reply #4 on: August 13, 2003, 07:37:59 PM »
i wonder where te file 95saSort come from when i remove him everything goes well.

This is the code in the file :

{
use esmith::ConfigDB;
use esmith::AccountsDB;

###Create an Object to spamassassin dbase
my $sa_dbase = '/home/e-smith/spamassassin';
my $dbh1 = esmith::ConfigDB->open_ro($sa_dbase)
  || die "Unable to open spamassassin configuration dbase.";

###Pull spamassassin global config parameters
my %sa_conf = $dbh1->get('conf.global')->props;

###Create an Object to SME config dbase
my $dbh2 = esmith::ConfigDB->open_ro()
  || die "Unable to open configuration dbase.";

###Pull spamassassin global config parameters
my $conf_record = $dbh2->get('spamassassin');
my $status = $conf_record->prop('status');

###Check to see if spamassassin is enabled.  If so, add user procmail entries
if ($status eq 'enabled' && $sa_conf{'sort_spam'}) {

    ##Create an object to accounts dbase
    my $dbh3 = esmith::AccountsDB->open_ro()
      || die "Unable to open accountds dbase.";

    ###Build procmail entry to sort spam to junkmail folder
    if ($dbh3->get($USERNAME)) {
        my $user_conf_entry = 'conf' . $USERNAME;

        ###run a check to see if user has disabled spam sorting in a per user
        ###config setup
        my %user_conf;
        my $user_record = $dbh3->get($user_conf_entry);
        if ($user_record) {
            %user_conf = $user_record -> props;
        }
        else {%user_conf = ();}

        if (!%user_conf) {
            $OUT .= "\n";
            $OUT .= "# -------------------------------\n";
            $OUT .= "# Spamassassin sort to junkmail  \n";
            $OUT .= "# -------------------------------\n";
            $OUT .= ":0\n";
            $OUT .= "* ^X-Spam-Status: Yes\n";
            $OUT .= '$MAILDIR' . "/junkmail/\n";
        }
        elsif ($sa_conf{'per_user'} && $user_conf{'sort_spam'}){
    || die "Unable to open accountds dbase.";

    ###Build procmail entry to sort spam to junkmail folder
    if ($dbh3->get($USERNAME)) {
        my $user_conf_entry = 'conf' . $USERNAME;

        ###run a check to see if user has disabled spam sorting in a per user
        ###config setup
        my %user_conf;
        my $user_record = $dbh3->get($user_conf_entry);
        if ($user_record) {
            %user_conf = $user_record -> props;
        }
        else {%user_conf = ();}

        if (!%user_conf) {
            $OUT .= "\n";
            $OUT .= "# -------------------------------\n";
            $OUT .= "# Spamassassin sort to junkmail  \n";
            $OUT .= "# -------------------------------\n";
            $OUT .= ":0\n";
            $OUT .= "* ^X-Spam-Status: Yes\n";
            $OUT .= '$MAILDIR' . "/junkmail/\n";
        }
        elsif ($sa_conf{'per_user'} && $user_conf{'sort_spam'}){
            $OUT .= "\n";
            $OUT .= "# -------------------------------\n";
            $OUT .= "# Spamassassin sort to junkmail  \n";
            $OUT .= "# -------------------------------\n";
            $OUT .= ":0\n";
            $OUT .= "* ^X-Spam-Status: Yes\n";
            $OUT .= '$MAILDIR' . "/junkmail/\n";
        }

    }
}
}