Re: Problem with mhl.format

2022-02-19 Thread aalinovi
I don't know what it means but I notice that if I run show all header
fields show up despite being ignored in both mhl.format and mhl.headers.
However, if I use Paul Fox's ml script and run ml on the message those
header fields are gone.

In message , aalin...@riseup.net 
writes:
>In message <20220219233546.22fa318c...@pb-smtp20.pobox.com>, Ken Hornstein=
> writes:
>>
>>Is it possible the "certain mail" that ignores mhl.headers are not
>>MIME messages?  Specifically, do those messages meet the following
>>criteria:
>>
>>- Either lack a top-level Content-Type header, or contain a Content-Type
>>  header that specifies text/plain with either a us-ascii character
>>  set or your native character set
>>- Either lack a Content-Transfer-Encoding header, or contain a C-T-E
>>  header specifying an encoding of 7bit, 8bit, or binary.
>>
>>If the message is considered "text" (by passing BOTH of the above
>>tests), then "show" will run mhl to display the message, which uses
>>mhl.format to display the ENTIRE messages.
>>
>>If the message is considered "nontext" (by failing either one of the
>>above tests) then "show" runs "mhshow" to display the message, which
>>uses mhl to display the headers (which by default uses mhl.headers)
>>and then decodes parts of the msssage body that it can.
>>
>>So if you want to exclude headers in ALL messages, you need to put
>>them in both mhl.headers and mhl.format.  That's because of nmh's
>>incomplete MIME handling.  Sigh.
>>
>>--Ken
>
>This particular message has the following header field:
>
>Content-Type: text/plain; charset=3Dus-ascii
>Content-Transfer-Encoding: 7bit
>From: Arthur Alinovi 
>Mime-Version: 1.0 (1.0)
>Date: Sat, 22 Jan 2022 17:55:10 -0500
>
>After copying all of my "ignore" lines from ~/Mail/mhl.headers to
>~/Mail/mhl.format, they still show up.
>
>Mr Paul Fox wonders if having the ignores lines broken up as I do will
>work or if they should be one long line which he says is how he has it.
>
>Thank you
>
>Arthur
>



Re: Problem with mhl.format

2022-02-19 Thread aalinovi
In message <20220219233546.22fa318c...@pb-smtp20.pobox.com>, Ken Hornstein 
writes:
>
>Is it possible the "certain mail" that ignores mhl.headers are not
>MIME messages?  Specifically, do those messages meet the following
>criteria:
>
>- Either lack a top-level Content-Type header, or contain a Content-Type
>  header that specifies text/plain with either a us-ascii character
>  set or your native character set
>- Either lack a Content-Transfer-Encoding header, or contain a C-T-E
>  header specifying an encoding of 7bit, 8bit, or binary.
>
>If the message is considered "text" (by passing BOTH of the above
>tests), then "show" will run mhl to display the message, which uses
>mhl.format to display the ENTIRE messages.
>
>If the message is considered "nontext" (by failing either one of the
>above tests) then "show" runs "mhshow" to display the message, which
>uses mhl to display the headers (which by default uses mhl.headers)
>and then decodes parts of the msssage body that it can.
>
>So if you want to exclude headers in ALL messages, you need to put
>them in both mhl.headers and mhl.format.  That's because of nmh's
>incomplete MIME handling.  Sigh.
>
>--Ken

This particular message has the following header field:

Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
From: Arthur Alinovi 
Mime-Version: 1.0 (1.0)
Date: Sat, 22 Jan 2022 17:55:10 -0500

After copying all of my "ignore" lines from ~/Mail/mhl.headers to
~/Mail/mhl.format, they still show up.

Mr Paul Fox wonders if having the ignores lines broken up as I do will
work or if they should be one long line which he says is how he has it.

Thank you

Arthur



Re: Problem with mhl.format

2022-02-19 Thread Ken Hornstein
>Even tho x-apple-move-tofolder, x-apple-action and other lines are in
>~/Mail/mhl.headers, they still show up in the message.
>
>What am I missing or not understanding?

Is it possible the "certain mail" that ignores mhl.headers are not
MIME messages?  Specifically, do those messages meet the following
criteria:

