Roundcube Community Forum

 

Markasjunk2 + sa-learn: no logs

Started by jimmi, April 21, 2011, 06:36:27 AM

Previous topic - Next topic

jimmi

Sure it is something stupid, but I cannot see the point :(

I'm using markasjunk2 with the following config.inc.php:
$rcmail_config['markasjunk2_learning_driver'] = cmd_learn;
$rcmail_config['markasjunk2_read_spam'] = true;
$rcmail_config['markasjunk2_unread_ham'] = false;
$rcmail_config['markasjunk2_detach_ham'] = true;
$rcmail_config['markasjunk2_spam_flag'] = 'Junk';
$rcmail_config['markasjunk2_ham_flag'] = null;
$rcmail_config['markasjunk2_debug'] = true;
$rcmail_config['markasjunk2_mb_toolbar'] = true;
$rcmail_config['markasjunk2_spam_cmd'] = '/usr/bin/sa-learn -D --spam --username=spamassassin %f  2>&1';
$rcmail_config['markasjunk2_ham_cmd'] = 'sa-learn --ham --username=spamassassin %f';
$rcmail_config['markasjunk2_spam_dir'] = null;
$rcmail_config['markasjunk2_ham_dir'] = null;
$rcmail_config['markasjunk2_filename'] = null;
$rcmail_config['markasjunk2_email_spam'] = null;
$rcmail_config['markasjunk2_email_ham'] = null;
$rcmail_config['markasjunk2_email_attach'] = true;
$rcmail_config['markasjunk2_email_subject'] = 'learn this message as %t';
$rcmail_config['markasjunk2_sauserprefs_config'] = '../sauserprefs/config.inc.php';


sa-learn is working because I see the tokens increasing using "sa-learn --dump magic", I wanted to make some debug but I cannot find any log, except the following:
88.149.227.234 - - [21/Apr/2011:07:12:32 +0200] "POST /?_task=mail&_action=plugin.markasjunk2.junk HTTP/1.1" 200 252 "https://rc.7girello.net/?_task=mail" "Mo
zilla/5.0 (X11; U; Linux i686; it; rv:1.9.2.16) Gecko/20110323 Ubuntu/10.10 (maverick) Firefox/3.6.16"
88.149.227.234 - - [21/Apr/2011:07:13:45 +0200] "POST /?_task=mail&_action=moveto HTTP/1.1" 200 398 "https://rc.7girello.net/?_task=mail" "Mozilla/5.0 (X11; U
; Linux i686; it; rv:1.9.2.16) Gecko/20110323 Ubuntu/10.10 (maverick) Firefox/3.6.16"


Any suggestion to?

Thanks in advance :)
Jimmi

JohnDoh

You're just trying to find the debug log file? It depends where RC is configued to do its logging but by default its in the logs dir inside the roundcube folder (assuming the webserver can write to it)
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more...

jimmi

Yep, that's it! Apologize for the poor knowledge of RC ;)

guillermitus

Quote from: jimmi;34373Sure it is something stupid, but I cannot see the point :(

I'm using markasjunk2 with the following config.inc.php:
$rcmail_config['markasjunk2_learning_driver'] = cmd_learn;
$rcmail_config['markasjunk2_read_spam'] = true;
$rcmail_config['markasjunk2_unread_ham'] = false;
$rcmail_config['markasjunk2_detach_ham'] = true;
$rcmail_config['markasjunk2_spam_flag'] = 'Junk';
$rcmail_config['markasjunk2_ham_flag'] = null;
$rcmail_config['markasjunk2_debug'] = true;
$rcmail_config['markasjunk2_mb_toolbar'] = true;
$rcmail_config['markasjunk2_spam_cmd'] = '/usr/bin/sa-learn -D --spam --username=spamassassin %f  2>&1';
$rcmail_config['markasjunk2_ham_cmd'] = 'sa-learn --ham --username=spamassassin %f';
$rcmail_config['markasjunk2_spam_dir'] = null;
$rcmail_config['markasjunk2_ham_dir'] = null;
$rcmail_config['markasjunk2_filename'] = null;
$rcmail_config['markasjunk2_email_spam'] = null;
$rcmail_config['markasjunk2_email_ham'] = null;
$rcmail_config['markasjunk2_email_attach'] = true;
$rcmail_config['markasjunk2_email_subject'] = 'learn this message as %t';
$rcmail_config['markasjunk2_sauserprefs_config'] = '../sauserprefs/config.inc.php';


sa-learn is working because I see the tokens increasing using "sa-learn --dump magic", I wanted to make some debug but I cannot find any log, except the following:
88.149.227.234 - - [21/Apr/2011:07:12:32 +0200] "POST /?_task=mail&_action=plugin.markasjunk2.junk HTTP/1.1" 200 252 "https://rc.7girello.net/?_task=mail" "Mo
zilla/5.0 (X11; U; Linux i686; it; rv:1.9.2.16) Gecko/20110323 Ubuntu/10.10 (maverick) Firefox/3.6.16"
88.149.227.234 - - [21/Apr/2011:07:13:45 +0200] "POST /?_task=mail&_action=moveto HTTP/1.1" 200 398 "https://rc.7girello.net/?_task=mail" "Mozilla/5.0 (X11; U
; Linux i686; it; rv:1.9.2.16) Gecko/20110323 Ubuntu/10.10 (maverick) Firefox/3.6.16"


Any suggestion to?

Thanks in advance :)
Jimmi

$rcmail_config['markasjunk2_spam_cmd'] = '/usr/bin/sa-learn -D --spam --username=spamassassin %f  2>&1';
$rcmail_config['markasjunk2_ham_cmd'] = 'sa-learn --ham --username=spamassassin %f';

you have to correct this to lines,
your www-data user will try to make the /var/www/.spamassasin/ folder for the lock files, try with somthing like this

$rcmail_config
['markasjunk2_ham_cmd'] = 'sa-learn --ham --username=spamassassin --cf=\'bayes_path /home/%u/.spamassassin/bayes\' --prefspath=/home/%u/.spamassassin/user_prefs %f';


and correct the permission for the apache user to read and write data tho the /home/userX/.spamassasin folder

the --username option do not make this command to be run as another user

just tel me if you dont understand, i speak spanish

cypriot

Hi There,
is it possible you could help me to make this Spam control run on my host please ?