On 8/20/2012 12:46 PM, Axb wrote:
On 08/20/2012 06:42 PM, Ben Johnson wrote:

On 8/17/2012 11:28 AM, John Hardin wrote:
On Fri, 17 Aug 2012, Ben Johnson wrote:

On 8/16/2012 2:00 PM, Ben Johnson wrote:
Basically, I need to do something about the spam inundation, as soon as
possible.

Is there any reason that I should NOT be performing the sa-learn
training under the "amavis" user account?
In general, all training should be done as the user that SA (in your
case, SA via Amavis) is running as.
I have tried to do this, but to no avail:

---------------
# su amavis -c 'sa-learn --spam
/var/vmail/example.com/trainer/Maildir/.INBOX.Spam'

archive-iterator: no access to
/var/vmail/example.com/trainer/Maildir/.INBOX.Spam: 13 at
/usr/share/perl5/Mail/SpamAssassin/ArchiveIterator.pm line 539.
archive-iterator: no access to
/var/vmail/example.com/trainer/Maildir/.INBOX.Spam: 13 at
/usr/share/perl5/Mail/SpamAssassin/ArchiveIterator.pm line 771.
archive-iterator: unable to open
/var/vmail/example.com/trainer/Maildir/.INBOX.Spam: 13
---------------
~/Maildir/* assumes 1 file=1 mail

pls try

su amavis -c 'sa-learn --spam --progress --dir
/var/vmail/example.com/trainer/Maildir/.INBOX.Spam/cur/'

or wherever the message are stored

But first, you need access to the files. The simplest way is probably to add the amavis user account to the group used by the mail directories.

Assuming the group is "vmail", the command should look like this (on RedHat/CentOS):

$ usermod -a -G vmail amavis

This command will probably need to be run as root. If you are using a different distro, you will need to look up the command to add the amavis user to the vmail group.

--
Bowie

Reply via email to