- Either lack a top-level Content-Type header, or contain a Content-Type
  header that specifies text/plain with either a us-ascii character
  set or your native character set
- Either lack a Content-Transfer-Encoding header, or contain a C-T-E
  header specifying an encoding of 7bit, 8bit, or binary.

If the message is considered "text" (by passing BOTH of the above
tests), then "show" will run mhl to display the message, which uses
mhl.format to display the ENTIRE messages.

If the message is considered "nontext" (by failing either one of the
above tests) then "show" runs "mhshow" to display the message, which
uses mhl to display the headers (which by default uses mhl.headers)
and then decodes parts of the msssage body that it can.

So if you want to exclude headers in ALL messages, you need to put
them in both mhl.headers and mhl.format.  That's because of nmh's
incomplete MIME handling.  Sigh.

--Ken



Problem with mhl.format

2022-02-19 Thread aalinovi
When I originally posted to the list several days ago I indicated
~/Mail/mhl.format. I should have indicated ~/Mail/mhl.headers.

My question, simply put, is why certain mail seems to ignore the ignores
line in ~/Mail/mhl.headers.

In +inbox, running show 1:

Return-path: 
Original-recipient: rfc822;aalin...@icloud.com
Received: by cadfael.fios-router.home (fdm 2.0, account "icloud") 
with imap (version=TLSv1/SSLv3 TLS_AES_256_GCM_SHA384 256 bits)
Sun, 13 Feb 2022 08:58:54 -0500
Received: from st11p00im-ztav05242101.me.com by
p28-mailgateway-smtp-7769fd697d-2jtb4 (mailgateway 2207B140)
with SMTP id f3eb0828-57f7-4a95-b95c-10ac54280593 
for ; Sat, 22 Jan 2022 22:55:16 GMT
X-Apple-MoveToFolder: INBOX 
X-Apple-Action: MOVE_TO_FOLDER/INBOX
X-Apple-UUID: f3eb0828-57f7-4a95-b95c-10ac54280593
Received: from mx1.riseup.net (mx1.riseup.net [198.252.153.129])
by st11p00im-ztav05242101.me.com (Postfix) with ESMTPS id
C5CA8C40A64
for ; Sat, 22 Jan 2022 22:55:14 + (UTC)
X-ICL-SCORE: 3.3330330300
X-ICL-INFO:
GAtbVUseBVFGSVVESAMGUldZCh4MXUMRSFsIVVhDQ19XFwkZHRIWBxFERBYZXF8MGg8PNwpZRQcA

CUgZHUQUQhMdW1UKWUUHAAlIGR1EFEIGEBZKWgEPWltLU0VWAQNRW0hUTloQXgcZFltVFUgHTAcQ

FRINQBgMEA1EVwhERF9XFB5GVkJfERAMFlkWVUJAVR0CSlpCXxEQDBZZFlVCQFUUDxNFEgpUMD8j

Mz0Jck8wQFZBVQRyV0FUJE9OcxtSRDpXRE0HD1cxS1c3CllFBwAJSBkdRAhAVQsFSlpRVw4cFwkB
 EXBfARkWExNWU1kPVw==

My ~/Mail/mhl.headers file:

