<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>I'm deleting the self.fp on close <a
href="https://github.com/joaoreis81/milter-template/blob/master/milter-template.py">https://github.com/joaoreis81/milter-template/blob/master/milter-template.py</a>:</p>
    <table class="highlight tab-size js-file-line-container"
      data-tab-size="8" style="box-sizing: border-box; border-spacing:
      0px; border-collapse: collapse; tab-size: 8; color: rgb(36, 41,
      46); font-family: -apple-system, BlinkMacSystemFont, "Segoe
      UI", Helvetica, Arial, sans-serif, "Apple Color
      Emoji", "Segoe UI Emoji"; font-size: 14px;
      font-style: normal; font-variant-ligatures: normal;
      font-variant-caps: normal; font-weight: 400; letter-spacing:
      normal; orphans: 2; text-align: start; text-indent: 0px;
      text-transform: none; white-space: normal; widows: 2;
      word-spacing: 0px; -webkit-text-stroke-width: 0px;
      background-color: rgb(255, 255, 255); text-decoration-style:
      initial; text-decoration-color: initial;">
      <tbody style="box-sizing: border-box;">
        <tr style="box-sizing: border-box;">
        </tr>
        <tr style="box-sizing: border-box;">
          <td id="LC114" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace; font-size: 12px; color: rgb(36, 41, 46); overflow-wrap: normal; white-space: pre;"> <span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">def</span> <span class="pl-en" style="box-sizing: border-box; color: rgb(111, 66, 193);">close</span>(<span class="pl-s1" style="box-sizing: border-box;">self</span>):</td>
        </tr>
        <tr style="box-sizing: border-box;">
          <td id="L115" class="blob-num js-line-number"
            data-line-number="115" style="box-sizing: border-box;
            padding: 0px 10px; width: 50px; min-width: 50px;
            font-family: SFMono-Regular, Consolas, "Liberation
            Mono", Menlo, monospace; font-size: 12px; line-height:
            20px; color: rgba(27, 31, 35, 0.3); text-align: right;
            white-space: nowrap; vertical-align: top; cursor: pointer;
            user-select: none;"><br>
          </td>
          <td id="LC115" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace; font-size: 12px; color: rgb(36, 41, 46); overflow-wrap: normal; white-space: pre;">    <span class="pl-c" style="box-sizing: border-box; color: rgb(106, 115, 125);"># always called, even when abort is called.  Clean up</span></td>
        </tr>
        <tr style="box-sizing: border-box;">
          <td id="L116" class="blob-num js-line-number"
            data-line-number="116" style="box-sizing: border-box;
            padding: 0px 10px; width: 50px; min-width: 50px;
            font-family: SFMono-Regular, Consolas, "Liberation
            Mono", Menlo, monospace; font-size: 12px; line-height:
            20px; color: rgba(27, 31, 35, 0.3); text-align: right;
            white-space: nowrap; vertical-align: top; cursor: pointer;
            user-select: none;"><br>
          </td>
          <td id="LC116" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace; font-size: 12px; color: rgb(36, 41, 46); overflow-wrap: normal; white-space: pre;">    <span class="pl-c" style="box-sizing: border-box; color: rgb(106, 115, 125);"># any external resources here.</span></td>
        </tr>
        <tr style="box-sizing: border-box;">
          <td id="L117" class="blob-num js-line-number"
            data-line-number="117" style="box-sizing: border-box;
            padding: 0px 10px; width: 50px; min-width: 50px;
            font-family: SFMono-Regular, Consolas, "Liberation
            Mono", Menlo, monospace; font-size: 12px; line-height:
            20px; color: rgba(27, 31, 35, 0.3); text-align: right;
            white-space: nowrap; vertical-align: top; cursor: pointer;
            user-select: none;"><br>
          </td>
          <td id="LC117" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace; font-size: 12px; color: rgb(36, 41, 46); overflow-wrap: normal; white-space: pre;">    <span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">if</span> <span class="pl-s1" style="box-sizing: border-box;">self</span>.<span class="pl-s1" style="box-sizing: border-box;">fp</span>:</td>
        </tr>
        <tr style="box-sizing: border-box;">
          <td id="L118" class="blob-num js-line-number"
            data-line-number="118" style="box-sizing: border-box;
            padding: 0px 10px; width: 50px; min-width: 50px;
            font-family: SFMono-Regular, Consolas, "Liberation
            Mono", Menlo, monospace; font-size: 12px; line-height:
            20px; color: rgba(27, 31, 35, 0.3); text-align: right;
            white-space: nowrap; vertical-align: top; cursor: pointer;
            user-select: none;"><br>
          </td>
          <td id="LC118" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace; font-size: 12px; color: rgb(36, 41, 46); overflow-wrap: normal; white-space: pre;">      <span class="pl-s1" style="box-sizing: border-box;">self</span>.<span class="pl-s1" style="box-sizing: border-box;">fp</span>.<span class="pl-en" style="box-sizing: border-box; color: rgb(111, 66, 193);">close</span>()</td>
        </tr>
        <tr style="box-sizing: border-box;">
          <td id="L119" class="blob-num js-line-number"
            data-line-number="119" style="box-sizing: border-box;
            padding: 0px 10px; width: 50px; min-width: 50px;
            font-family: SFMono-Regular, Consolas, "Liberation
            Mono", Menlo, monospace; font-size: 12px; line-height:
            20px; color: rgba(27, 31, 35, 0.3); text-align: right;
            white-space: nowrap; vertical-align: top; cursor: pointer;
            user-select: none;"><br>
          </td>
          <td id="LC119" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace; font-size: 12px; color: rgb(36, 41, 46); overflow-wrap: normal; white-space: pre;">      <span class="pl-s1" style="box-sizing: border-box;">self</span>.<span class="pl-s1" style="box-sizing: border-box;">fp</span> <span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 92, 197);">=</span> <span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 92, 197);">None</span></td>
        </tr>
        <tr style="box-sizing: border-box;">
          <td id="L120" class="blob-num js-line-number"
            data-line-number="120" style="box-sizing: border-box;
            padding: 0px 10px; width: 50px; min-width: 50px;
            font-family: SFMono-Regular, Consolas, "Liberation
            Mono", Menlo, monospace; font-size: 12px; line-height:
            20px; color: rgba(27, 31, 35, 0.3); text-align: right;
            white-space: nowrap; vertical-align: top; cursor: pointer;
            user-select: none;"><br>
          </td>
          <td id="LC120" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace; font-size: 12px; color: rgb(36, 41, 46); overflow-wrap: normal; white-space: pre;">      <span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">del</span> <span class="pl-s1" style="box-sizing: border-box;">self</span>.<span class="pl-s1" style="box-sizing: border-box;">fp</span></td>
        </tr>
        <tr style="box-sizing: border-box;">
          <td id="L121" class="blob-num js-line-number"
            data-line-number="121" style="box-sizing: border-box;
            padding: 0px 10px; width: 50px; min-width: 50px;
            font-family: SFMono-Regular, Consolas, "Liberation
            Mono", Menlo, monospace; font-size: 12px; line-height:
            20px; color: rgba(27, 31, 35, 0.3); text-align: right;
            white-space: nowrap; vertical-align: top; cursor: pointer;
            user-select: none;"><br>
          </td>
          <td id="LC121" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace; font-size: 12px; color: rgb(36, 41, 46); overflow-wrap: normal; white-space: pre;">    <span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">return</span> <span class="pl-v" style="box-sizing: border-box; color: rgb(227, 98, 9);">Milter</span>.<span class="pl-v" style="box-sizing: border-box; color: rgb(227, 98, 9);">CONTINUE</span></td>
        </tr>
        <tr style="box-sizing: border-box;">
          <td id="L122" class="blob-num js-line-number"
            data-line-number="122" style="box-sizing: border-box;
            padding: 0px 10px; width: 50px; min-width: 50px;
            font-family: SFMono-Regular, Consolas, "Liberation
            Mono", Menlo, monospace; font-size: 12px; line-height:
            20px; color: rgba(27, 31, 35, 0.3); text-align: right;
            white-space: nowrap; vertical-align: top; cursor: pointer;
            user-select: none;"><br>
          </td>
        </tr>
      </tbody>
    </table>
    <br class="Apple-interchange-newline">
    <p><br>
    </p>
    <div class="moz-cite-prefix">On 2/4/20 6:37 PM, Stuart D. Gathman
      wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:alpine.LRH.2.21.2002041635330.14875@fairfax.gathman.org">On
      Tue, 4 Feb 2020, joao reis wrote:
      <br>
      <br>
      <blockquote type="cite">Maybe the postfix implementation? I'm
        getting this from the Milter.getdiag():
        <br>
        <br>
        DIAGNOSTICO:(3401,3388)
        <br>
        DIAGNOSTICO:(3403,3388)
        <br>
        DIAGNOSTICO:(3403, 3388)
        <br>
      </blockquote>
      <br>
      15 milter context objects active is pretty typical.
      <br>
      <br>
      <blockquote type="cite">
        <blockquote type="cite">In your close method, try deleting
          self.fp.  (del self.fp)
          <br>
          If that doesn't "solve" your problem (it ought to happen
          automatically),
          <br>
          then you are keeping a reference to self.fp around somewhere.
          <br>
        </blockquote>
      </blockquote>
      <br>
    </blockquote>
  </body>
</html>

<!DSPAM:170122BF222209189769310>