Wietse Venema via Postfix-users wrote in
 <4tqc213rcwzj...@spike.porcupine.org>:
 |So you're suggesting that as long as an MTA-to Milter connection
 |is not in an error state, sending
 |
 |    SMFIC_QUIT_NC 
 |
 |and later sending 
 |
 |    SMTIC_CONNECT
 |
 |are sufficient to make a Milter fully forget a past SMTP session and
 |to make it ready to handle events from a new SMTP session?
 |
 |I'd like to see some documentation for that.

Well.  That is how QUIT_NC is documented i would say, i munged it to

  a_SMFIC_QUIT_NC = 'K', /* QUIT but new connection follows (since Sendmail 
8.14) */

So this implies that SMFIC_CONNECT is to be expected next.  I have

  $Id: milter-protocol.txt,v 1.6 2004/08/04 16:27:50 tvierling Exp $

which does not yet have _NC.  But the flow is

 * MTA                  Milter
 *
 * SMFIC_OPTNEG
 *                      SMFIC_OPTNEG
 * SMFIC_MACRO:'C'
 * SMFIC_CONNECT
 *                      Accept/reject action
 * SMFIC_MACRO:'H'
 * SMFIC_HELO

and

 * SMFIC_BODYEOB

^ 'E'

 *                      Modification action (multiple, may be none)
 *                      Accept/reject action
 *
 *                      (Reset state to before SMFIC_MAIL and continue,
 *                       unless connection is dropped by MTA)
 *

as well as

   * 'A'  SMFIC_ABORT     Abort current filter checks
   *                      Expected response:  NONE
   *
   * (Resets internal state of milter program to before SMFIC_HELO, but keeps
   * the connection open.)

plus in addition

 * 'Q'  SMFIC_QUIT      Quit milter communication
 *                      Expected response:  Close milter connection
 *

So if sendmail 8.14 documents QUIT_NC as

  a_SMFIC_QUIT_NC = 'K', /* QUIT but new connection follows (since Sendmail 
8.14) */

and does not close the socket from its point of view, then the
above implies that SMFIC_CONNECT is to be expected next.

I mean, if you want to be on the safe side, you can always place
an 'A'bort command first, which "you do quite often", ie, i have
seen

  Jan 30 01:25:11 (none) s-postdkim-sign: [5017][debug]: read 1 bytes ok, cmd 
is E/69
  Jan 30 01:25:11 (none) s-postdkim-sign: [5017][debug]: WRITE WROTE LENGTH, 
PAYLOAD 1
  Jan 30 01:25:11 (none) s-postdkim-sign: [5017][debug]: LOOP TICK
  Jan 30 01:25:11 (none) s-postdkim-sign: [5017][debug]: READ SELECTS
  Jan 30 01:25:26 (none) s-postdkim-sign: [5017][debug]: READ READ LENGTH, 
PAYLOAD 1
  Jan 30 01:25:26 (none) s-postdkim-sign: [5017][debug]: read 1 bytes ok, cmd 
is A/65
  Jan 30 01:25:26 (none) s-postdkim-sign: [5017][debug]: LOOP TICK
  Jan 30 01:25:26 (none) s-postdkim-sign: [5017][debug]: READ SELECTS
  Jan 30 01:25:26 (none) s-postdkim-sign: [5017][debug]: READ READ LENGTH, 
PAYLOAD 1
  Jan 30 01:25:26 (none) s-postdkim-sign: [5017][debug]: read 1 bytes ok, cmd 
is A/65
  Jan 30 01:25:26 (none) s-postdkim-sign: [5017][debug]: LOOP TICK
  Jan 30 01:25:26 (none) s-postdkim-sign: [5017][debug]: READ SELECTS
  Jan 30 01:25:26 (none) s-postdkim-sign: [5017][debug]: READ READ LENGTH, 
PAYLOAD 1
  Jan 30 01:25:26 (none) s-postdkim-sign: [5017][debug]: read 1 bytes ok, cmd 
is Q/81

ie two 'A' in a row.

I would therefore assume that if a milter negotiates a version
number that implies QUIT_NC, it should be able to deal with.
Especially since everybody uses libmilter and libmilter is
sendmail which invented QUIT_NC.  No?

Oh that would be wonderful, Wietse Venema.  Only ever QUIT_NC, and
i keep relying upon spawn(8) for the milter and let everything up
to only main.cf and master.cf, and be out of the business of
systemd and all that!

--steffen
|
|Der Kragenbaer,                The moon bear,
|der holt sich munter           he cheerfully and one by one
|einen nach dem anderen runter  wa.ks himself off
|(By Robert Gernhardt)
_______________________________________________
Postfix-users mailing list -- postfix-users@postfix.org
To unsubscribe send an email to postfix-users-le...@postfix.org

Reply via email to