sa-learn questions

Discussion in 'General' started by technoid, Nov 3, 2014.

  1. technoid

    technoid New Member

    When running "sa-learn --spam <mailbox path>" do I need to preface this with "su amavis -c"?

    Since we are using amavis with spamassassin, do things like sa-learn and sa-update need to be ran as the amavis user?

    When I run "/usr/bin/sa-learn --spam /var/vmail/*/*/Maildir/.Junk/*/*" I get back "Learned tokens from 19 message(s) (5039 message(s) examined)".

    If I run "su amavis -c '/usr/bin/sa-learn --spam /var/vmail/*/*/Maildir/.Junk/*/*'" I get back "Learned tokens from 0 message(s) (0 message(s) examined)"

    Can someone clear up whether the amavis user needs to be specified for commands such as sa-learn and sa-update to affect the scoring of incoming mail?

    Thank you.
     
  2. technoid

    technoid New Member

    found some more

    I also played around with sa-update some more.

    When I run "sa-update" I do not get any errors, it just returns be back to the prompt.

    When I run "su amavis -c 'sa-upate'" I get the following errors:
    gpg: WARNING: unsafe ownership on homedir `/etc/spamassassin/sa-update-keys'
    gpg: failed to create temporary file `/etc/spamassassin/sa-update-keys/.#lk0x2370680.wintermute.netteksolutions.com.25549': Permission denied
    gpg: keyblock resource `/etc/spamassassin/sa-update-keys/secring.gpg': general error
    gpg: failed to create temporary file `/etc/spamassassin/sa-update-keys/.#lk0x2370680.wintermute.netteksolutions.com.25549': Permission denied
    gpg: keyblock resource `/etc/spamassassin/sa-update-keys/pubring.gpg': general error
    gpg: no writable keyring found: eof
    gpg: error reading `/usr/share/spamassassin/sa-update-pubkey.txt': general error
    gpg: import from `/usr/share/spamassassin/sa-update-pubkey.txt' failed: general error


    Does this indicate that I don't need the "su amavis -c" when running sa-update or sa-learn, or does it mean that all this time sa-update and sa-learn haven't been actually doing anything due to issues?

    Sorry to be a bother, just trying to really understand how the amavis and spamassassin work together so I can make sure things are working efficiently.

    Thank you.
     

Share This Page