Setting a default location for files

Thomas Spahni <[email protected]> Tue, 11 Jan 2011 14:44:34 +0100 (CET)
Newsgroups gmane.mail.spam.crm114
Message-ID <[email protected]>
Hi all

It's a long time since my last post, but here I'm back.

I have built a .rpm package of crm114 for the openSUSE distribution 
(actually in my private repository, not (yet) public). Because these 
packages are built for the x86_64 architecture as well, I picked the
crm114-20081111-BlameBarack-Ger-4560.src.tar.bz2 version for the build.

The installation puts the executables into /usr/bin/ and the crm scripts 
and the .mfp and .css files into the /var/lib/crm114/ directory. This 
directory is included in the PATH and .crm program files are found. Now I 
would like to make /var/lib/crm114 the default location.

This works:

echo "Hello world" | crm -u /var/lib/crm114 mailreaver.crm
Hello world
X-CRM114-Version: 20081111-BlameBarack, rev 10118 (TRE 0.7.5 (LGPL, 
APPROX,
WCHAR, MULTIBYTE)) MR-5829E8AB
X-CRM114-CacheID: sfid-20110111_143154_387710_B0E52071
Message-Id: (sfid-20110111_143154_387710_B0E52071)
X-CRM114-Status: UNSURE ( 0.00 )
X-CRM114-Notice: Please train this message.


This does not work:

a) Changing the shebang line in the scripts to add the additional 
arguments for crm114. Linux passes all remaining arguments as *one* 
argument, which will be considered to be a filename with spaces.

b) echo "Hello world" | mailreaver.crm --fileprefix=/var/lib/crm114/

  Aw, crud.  maillib.crm broke.  Here's the error:

crm114: *WARNING*
  Nonexistent Classify table named: 
/var/lib/crm114//var/lib/crm114//nonspam.css
I'll try to keep working.
This happened at line 3565 of file /var/lib/crm114/mailreaver.crm:
     classify <:*:clf:> [:*:text:] /:*:lcr:/ /:*:clf_vt_cfg:/
(:*:fileprefix::*:goodcss: | :*:fileprefix::*:spamcss: )
(:classify_status:)
(runtime system location: crm_osb_bayes.c(1433) in routine:
crm_expr_osb_bayes_classify)

This seems to be a bug in the mailreaver.crm script.


Question: What is the preferred way to set a default file location system 
wide? I want that users can just do:

cat email.txt | mailreaver --good

or similar. Thank you.


------------------------------------------------------------------------------
Gaining the trust of online customers is vital for the success of any company
that requires sensitive data to be transmitted over the Web.   Learn how to 
best implement a security strategy that keeps consumers' information secure 
and instills the confidence they need to proceed with transactions.
http://p.sf.net/sfu/oracle-sfdevnl