CLI zmtrainsa: Difference between revisions

mNo edit summary
m (clarity)
Line 1: Line 1:
==<font size="4" color="#00007f" face="Arial"> ''' zmtrainsa ''' </font>==
==<font size="4" color="#00007f" face="Arial"> ''' zmtrainsa ''' </font>==


<font size="3" color="#000000" face="Arial"> This command is used to train the anti-spam filter. This command is run automatically every night to train the SpamAssasin filter from messages users mark as “junk” “not junk” from their mailbox. See [[Zimbra MTA]], Anti-Spam Training Filters.</font>
<font size="3" color="#000000" face="Arial"> This command is used to train the anti-spam filter; it is run automatically every night (on the spam.random@domain.com & ham.random@domain.com accounts) to train the SpamAssasin filter from messages users mark as “junk” or “not junk” from their mailbox. See [[Zimbra_MTA#Anti-Spam_Training_Filters]] for a longer description</font>


<font size="3" color="#000000" face="Arial">You need at least 200 spam & 200 not-spam to enable the bayes filter. You can use this command to manually send one account’s mail through the spam filter. </font>
<font size="3" color="#000000" face="Arial">You need at least 200 spam & 200 not-spam to enable the bayes filter. </font>
 
<font size="3" color="#000000" face="Arial">''You can use this command to manually send one account’s mail through the spam filter.'' </font>


===<font size="3" color="#00007f" face="Arial"> ''' Syntax ''' </font>===
===<font size="3" color="#00007f" face="Arial"> ''' Syntax ''' </font>===


<font size="3" color="#000000" face="Arial"> <font size="3" color="#000000" face=""Times New Roman""> '''zmtrainsa <server> <user> <spam|ham> [folder''' </font> ]</font>
<font size="3" color="#000000" face=""Times New Roman""> '''zmtrainsa <server> <user> <spam|ham> [folder]''' </font>
 
===<font size="3" color="#00007f" face="Arial"> ''' Description & Notes ''' </font>===
 
<font size="3" color="#000000" face="Arial">-Fetches the mail from <user> from <server> and trains the filter as either spam or ham <spam|ham>. </font>


===<font size="3" color="#00007f" face="Arial"> ''' Description ''' </font>===
<font size="3" color="#000000" face="Arial">-If a folder is not defined, the contents of the Inbox is fetched.</font>


<font size="3" color="#000000" face="Arial"> '''zmtrainsa'''  fetches the mail from <user> from <server> and trains the filter as either spam or ham <spam|ham>. The folder is optional. If a folder is not defined, the contents of the Inbox is fetched. (You may also be fine with leaving off server in a single-server setup.)</font>
<font size="3" color="#000000" face="Arial">-Server name may be required if in a multi-server install.</font>


----
----
in 4.5.6 the user's password is no longer needed:
As of 4.5.6 the user's password is no longer needed:
 
Usage is:
   
   
su zimbra
  su zimbra
 
  /opt/zimbra/bin/zmtrainsa user@domain.com spam|ham folderName
/opt/zimbra/bin/zmtrainsa user@domain.com spam|ham folderName
 
No Password required. Server name required if in a multi-server install. For 'user' put email address.
 
That was http://bugzilla.zimbra.com/show_bug.cgi?id=14659


(I do not remember if 4.5.5 actually got that before it was verified in 4.5.6 - check the release dates.
(I do not remember if 4.5.5 actually got the no password required RFE before it was verified in 4.5.6 but it was relatively easy because zmspamextract (which used by zmtrainsa) already supported extracting messages from users' folders with admin auth credentials.


Prior to 4.5.4: zmtrainsa <server> <user> <pass> <spam|ham>
Prior to 4.5.4: zmtrainsa <server> <user> <pass> <spam|ham>

Revision as of 15:39, 10 October 2007

zmtrainsa

This command is used to train the anti-spam filter; it is run automatically every night (on the spam.random@domain.com & ham.random@domain.com accounts) to train the SpamAssasin filter from messages users mark as “junk” or “not junk” from their mailbox. See Zimbra_MTA#Anti-Spam_Training_Filters for a longer description

You need at least 200 spam & 200 not-spam to enable the bayes filter.

You can use this command to manually send one account’s mail through the spam filter.

Syntax

zmtrainsa <server> <user> <spam|ham> [folder]

Description & Notes

-Fetches the mail from <user> from <server> and trains the filter as either spam or ham <spam|ham>.

-If a folder is not defined, the contents of the Inbox is fetched.

-Server name may be required if in a multi-server install.


As of 4.5.6 the user's password is no longer needed:

 su zimbra
 /opt/zimbra/bin/zmtrainsa user@domain.com spam|ham folderName

(I do not remember if 4.5.5 actually got the no password required RFE before it was verified in 4.5.6 but it was relatively easy because zmspamextract (which used by zmtrainsa) already supported extracting messages from users' folders with admin auth credentials.

Prior to 4.5.4: zmtrainsa <server> <user> <pass> <spam|ham>

Jump to: navigation, search