<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">On 17.04.18 13:11, Reio Remma wrote:<br>
    </div>
    <blockquote
      cite="mid:22a56eae-f11f-d8c0-3e30-d90542f799ca@mrstuudio.ee"
      type="cite">
      <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
      <div class="moz-cite-prefix">On 17.04.18 12:40, Reio Remma wrote:<br>
      </div>
      <blockquote
        cite="mid:b1ca0913-28be-1f89-780e-8f93b46c58ab@mrstuudio.ee"
        type="cite">
        <meta content="text/html; charset=utf-8"
          http-equiv="Content-Type">
        <div class="moz-cite-prefix">On 17.04.18 12:38, Aki Tuomi wrote:<br>
        </div>
        <blockquote
          cite="mid:8d5adc4b-90dc-49a7-2061-16c3bc28fb98@dovecot.fi"
          type="cite">
          <meta http-equiv="Content-Type" content="text/html;
            charset=utf-8">
          <p><br>
          </p>
          <br>
          <div class="moz-cite-prefix">On 17.04.2018 12:36, Reio Remma
            wrote:<br>
          </div>
          <blockquote type="cite"
            cite="mid:51f20094-5699-b7d9-4f4a-ee516929da37@mrstuudio.ee">
            <meta http-equiv="content-type" content="text/html;
              charset=utf-8">
            Hello!<br>
            <br>
            I noticed SpamAssassin <b>spamc</b> usage has entered the
            documentation at <a class="moz-txt-link-freetext"
              href="https://wiki2.dovecot.org/HowTo/AntispamWithSieve"
              moz-do-not-send="true">https://wiki2.dovecot.org/HowTo/AntispamWithSieve</a><br>
            <br>
            I'm wondering if the -C (report) option in
            <meta http-equiv="content-type" content="text/html;
              charset=utf-8">
            sa-learn-ham.sh  should use revoke instead of report for
            --ham messages?<br>
            <meta http-equiv="content-type" content="text/html;
              charset=utf-8">
            <br>
            I started using imapsieve with spamc myself just a few weeks
            ago, but I haven't used the reporting ability yet.<br>
            <br>
            Reio<br>
            <br>
          </blockquote>
          <br>
          Hi!<br>
          <br>
          As the warning says, the scripts are untested. If you are able
          to test them and provide modified versions, or confirm they
          work it would be really welcome input!<br>
          <br>
          Aki<br>
        </blockquote>
        <br>
        The trouble is the revoke option for spamc is largely
        undocumented. :( I'll have a look at it anyway.<br>
        <br>
        Thanks,<br>
        Reio<br>
      </blockquote>
      <br>
      Okay, while the man page for spamc is unclear, spamc --help states
      that:<br>
      <pre>-C, --reporttype reporttype
    Report message to collaborative filtering databases.
    <b>Report type should be 'report' for </b><b>spam or 'revoke' for ham.</b>

</pre>
      I've no idea why they can't pick that automatically. :) Off to
      testing.<br>
      <br>
      Reio<br>
    </blockquote>
    <br>
    Okay. The are two ways to do this - either learning (without
    reporting) or reporting (which includes learning).<br>
    <br>
    --learntype=spam/ham and --reporttype=report/revoke are mutually
    exclusive.<br>
    <br>
    The docs currently have:<br>
    <meta http-equiv="content-type" content="text/html; charset=utf-8">
    <pre dir="ltr" id="CA-3e53630682eca3bd2e140922da20e44b138ee3d3" lang="en"><meta http-equiv="content-type" content="text/html; charset=utf-8">sa-learn-spam.sh:
<span class="line"><span class="ResWord"><meta http-equiv="content-type" content="text/html; charset=utf-8">exec</span> /usr/bin/spamc -u <span class="String">${</span><span class="ID">1</span><span class="String">}</span> -L spam -C report<span class="ResWord">
</span></span>
sa-learn-ham.sh:
<span class="line"><span class="ResWord"><meta http-equiv="content-type" content="text/html; charset=utf-8">exec</span> /usr/bin/spamc -u <span class="String">${</span><span class="ID">1</span><span class="String">}</span> -L ham -C report</span></pre>
For learning they should be:
<pre dir="ltr" id="CA-3e53630682eca3bd2e140922da20e44b138ee3d3" lang="en"><span class="line"><span class="ResWord"><meta http-equiv="content-type" content="text/html; charset=utf-8">sa-learn-spam.sh:
exec</span> /usr/bin/spamc -u <span class="String">${</span><span class="ID">1</span><span class="String">}</span> --learntype=spam<span class="ResWord">
</span></span><meta http-equiv="content-type" content="text/html; charset=utf-8">
sa-learn-ham.sh:
<span class="line"><span class="ResWord"><meta http-equiv="content-type" content="text/html; charset=utf-8">exec</span> /usr/bin/spamc -u <span class="String">${</span><span class="ID">1</span><span class="String">}</span> --learntype=ham</span></pre>
For reporting (with learning included):

<pre dir="ltr" id="CA-3e53630682eca3bd2e140922da20e44b138ee3d3" lang="en"><span class="line"><span class="ResWord"><meta http-equiv="content-type" content="text/html; charset=utf-8">sa-learn-spam.sh:
exec</span> /usr/bin/spamc -u <span class="String">${</span><span class="ID">1</span><span class="String">}</span> --reporttype=report # SPAM<span class="ResWord">
</span></span><meta http-equiv="content-type" content="text/html; charset=utf-8">
sa-learn-ham.sh:
<span class="line"><span class="ResWord"><meta http-equiv="content-type" content="text/html; charset=utf-8">exec</span> /usr/bin/spamc -u <span class="String">${</span><span class="ID">1</span><span class="String">}</span> --reporttype=revoke # HAM</span></pre>Good luck,
Reio

</body></html>