; mhl.headers
;
; Default format file for displaying headers in
; MIME messages.  mhn calls the mhlproc with this
; filter to display message header.
;
overflowtext="***",overflowoffset=5
leftadjust,compwidth=9
ignores=msgid,message-id,received,content-type,content-transfer-encoding,content-id
ignores=x-spam-report,x-spam_report,x-spam-checker-version,x-spam-level,x-spam-pyzor
ignores=x-spam-status,x-spam_score_int,x-spam_score,x-spam_bar,x-spam_action,replied
ignores=list-archive,list-post,list-help,list-subscribe,list-id,list-unsubscribe
ignores=return-path,delivered-to,in-reply-to,references,received-spf,x-beenthere
ignores=x-mailman-version,errors-to,sender,precedence,x-ironport-reputation
ignores=x-mhe-checksum,ironport-sdr,x-ironport-remoteip,x-ironport-mid
ignores=x-ironport-listener,x-ironport-mailflowpolicy,x-iqcropid,x-envelope-from
ignores=x-originalarrivaltime,x-ironport-sendergroup,x-google-dkim-signature
ignores=x-gm-message-state,x-received,x-google-smtp-source,x-received,x-mailer
ignores=x-google-original-from,authentication-results,dkim-signature,reply-to
ignores=x-feedback-id,x-tm-id,x-info,x-jmailer,x-unsubscribe-web,x-rpcampaign
ignores=x-riseup-user-id,x-rss-id,x-rss-url,x-apple-movetofolder,x-apple-action
ignores=x-apple-uuid,x-icl-score,x-icl-info,x-dmarc-info
ignores=x-dmarc-policy,x-mantsh,x-clx-shades,x-virtualserver,x-virtualservergroup
ignores=x-mailingid,x-smheadermap,x-destination-id,x-smfbl,x-subscriber,x-accountcode
ignores=x-reportingkey
Date:formatfield="%<(nodate{text})%{text}%|%(pretty{text})%>"
To:
cc:
From:formatfield="%(unquote(decode{text}))"
Subject:decode
:
extras:nocomponent
:

Even tho x-apple-move-tofolder, x-apple-action and other lines are in
~/Mail/mhl.headers, they still show up in the message.

What am I missing or not understanding?

Thank you






Re: Problem with mhl.format

2022-02-17 Thread aalinovi
In message <20220215152817.3744f22...@orac.inputplus.co.uk>, Ralph Corderoy 
writes:
>
>Picking on the simplest problem first, I'm not aware of this behaviour
>being per folder so I can't explain that unless the +inbox message
>doesn't have a x-spam-report field whereas the +nmh one does.
>
>With the current message in each folder set appropriately, what does
>this give?
>
>egrep -Him1 '^$|x-spam-report:' `mhpath +inbox .`
>anno -list -number -component x-spam-report +inbox .
>
>egrep -Him1 '^$|x-spam-report:' `mhpath +nmh .`
>anno -list -number -component x-spam-report +nmh .
>
Mr Corderoy - I replied to this message the day I received it. However,
since I do not see my cc in the mailing list I assume something went
wrong and you never got it.

As requested:

/home/slaurel$ folder +inbox
inbox+ has 17 messages  (1-20); cur=2; (others).

/home/slaurel$ egrep -Him1 '^$|x-spam-report:' `mhpath +inbox .`
/home/slaurel/Mail/inbox/2:X-Spam-Report: 

/home/slaurel$ anno -list -number -component x-spam-report +inbox .
1   malware *  0.0 TXREP TXREP: Score normalizing based on sender's 
reputation

/home/slaurel$ folder +nmh
nmh+ has 118 messages  (1-118); cur=118.

/home/slaurel$ egrep -Him1 '^$|x-spam-report:' `mhpath +nmh .`
/home/slaurel/Mail/nmh/118:X-Spam-Report: 

/home/slaurel$ anno -list -number -component x-spam-report +nmh .
1   * -2.5 RCVD_IN_HOSTKARMA_W RBL: Sender listed in HOSTKARMA-WHITE
  *  [209.51.188.17 listed in hostkarma.junkemailfilter.com]  *
-0.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% *  [score:
0.0054]  *  0.1 CK_NAIVER_NO_DNS At least one sender has no verified
rDNS*  (postfix only)   *  0.0 FORWARD_RELAY Appears to be
relayed through list or forwarding   *  0.6 KAM_COUK Scoring .co.uk
emails higher due to poor registry   *  security.* -0.0
SPF_PASS SPF: sender matches SPF record  * -0.0 SPF_HELO_PASS SPF: HELO
matches SPF record   *  0.0 ENV_FROM_DIFF0 Envelope From differs
from from (eg list) *  0.2 HEADER_FROM_DIFFERENT_DOMAINS From and
EnvelopeFrom 2nd level*  mail domains are different   *  0.1
CK_KARD_SIZE short, card virus size - avoid matches in long  *
text *  0.0 CK_419SIZE typical 419 size - avoid matches in long text
*  0.0 KAM_DMARC_STATUS Test Rule for DKIM or SPF Failure with Strict
*  Alignment* -0.0 T_SCC_BODY_TEXT_LINE No description
available.   * -0.1 AM_TRUNCATED Compensate on large message for
misfiring rules * -1.0 MAILING_LIST_MULTI Multiple indicators imply
a widely-seen list  *   manager *  0.1 TXREP TXREP: Score normalizing based 
on sender's reputation
/home/slaurel$ 





