On Fri, Jun 07, 2019 at 06:44:22PM +0300, Henrik K wrote: > On Fri, Jun 07, 2019 at 11:39:12AM -0400, Kevin A. McGrail wrote: > > On 6/7/2019 11:33 AM, Henrik K wrote: > > > Well the information is there. In many places. You are saying you are > > > consistently using things like spamassassin -t -D | grep __LOWER_E | wc -l > > > to debug your rules? > > > > Close. I am consistently using spamassassin -t -D 2>&1 | grep -i -e > > Content\ analysis -e KAM, for example and since I write mostly meta > > rules, I get some really long and hard to read subtest debug lines. > > Well the question was more for John. I understand your previous problem, > that's fine. > > I don't understand how a line describing there are x more identical lines > makes debugging any harder. Just count 10+21, that's it. It doesn't take > more effort to read the whole spamassassin -D |less output manually than it > does to create an exact grep | wc -l for the problem.
Ok let's take an example I can come up with... spamassassin -t -D -L < testmsg 2>&1 |grep __LOWER_E Jun 7 18:55:58.772 [8203] dbg: rules: ran body rule __LOWER_E ======> got hit: "e" Jun 7 18:55:58.773 [8203] dbg: rules: ran body rule __LOWER_E ======> got hit: "e" Jun 7 18:55:58.773 [8203] dbg: rules: ran body rule __LOWER_E ======> got hit: "e" Jun 7 18:55:58.773 [8203] dbg: rules: ran body rule __LOWER_E ======> got hit: "e" Jun 7 18:55:58.773 [8203] dbg: rules: ran body rule __LOWER_E ======> got hit: "e" Jun 7 18:55:58.773 [8203] dbg: rules: ran body rule __LOWER_E ======> got hit: "e" Jun 7 18:55:58.773 [8203] dbg: rules: ran body rule __LOWER_E ======> got hit: "e" Jun 7 18:55:58.773 [8203] dbg: rules: ran body rule __LOWER_E ======> got hit: "e" Jun 7 18:55:58.773 [8203] dbg: rules: ran body rule __LOWER_E ======> got hit: "e" Jun 7 18:55:58.773 [8203] dbg: rules: ran body rule __LOWER_E ======> got hit: "e" Jun 7 18:55:59.009 [8203] dbg: check: subtests=__BODY_LE_200,__BODY_TEXT_LINE(2),__DOS_RCVD_TUE,__ENV_AND_HDR_FROM_MATCH,__E_LIKE_LETTER(31),__HAS_DATE,__HAS_FROM,__HAS_MESSAGE_ID,__HAS_MSGID,__HAS_RCVD,__HAS_SUBJECT,__KAM_BODY_LENGTH_LT_1024,__KAM_BODY_LENGTH_LT_128,__KAM_BODY_LENGTH_LT_256,__KAM_BODY_LENGTH_LT_512,__KAM_DROPBOX2,__KAM_FAKEDELIVER12,__KAM_FAKEDELIVER4,__KAM_FAKEDELIVER6,__KAM_FAKEDELIVER8,__KAM_GOOGLE2_2,__KAM_HARP3,__KAM_HAS_0_URIS,__KAM_JURY3,__KAM_LOTSOFHASH,__KAM_MAILSPLOIT2,__KAM_MULTIPLE_FROM,__KAM_PAYPAL3B,__KAM_SUBJECT_SINGLEWORD,__KAM_UPS2,__KAM_WU1,__KHOP_NO_FULL_NAME,__LCL__ENV_AND_HDR_FROM_MATCH,__LCL__KAM_BODY_LENGTH_LT_1024,__LCL__KAM_BODY_LENGTH_LT_128,__LCL__KAM_BODY_LENGTH_LT_512,__LOWER_E(31),__MISSING_REF,__MISSING_REPLY,__MSGID_OK_HOST,__MSOE_MID_WRONG_CASE,__NONEMPTY_BODY,__NOT_SPOOFED,__RB_LE_200,__SANE_MSGID,__SINGLE_WORD_LINE,__SINGLE_WORD_SUBJ,__SUBJ_SHORT,__TO_NO_ARROWS_R (Total Subtest Hits: 110 / Deduplicated Total Hits: 49) Perhaps you are expecting to see much more 'ran body rule' lines, which is a bit questionable practise. Do you really want to go browse 200 identical lines? Would a compatible solution be mentioning later duplicates in the same debug line so it can be seen in grep? (notice the last one) Jun 7 18:55:58.772 [8203] dbg: rules: ran body rule __LOWER_E ======> got hit: "e" Jun 7 18:55:58.773 [8203] dbg: rules: ran body rule __LOWER_E ======> got hit: "e" Jun 7 18:55:58.773 [8203] dbg: rules: ran body rule __LOWER_E ======> got hit: "e" Jun 7 18:55:58.773 [8203] dbg: rules: ran body rule __LOWER_E ======> got hit: "e" Jun 7 18:55:58.773 [8203] dbg: rules: ran body rule __LOWER_E ======> got hit: "e" Jun 7 18:55:58.773 [8203] dbg: rules: ran body rule __LOWER_E ======> got hit: "e" Jun 7 18:55:58.773 [8203] dbg: rules: ran body rule __LOWER_E ======> got hit: "e" Jun 7 18:55:58.773 [8203] dbg: rules: ran body rule __LOWER_E ======> got hit: "e" Jun 7 18:55:58.773 [8203] dbg: rules: ran body rule __LOWER_E ======> got hit: "e" Jun 7 18:55:58.773 [8203] dbg: rules: ran body rule __LOWER_E ======> got hit: "e" [... message repeated 21 more times] Jun 7 18:55:59.009 [8203] dbg: check: subtests=__BODY_LE_200,__BODY_TEXT_LINE(2),__DOS_RCVD_TUE,__ENV_AND_HDR_FROM_MATCH,__E_LIKE_LETTER(31),__HAS_DATE,__HAS_FROM,__HAS_MESSAGE_ID,__HAS_MSGID,__HAS_RCVD,__HAS_SUBJECT,__KAM_BODY_LENGTH_LT_1024,__KAM_BODY_LENGTH_LT_128,__KAM_BODY_LENGTH_LT_256,__KAM_BODY_LENGTH_LT_512,__KAM_DROPBOX2,__KAM_FAKEDELIVER12,__KAM_FAKEDELIVER4,__KAM_FAKEDELIVER6,__KAM_FAKEDELIVER8,__KAM_GOOGLE2_2,__KAM_HARP3,__KAM_HAS_0_URIS,__KAM_JURY3,__KAM_LOTSOFHASH,__KAM_MAILSPLOIT2,__KAM_MULTIPLE_FROM,__KAM_PAYPAL3B,__KAM_SUBJECT_SINGLEWORD,__KAM_UPS2,__KAM_WU1,__KHOP_NO_FULL_NAME,__LCL__ENV_AND_HDR_FROM_MATCH,__LCL__KAM_BODY_LENGTH_LT_1024,__LCL__KAM_BODY_LENGTH_LT_128,__LCL__KAM_BODY_LENGTH_LT_512,__LOWER_E(31),__MISSING_REF,__MISSING_REPLY,__MSGID_OK_HOST,__MSOE_MID_WRONG_CASE,__NONEMPTY_BODY,__NOT_SPOOFED,__RB_LE_200,__SANE_MSGID,__SINGLE_WORD_LINE,__SINGLE_WORD_SUBJ,__SUBJ_SHORT,__TO_NO_ARROWS_R (Total Subtest Hits: 110 / Deduplicated Total Hits: 49)
