Difference between revisions of "Spamd (Sieve test)"

From Mailutils
Jump to navigationJump to search
m
m
Line 10: Line 10:
 
The ''spamd'' test is an interface with <tt>spamd</tt> daemon, which is a part of ''SpamAssassin'' mail filter. The test evaluates to <tt>True</tt> if ''SpamAssassin'' recognized the message as spam, or the message spam score satisfies the given relation.
 
The ''spamd'' test is an interface with <tt>spamd</tt> daemon, which is a part of ''SpamAssassin'' mail filter. The test evaluates to <tt>True</tt> if ''SpamAssassin'' recognized the message as spam, or the message spam score satisfies the given relation.
  
If the argument is <tt>:over</tt> and the spam score is greater than or equal to the number provided, the test is true; otherwise, it is <tt>False</tt>.
+
If the argument is <tt>:over</tt> and the spam score is greater than or equal to the number provided, the test is <tt>True</tt>; otherwise, it is <tt>False</tt>.
  
 
If the argument is <tt>:under</tt> and the spam score is less than or equal to the number provided, the test is <tt>True</tt>; otherwise, it is <tt>False</tt>.
 
If the argument is <tt>:under</tt> and the spam score is less than or equal to the number provided, the test is <tt>True</tt>; otherwise, it is <tt>False</tt>.

Revision as of 20:38, 17 December 2010

Spamd is a Sieve test implemented as a loadable extension.

Syntax

 spamd [:host <tcp-host: string>]
       [:port <tcp-port: number> / :socket <unix-socket: string>]
       [:user <name: string>]
       [:over" / :under <limit: string>]

The spamd test is an interface with spamd daemon, which is a part of SpamAssassin mail filter. The test evaluates to True if SpamAssassin recognized the message as spam, or the message spam score satisfies the given relation.

If the argument is :over and the spam score is greater than or equal to the number provided, the test is True; otherwise, it is False.

If the argument is :under and the spam score is less than or equal to the number provided, the test is True; otherwise, it is False.

Spam score is a floating point number. The comparison takes into account three decimal digits.

Example

  require "test-spamd";

  if spamd :host "127.0.0.1" :user "gray" :over "9.5"
    {
      discard;
    }