Re: Problem with mhl.format

2022-02-15 Thread Ralph Corderoy
Hi Arthur,

> Now if I run show on a mail message in +inbox the x-spam-report does
> not show. However if I run show on a message in +nmh the x-spam-report
> does show along with content-type, message-id and every other header
> field.

Picking on the simplest problem first, I'm not aware of this behaviour
being per folder so I can't explain that unless the +inbox message
doesn't have a x-spam-report field whereas the +nmh one does.

With the current message in each folder set appropriately, what does
this give?

egrep -Him1 '^$|x-spam-report:' `mhpath +inbox .`
anno -list -number -component x-spam-report +inbox .

egrep -Him1 '^$|x-spam-report:' `mhpath +nmh .`
anno -list -number -component x-spam-report +nmh .

-- 
Cheers, Ralph.



Re: Problem with mhl.format

2022-02-15 Thread aalinovi
I would like to start from the beginning if I may as what I am
experiencing makes no sense to me.
I downloaded a fresh copy of nmh and unzipped it. I didn't re-install
 but only copied generic versions of both mhl.format and mhl.headers 
to ~/Mail/ where I have my nmh files.
Since I am not sure which file is involved I added the line:
"ignores=x-spam-report" to both mhl.format and mhl.headers.
Now if I run show on a mail message in +inbox the x-spam-report does not
show. However if I run show on a message in +nmh the x-spam-report does
show along with content-type, message-id and every other header field.
However, if I run mhshow on a message in +nmh the x-spam-report line is not
visible. The lines I have in ~/.mh_profile are:

showproc: less
mhshow: -noconcat
mhshow-show-text/html: w3m %F

To answer your question about mhl:

/bin$ /usr/local/libexec/nmh/mhl -form /usr/bin/passwd -nomoreproc
mhl: vfgets() botch -- you lose big
/bin$ 

I am sure this is something obvious but I am at a loss to understand it.

Arthur

In message <20220215105458.9dfd11f...@orac.inputplus.co.uk>, Ralph Corderoy 
writes:
>Hi aalinovi,
>
>> I am not sure where I messed up, but suddenly nmh seems to be ignoring
>> the mhl.format file, specifically the "ignores" line.
>> This is a basic mhl.format file with no editing or alterations on my
>> part.
>
>What command are you using which fails, e.g. show, mhshow.  That would
>be the starting point for seeing when it leads to mhl being run.
>
>If you introduce a syntax error into the mhl.format you think is being
>used, does mhl grumble?
>
>$ /usr/lib/nmh/mhl -form /etc/passwd -nomoreproc
>mhl: format file syntax error: root:x:0:0:root:/root:/bin/bash
>$
>
>-- 
>Cheers, Ralph.
>



Re: Problem with mhl.format

2022-02-15 Thread Ralph Corderoy
Hi aalinovi,

> I am not sure where I messed up, but suddenly nmh seems to be ignoring
> the mhl.format file, specifically the "ignores" line.
> This is a basic mhl.format file with no editing or alterations on my
> part.

What command are you using which fails, e.g. show, mhshow.  That would
be the starting point for seeing when it leads to mhl being run.

If you introduce a syntax error into the mhl.format you think is being
used, does mhl grumble?

$ /usr/lib/nmh/mhl -form /etc/passwd -nomoreproc
mhl: format file syntax error: root:x:0:0:root:/root:/bin/bash
$

-- 
Cheers, Ralph.



Problem with mhl.format

2022-02-14 Thread aalinovi
I am not sure where I messed up, but suddenly nmh seems to be ignoring 
the mhl.format file, specifically the "ignores" line.
This is a basic mhl.format file with no editing or alterations on my 
part.
If anyone could offer suggestions I would appreciate it.
Thanks