Train Spamassassin path issue

Trying to send the taining commands to spamassassin, but having issue with path to junk storage.

sa-learn --no-sync --spam /var/mail/vhosts/mydomain.com/myusername/.INBOX.JUNK/{cur,new}
sa-learn --no-sync --spam /var/mail/vhosts/mydomain.com/myusername/.JUNK/{cur,new}
sa-learn --no-sync --spam /var/mail/vhosts/mydomain.com/myusername/.Inbox.Junk/{cur,new}
sa-learn --no-sync --spam /var/mail/vhosts/mydomain.com/myusername/.Junk/{cur,new}

I always get: unable to open XXX No such file or directory. I can cd to /var/mail/vhosts/mydomain.com/myusername/ and ls to see new, cur and tmp.

What am I doing wrong?

(Used this to set up email a while ago: https://library.linode.com/email/postfi … 0.19-mysql">https://library.linode.com/email/postfix/postfix2.9.6-dovecot2.0.19-mysql)

4 Replies

jgjh151, does sa-learn have permissions to access those directories?

@Main Street James:

jgjh151, does sa-learn have permissions to access those directories?

Thats a good question. I don't remember adding that user to those folders in the process. How should I go about checking that and then doing it?

You can check using the 'ls' command:

  • cd /var/mail/vhosts/mydomain.com/myusername/

  • ls -lA

You should get a listing of the files along with their permissions, owner and group.

Yes, sa-learn is a command. I'm not very familiar with SA, so I wasn't sure if you were in an application like you would be if running mysql config commands.

Which user are you trying to run the sa-learn commands as? Try one of them preceded by 'sudo': sudo sa-learn --no-sync --spam /var/mail/vhosts/mydomain.com/myusername/.INBOX.JUNK/{cur,new}

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct