Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Mail::SpamAssassin::CmdLearn hacking

by submersible_toaster (Chaplain)
on Jun 26, 2003 at 01:55 UTC ( #269084=perlquestion: print w/replies, xml ) Need Help??

submersible_toaster has asked for the wisdom of the Perl Monks concerning the following question:

brothers and sisters in perl ,
I hope that I am not the first to encounter difficulty with spam-assassin's sa-learn.

It seems while spamc and spamd have options for sql stored bayes_dbs or virtual user directories, sa-learn has a completly different syntax for specifying configuration and user_prefs locations. Having seen posts on the sa-talk mailing list regarding this collect zero responses, I decided to have a bash getting sa-learn to use virtual config directories in the manner of spamd.

After browsing the source for a minute, making this hack to CmdLearn.pm allowed me to use the option username and virtual-config-dir , combining them to pass user_dir to Mail::Spamassassin::new. With SA 2.53, Mail::SpamAssassin::CmdLearn

56,59d55 < 'virtual-config-dir|v=s' => \$opt{'virtual-co +nfig-dir'}, < 'username|u=s' => \$opt{'username'} +, < < 91d86 < user_dir => join ( '/' , $opt{'virtual-config-dir'} , $ +opt{'username'} ),
Has anyone else come across this while using spam assassin, no users have system accounts on the server I am configuring. More to the point, has anybody made this work already?

thanks
-toaster

I can't believe it's not psellchecked

Replies are listed 'Best First'.
Re: Mail::SpamAssassin::CmdLearn hacking
by waswas-fng (Curate) on Jun 26, 2003 at 03:39 UTC
    This should be posted one of the SpamAssassin mailing lists. It really does little good here. I use SpamAssassin a lot and do not look here for patches =)

    -Waswas
      It really does little good here.

      Well, it doesn't cure world hunger if that's what you're looking for, but it does contribute something:

      • Increases awareness of SpamAssassin and mail filtering in general.
      • Provides a starting point for a potentially informative discussion.
      • Shares some knowledge with anyone who takes the time to read it.

      Maybe some people on the spamassassin mailing list would find it useful (doubtful, have you ever read that list?) but that hardly means it shouldn't be posted here.

        My point is that his post is a patch to a perl app (module) and is more valuable send to the author or posted on the apps mailing list. people dont come here to look for spamassassin patches. if his post was to show a new usage for the module or a question about a problem he is having using a module thats one thing but it is a post about a patch he made to a module

        -Waswas

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://269084]
Approved by Courage
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (4)
As of 2019-07-21 00:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    If you were the first to set foot on the Moon, what would be your epigram?






    Results (7 votes). Check out past polls.

    Notices?