Re: Plans for distribution updates

2023-01-01 Thread Leonardo Taccari
Hello folks,

Ken Hornstein writes:
> Everyone,
>
> So now that we've started the release cycle process (thanks, David!) I
> am wondering what the plans are for getting 1.8 packages into various
> distributions.  I did the Homebrew formula for MacOS X and I'm glad
> to do it for 1.8.  But I am wondering what other operating systems we
> should target.  Ones that come to mind are:
>
> - Various RPM-based distributions (Fedora, RedHat, CentOS, Rocky, and I am
>   sure others)
> - Debian (and anything else that uses .deb files)
> - FreeBSD/NetBSD/OpenBSD 'ports' systems
>
> I am sure there are others.  I guess I am wondering what needs to be done
> to "turn the crank" so 1.8 makes it into the packaging distributions.
> I know for Homebrew once the pull request is accepted all Homebrew users
> should get the new version relatively quickly, and I think the ports systems
> are similar but I don't know what needs to happen for the others.
> [...]

I will take care of pkgsrc (NetBSD one).

I have already packaged the 1.8-RC1 in pkgsrc-wip to more easily test
and update it and at least on NetBSD/amd64 current-ish (9.99.98) all
tests passes.

And yeah, at least for pkgsrc updating should be quick.


Thanks!



Re: NMH IMAP GPG

2020-01-07 Thread Leonardo Taccari
john doe writes:
> Hi,
>

Hello John,

> As far as I understand it, NMH can not be used directly with IMAP,so I
> would like to use FDM for this.
> If it is possible, I would appriciate any pointers on how to do this?
>

I basically have the following in fdm.conf:

 | # Pipe to nmh's rcvstore using %[ml] as MH folder
 | action "rcvstore" pipe "/usr/pkg/libexec/nmh/rcvstore +%[ml]"
 | 
 | # Populate headers tags needed by rules
 | match "^cc:(.*)" in headers action tag "cc" value "%1" continue
 | match "^from:(.*)" in headers action tag "from" value "%1" continue
 | match "^list-id:(.*)" in headers action tag "list-id" value "%1" continue
 | match "^to:(.*)" in headers action tag "to" value "%1" continue
 |
 | [...]
 |
 | # Public MLs
 | #
 | # All of them have the following form:
 | #
 | #  match string "%[list-id]" to "XXXML" or string "%[to]" to "XXXML" or 
string "%[cc]" to "XXXML" actions { tag "ml" value "XXXTAGML" action "rcvstore" 
}
 | #
 | # where XXXML can be the ML address or List-Id: field
 | # and XXXTAGML is the MH # folder that will be used
 |

So, for examples these are the two rules to match nmh-announce and nmh-workers
mailing lists and respective store the in the nmh-announce and
nmh-workers folders:

 | match string "%[list-id]" to "nmh-announce[@.]nongnu.org" or string "%[to]" 
to "nmh-announce[@.]nongnu.org" or string "%[cc]" to 
"nmh-announce[@.]nongnu.org" actions { tag "ml" value "nmh-announce" action 
"rcvstore" }
 | match string "%[list-id]" to "nmh-workers[@.]nongnu.org" or string "%[to]" 
to "nmh-workers[@.]nongnu.org" or string "%[cc]" to "nmh-workers[@.]nongnu.org" 
actions { tag "ml" value "nmh-workers" action "rcvstore" }

...and if the email doesn't match any rule I store them in an INBOX MH
folder:

 | # ...no luck, go to the INBOX!
 | match all actions { tag "ml" value "INBOX" action "rcvstore" }

> An other need for my MUA is the ability to use email encryption/signing
> with GPG.
> For now, I'm not sure how/if I can use GPG with NMH?
>
> Any feedback on the above is welcome.
>

You can use Neil Rickert's mhpgp that could be found here:

 http://faculty.cs.niu.edu/~rickert/mh/

I just set `rsakey' as an environment variable and then after finished
to compose an email via comp(1) or repl(1), in what(1) prompt you can
just type `e mhsign -m' to sign the email.



Re: [nmh-workers] persistent nmh welcome

2018-08-30 Thread Leonardo Taccari
Hello Kevin,

Kevin Cosgrove writes:
> [...]
> The following persists in presenting itself with each new login the
> first time I run an nmh command, e.g. 'scan' is the one that generated
> what's below. One symptomatic machine runs Fedora 26, and the other
> symptomatic machine runs Fedora 27. I'm guessing that there's a
> file that gets written or touched that stops this from happening on
> subsequent nmh commands. Further, that file might be prevented somehow
>  from being written, or it might be getting erased somehow.
>
> Any ideas where to look?
> [...]

There should be a `Version:' string in `mhpath +`/`mhparam context`.

This can be disabled by adding a `Welcome: disable' entry in the
nmh profile.

(But, unfortunately no idea why that happens every time... Maybe
some program/script removes the `Version:' line in the context
every login?)

-- 
nmh-workers
https://lists.nongnu.org/mailman/listinfo/nmh-workers


Re: [nmh-workers] Quoting non-ASCII in reply

2018-08-20 Thread Leonardo Taccari
Hello Conrad,

Conrad Hughes writes:
> [...]
> .. at first I thought that mhfixmsg might help, but things seem to end
> up in even more of a mess after (for example) 'mhfixmsg -reformat
> -replacetextplain'..
> [...]

Have you also tried `mhfixmsg -textcharset utf-8'?

-- 
nmh-workers
https://lists.nongnu.org/mailman/listinfo/nmh-workers


Re: [nmh-workers] Reproducible build patch

2018-07-23 Thread Leonardo Taccari
Hello valdis, Ken and nmh-workers@,

valdis.kletni...@vt.edu writes:
> [...]
> Also, the "date +s" and the "date -u -r" don't do what you think they do...
> [...]

I think that `date +s' is a typo - probably missing a `%' as you've
noticed - while `date -u -r' (that's after the `||') should work on
most BSD systems.

> [...]
> I'm assuming that the BSD 'date'  takes -r as a timestamp rather than a 
> filename.  Somebody
> on a BSD system will need to check that.

This is what happens on NetBSD (if I'm not missing something the
it is similar to what happens with GNU date):

 | % cat /tmp/date.sh
 | DATE_FMT="%Y-%m-%d %T +"
 | SOURCE_DATE_EPOCH="${SOURCE_DATE_EPOCH:-$(date +%s)}"
 | date=$(TZ=GMT0 date --date="@$SOURCE_DATE_EPOCH" "+$DATE_FMT" 2>/dev/null || 
date -u -r "$SOURCE_DATE_EPOCH" "+$DATE_FMT" 2>/dev/null || date -u 
"+$DATE_FMT")
 | echo $date
 | % date && sh -x date.sh
 | Mon Jul 23 23:57:26 CEST 2018
 | + DATE_FMT='%Y-%m-%d %T +'
 | + date '+%s'
 | + SOURCE_DATE_EPOCH=1532383046
 | + TZ=GMT0 date '--date=@1532383046' '+%Y-%m-%d %T +' 2>/dev/null
 | + date -u -r 1532383046 '+%Y-%m-%d %T +' 2>/dev/null
 | + date='2018-07-23 21:57:26 +'
 | + echo 2018-07-23 '21:57:26' +
 | 2018-07-23 21:57:26 +

-- 
nmh-workers
https://lists.nongnu.org/mailman/listinfo/nmh-workers


Re: [nmh-workers] The message Body Shows but the Subject doesn't Decode.

2018-06-16 Thread Leonardo Taccari
Hello Martin,

"Martin McCormick" writes:
> There is a message on a discussion group which I can read just
> fine but the subject line is not decoding.
>
> Subject: 
> =?UTF-8?B?UmU6IFtibGluZC1oYW1zXSBXaGlzdGxlciB0byBMYXVuY2ggTmV3IExTTSBDYXBhYmxlIFNjYW5uZXJzIOKAkyBXaGlzdGxlciBHcm91cA==?=
>
> [...]

The format file used by show should be mhl.format (that should be
in `mhparam etcdir`/mhl.format) and by default it has a:

 | Subject:decode

line.

Can you please check if the mhl.format has a `Subject:decode'
line?


(A bit unrelated but I think that `-f' option passed to strace
should also trace child processes, but at least as part of `show',
`mhl' is not invoked)

-- 
nmh-workers
https://lists.nongnu.org/mailman/listinfo/nmh-workers


Re: [nmh-workers] bug report -- message does not go away

2018-05-12 Thread Leonardo Taccari
Hello Edo,

"Edo (Edoardo Biagioni)" writes:
> Recently I updated to ubuntu 18.04, and I got the message below.  In
> spite of the promise on the last line, the message (and the need to
> press "enter" for each email that I read) does not go away.
>
> I have tried purging (apt purge) and re-installing nmh, and nothing
> changed.
>
> Please advise

Adding `Welcome: disable' in ~/.mh_profile will disable it.

(However, normally it shouldn't reappear, except if you update nmh
and/or if the `Version:' line in the context is not present)

-- 
nmh-workers
https://lists.nongnu.org/mailman/listinfo/nmh-workers


Re: [Nmh-workers] Third release candidate for 1.7.1 is now available

2018-02-22 Thread Leonardo Taccari
Hello Norman,

n...@dad.org writes:
> [...]
> Extremely minor glitch:
>
> I got the initial greeting twice,  with the first and
> second commands I ran. The first was:
>
>  scan -v
>
> The second was via a perl script and was something like:
>
>  MAILDROP=something inc -nochangecur"
>
> I don't remember that glitch in the past, but it is so minor that I might
> well have not noticed or ignored it.
> [...]

Oh, I guess that's because `scan -v' does not modify `context', e.g.:

 | % cat `mhpath +`/`mhparam context`
 | Version: nmh-1.7.1-RC2
 | Current-Folder: nmh-workers
 | % scan -v
 | 
 | Welcome to nmh version 1.7.1-RC3
 | [...]
 | Press enter to continue:
 | 
 | scan -- nmh-1.7.1-RC3 built 2018-02-22 18:01:22 + on boh
 | % cat `mhpath +`/`mhparam context`
 | Version: nmh-1.7.1-RC2
 | Current-Folder: nmh-workers
 | % scan -v
 | 
 | Welcome to nmh version 1.7.1-RC3
 | [...]
 | scan -- nmh-1.7.1-RC3 built 2018-02-22 18:01:22 + on boh
 | % scan cur
 | 
 | Welcome to nmh version 1.7.1-RC3
 | [...]
 | >N   3495 n...@dad.org  Thu Feb 22 08:51 Re: [Nmh-workers] Third release 
candidate for 1.7.1 is now available
 | % scan -v
 | scan -- nmh-1.7.1-RC3 built 2018-02-22 18:01:22 + on boh

-- 
Nmh-workers
https://lists.nongnu.org/mailman/listinfo/nmh-workers


Re: [Nmh-workers] Announcing the second release candidate of nmh 1.7.1

2018-01-23 Thread Leonardo Taccari
Hello Ken and nmh-workers@,

Ken Hornstein writes:
> [...]
> This is a patch release for 1.7, and fixes some output problems with
> the format engine, issues with rcvdist(1) passing switches to post(8), and
> a number of problems discovered with the test suite.
>
> If you encounter any problems or issues with this release candidate, please
> don't hesitate to contact nmh-workers@nongnu.org.
> [...]

I have just added a package in pkgsrc-wip in order to update mail/nmh
when 1.7.1 is out, run the test suite, installed and I'm now using
it (on NetBSD-current) and I have not found any regression.


Thank you very much and keep up the good work!

-- 
Nmh-workers
https://lists.nongnu.org/mailman/listinfo/nmh-workers


Re: [Nmh-workers] mhshow/test-charset failures in nmh-1.7 (`Can't convert ?us-ascii to UTF-8')

2017-11-27 Thread Leonardo Taccari
Hello David,

David Levine writes:
> [...]
> That was the intent, too.  Based on Ralph's (re-?)discovery that the charset
> name gets normalised by GNU iconv, I see now why the test behaved differently
> on the FreeBSD 10 buildbot.
>
> I reworked test-charset to reflect that.  It still uses EBCDIC-US.
> [...]

I can confirm that after the
`f81046da683a14b2265a501f0de00df264a77413' commit about test-charset now
it passes the tests also with NetBSD builtin iconv(1).


Thank you very much!

-- 
Nmh-workers
https://lists.nongnu.org/mailman/listinfo/nmh-workers


Re: [Nmh-workers] mhshow/test-charset failures in nmh-1.7 (`Can't convert ?us-ascii to UTF-8')

2017-11-23 Thread Leonardo Taccari
Hello Ralph and the entire nmh community,
First thank you very much for the pointers and feedbacks. I was
finally able to find why the test passed and failed, it actually
depends if `libiconv' package (the GNU iconv implementation, NetBSD
has an iconv(3) and iconv(1) also in base)... So, let's try to analyze
that!

For completeness, regarding my `locale' configuration:

 % locale
 LANG="en_US.UTF-8"
 LC_CTYPE="en_US.UTF-8"
 LC_COLLATE="C"
 LC_TIME="en_US.UTF-8"
 LC_NUMERIC="en_US.UTF-8"
 LC_MONETARY="en_US.UTF-8"
 LC_MESSAGES="en_US.UTF-8"
 LC_ALL="en_US.UTF-8"

(But, I think that this shouldn't matter according my code reading
of relevant parts of nmh test suite because the test suite correctly
inject them in the environment.)

Ralph Corderoy writes:
> Let us know if you work it out.  That test shouldn't fail regardless of
> the local oddness so we'd want to improve, but spotting what's odd
> should make diagnosis easier;  that's why I asked.  If you reach a dead
> end, tell us that too so one of us can try and work out the problem.

After finding that having the `libiconv' package installed made a
difference I first looked if the several nmh binaries was linked
against the GNU iconv(3) or the NetBSD iconv(3) and in both cases
it's correctly linked to the NetBSD iconv(3).

I have then ktruss(1)-ed the test phases and spotted that iconv(1)
is invoked in test/mhshow/test-charset:

| 23 skip_param_value_checks=0
| 24 if test "$ICONV_ENABLED" -eq 0; then
| 25 text_size=10
| 26 else
| 27 text_size=11
| 28  For unknown reasons, the parameter values checks fail on the
| 29  FreeBSD10 buildbot.  It doesn't support EBCDIC-US, which is 
used
| 30  by the checks, so check for that.  Though that doesn't seem 
to be
| 31  the reason.
| 32 printf '\xe4' | iconv -f EBCDIC-US -t UTF-8 >/dev/null 2>&1  ||
| 33 skip_param_value_checks=1
| 34 fi

And, with NetBSD iconv(1) I have:

 % printf '\xe4' | /usr/bin/iconv -f EBCDIC-US -t UTF-8
 U

...while with iconv(1) provided by the `libiconv' package:

 % printf '\xe4' | /usr/pkg/bin/iconv -f EBCDIC-US -t UTF-8
 /usr/pkg/bin/iconv: conversion from EBCDIC-US unsupported
 /usr/pkg/bin/iconv: try '/usr/pkg/bin/iconv -l' to get the list of supported 
encodings
 % echo $?
 1

So, in if GNU iconv(1) is available `$skip_param_value_checks' is
set to 1.

Later, always in test/mhshow/test-charset:

| 85 if test $skip_param_value_checks -eq 1; then
| 86 finish_test
| 87 exit $failed
| 88 fi

This is before 'Encoded parameter value' and 'replacement character
in parameter value' tests, so these last two tests aren't executed,
`$failed' is 0 and hence test-charset PASSes.

I'm now curious if apart FreeBSD and NetBSD with `libiconv' package
installed what happens on other platforms, just checking the exit status
of: 

 $ printf '\xe4' | iconv -f EBCDIC-US -t UTF-8

will be probably enough.

If the exit status is 0 and then, in test-charset context
`$skip_param_value_checks' is 0, what happens if you try (this is
stolen entirely from 'replacement character in parameter value'
test in test-charset):

 $ printf "Subject: invalid parameter value charset\nMIME-Version: 
1.0\nContent-Type: text/plain; charset*=invalid''%%0Dus-ascii\n" | \
 mhshow -file - | cat

Here, I have:

| Subject: invalid parameter value charset
| 
| mhshow: Can't convert ?us-ascii to UTF-8
| mhshow: unable to convert character set from ?us-ascii, continuing...
| [ part  - text/plain -   0B  ]


Thank you for the attention!

-- 
Nmh-workers
https://lists.nongnu.org/mailman/listinfo/nmh-workers


Re: [Nmh-workers] mhshow/test-charset failures in nmh-1.7 (`Can't convert ?us-ascii to UTF-8')

2017-11-20 Thread Leonardo Taccari
Hello Ralph,

Ralph Corderoy writes:
> [...]
> I had a quick go, and couldn't.  Can you think of anything unusual about
> this test system compared to the RC[123] ones that passed?  What's your
> output from `locale'?  (Though the tests should take care of that.)
> [...]

OK, I have just tried to reproduce that with nmh-1.7RC3 and it
seems that I can reproduce it as well (i.e. test/mhshow/test-charset
fails). So, sorry for the noise, it should be a local configuration
issue.

I hope I will be able to figure out what's going on and update you
regarding that (but only for the pathological curiosity of weird local
configuration! :)).


Thanks for the quick feedback and sorry again for the noise!

-- 
Nmh-workers
https://lists.nongnu.org/mailman/listinfo/nmh-workers


[Nmh-workers] mhshow/test-charset failures in nmh-1.7 (`Can't convert ?us-ascii to UTF-8')

2017-11-20 Thread Leonardo Taccari
Dear nmh community,
first of all thank you very much for working and releasing nmh-1.7!

In the process of updating mail/nmh package in pkgsrc I've rerun
the tests (as I've done periodically for the three 1.7 RCs) and with
nmh-1.7 I have found this - maybe - new test failure (this is on
a not-so-current NetBSD-current amd64 8.99.1, not sure if that
matter though, it's the same version where I have run the previous
test for 1.7 RCs):

 *** .../test/testdir/21398.expectedMon Nov 20 13:27:20 2017
 --- .../test/testdir/21398.actual  Mon Nov 20 13:27:20 2017
 ***
 *** 3,6 
 --- 3,8 

   MIME-Version: 1.0

 + mhshow: Can't convert ?us-ascii to UTF-8
 + mhshow: unable to convert character set from ?us-ascii, continuing...
   [ part  - text/plain -   0B  ]

 ./test/mhshow/test-charset: test failed, outputs are in 
.../test/testdir/21398.expected and .../test/testdir/21398.actual.
 first named test failure: replacement character in parameter value
 FAIL: test/mhshow/test-charset

It seems that the unexpected output `+ mhshow: ...' are printed to the
stderr but also ends up in the `*.actual' file.

Is this (accidentally) expected, should I try to investigate if I
have some weird local configuration that is picked up (that's
probable! :)) or, can you reproduce it as well?

For completeness I will attach also the 21398.{expected,actual}
files but I'm pretty happy to help debugging/testing possible patch
so feel free to contact me if you can't reproduce that!


Thank you for the attention and thanks again for nmh-1.7!
[ Message inbox:12 ]
Subject: invalid parameter value charset

MIME-Version: 1.0

mhshow: Can't convert ?us-ascii to UTF-8
mhshow: unable to convert character set from ?us-ascii, continuing...
[ part  - text/plain -   0B  ]
[ Message inbox:12 ]
Subject: invalid parameter value charset

MIME-Version: 1.0

[ part  - text/plain -   0B  ]
-- 
Nmh-workers
https://lists.nongnu.org/mailman/listinfo/nmh-workers

Re: [Nmh-workers] Call for testing of nmh 1.7 release candidate 3

2017-08-26 Thread Leonardo Taccari
Hello Thomas,

Thomas Levine writes:
> Oh, oops, I clearly didn't look there. How about mentioning in the
> welcome that differences from version 1.6 are noted in
> "$PREFIX/share/doc/nmh/NEWS", or just "/usr/local/share/doc/nmh/NEWS"?
> I am happy to contribute a patch that renders the former location.

If I'm not missing something this is already done, e.g.:

 % $EDITOR `mhpath +`/`mhparam context`
 [... change the `Version:' to something older, e.g. just an
  s/RC3/RC2/ will be enough if you're running 1.7-RC3 ...]
 % new
 
 Welcome to nmh version 1.7-RC3
 
 See the release notes in /usr/pkg/share/doc/nmh/NEWS

 [...]
 Press enter to continue:

___
Nmh-workers mailing list
Nmh-workers@nongnu.org
https://lists.nongnu.org/mailman/listinfo/nmh-workers


Re: [Nmh-workers] Call for testing of nmh 1.7 release candidate 3

2017-08-25 Thread Leonardo Taccari
Hello Ken,

Ken Hornstein writes:
> [...]
> I am feeling reasonably confident about the quality of nmh 1.7 release
> candidate 3. To that end, I sure would appreciate it if you had not had
> a chance yet to test any nmh 1.7 release candidates, that you give RC3 a
> try.  If there are no issues with RC3 I hope to go to 1.7 final within
> a week or two; widespread testing would greatly assist this process.  So
> if you have a moment or two to spare, give RC3 a try and let us know how
> it works for you. If you've already done that, then thank you!
> [...]

That's a great news!

Back on how it works... I can confirm that the several bugs that
affected early 1.7 RCs and I was able to reproduce are fixed on 1.7RC3.
I have also run the tests on NetBSD/amd64 8.99.1 against 1.7RC3 and...:

 [...]
 
 All 110 tests passed
 (1 test was not run)
 
 [...]

(the 1 test not run was the one that required valgrind, so it was
expected and not a regression).


Thank you and all nmh developers and community that made that possible!
Keep up the good work!

___
Nmh-workers mailing list
Nmh-workers@nongnu.org
https://lists.nongnu.org/mailman/listinfo/nmh-workers


[Nmh-workers] mhical vs /dev/null (possible NULL pointer dereference)

2017-08-17 Thread Leonardo Taccari
Hello to the entire nmh community!
Today I've finally received an email with an `.ics' and so I've
used the new `mhical'. After running it via `mhical' I've figured
out that it expected an ics file as input and after just pressing
^D I've found that mhical wasn't happy about an empty input.

To reproduce it:

 % ./mhical < /dev/null
 Segmentation fault (core dumped)
 Exit 139
 % gdb -core ./mhical.core ./mhical
 Reading symbols from ./mhical...done.
 [New process 1]
 Core was generated by `mhical'.
 Program terminated with signal SIGSEGV, Segmentation fault.
 #0  display (nfs=, clines=0x0, file=0x623a98 <__sF+152>) at 
uip/mhical.c:717
 717 if (clines->next) {
 (gdb) quit

I'll attach in this email a possible trivial patch that should fix
this issue.
I have verified that it applies cleanly both to latest git version and
1.7RC1 (IMHO it's a good idea to apply it for 1.7 too).


Thank you for the attention and keep up the good work!
Avoid a possible NULL pointer dereference when mhical does not receive any input
(e.g. calling it via `mhical < /dev/null').

--- uip/mhical.c.orig	2017-08-02 03:50:07.0 +
+++ uip/mhical.c
@@ -714,7 +714,7 @@ display (FILE *file, contentline *clines
 }
 
 /* Don't call on the END:VCALENDAR line. */
-if (clines->next) {
+if (clines  &&  clines->next) {
   (void) fmt_scan (fmt, buffer, INT_MAX, dat, NULL);
   fputs (charstring_buffer (buffer), file);
   fmt_free (fmt, 1);
___
Nmh-workers mailing list
Nmh-workers@nongnu.org
https://lists.nongnu.org/mailman/listinfo/nmh-workers


Re: [Nmh-workers] nmh-1.7-RC1: scan with complex subjects dumps core

2017-08-07 Thread Leonardo Taccari
Hello Ralph,

Ralph Corderoy writes:
> [...]
> MACHINES says that's ftp/curl on FreeBSD, if you're interested.
> configure checks for its header file and library IIRC.  But I'm happy
> with the tests that were run.
> [...]

...indeed now I can report:


All 110 tests passed
(1 test was not run)


Thank you for the pointer!

___
Nmh-workers mailing list
Nmh-workers@nongnu.org
https://lists.nongnu.org/mailman/listinfo/nmh-workers


Re: [Nmh-workers] nmh-1.7-RC1: scan with complex subjects dumps core

2017-08-06 Thread Leonardo Taccari
Hello Ralph,

> [...]
> I've re-written the MULTIBYTE_ENABLED cpstripped() on git's master
> branch, not the 1.7 one.  Could you give it a go with what failed
> before, and ideally run a `make check' and if all's well a
> `NMH_VALGRIND=1 VALGRIND_ME=1 make check' to give it a work out, it
> takes a while, with your different definitions of Unicode widths.
> docs/README.developers explains those two variables.
> [...]

Sure! At least regarding the `make check' (always on NetBSD/amd64
8.99.1), all 104 tests are passed and 7 tests were not run. Regarding
the not run ones (all expected):

 [...]
 ./test/inc/test-deb359167: skipped: missing valgrind
 SKIP: test/inc/test-deb359167 
 [...]
 ./test/oauth/test-inc: skipped: no oauth support
 SKIP: test/oauth/test-inc 
 ./test/oauth/test-mhlogin: skipped: no oauth support
 SKIP: test/oauth/test-mhlogin 
 ./test/oauth/test-mhparam: skipped: no oauth support
 SKIP: test/oauth/test-mhparam 
 ./test/oauth/test-send: skipped: no oauth support   
 SKIP: test/oauth/test-send
 ./test/oauth/test-sendfrom: skipped: no oauth support   
 SKIP: test/oauth/test-sendfrom
 ./test/oauth/test-share: skipped: no oauth support  
 SKIP: test/oauth/test-share   
 [...]

(the former because valgrind isn't available here, the latter because
oauth support wasn't enabled).

Back to the problematic Norm's email (and some emails that I had
that exposed the same Norm's problem):

 % scan -format '%(decode{subject})' +. 1
 ?Sun’s out, savings ON—shop major appliance deals now

So it no longer asserts and instead of sunglasses a `?' is printed! Yay!

Regarding `NMH_VALGRIND=1 VALGRIND_ME=1 make check' unfortunately on
NetBSD valgrind isn't available so I can't probably help for these tests,
sorry.


Thank you very much Ralph for the investigation and for fixing this bug!

___
Nmh-workers mailing list
Nmh-workers@nongnu.org
https://lists.nongnu.org/mailman/listinfo/nmh-workers


Re: [Nmh-workers] nmh-1.7-RC1: scan with complex subjects dumps core

2017-08-05 Thread Leonardo Taccari
Ralph Corderoy writes:
> Hi Leonardo,
>
> [...]

Hello Ralph,

> That would do it.  Could you apply the attached patch and re-run?  I'm
> basically interested in how that locale classes it, e.g.  iswprint(3).
>

Sure! Here what I see with your patch applied:

 % scan -format '%(decode{subject})' +. 1
 mbtowc(0x20) = 1
 cntrl:0  space:1  blank:1  print:1
 mbtowc(0x1f576) = 4
 cntrl:0  space:0  blank:0  print:0
 wcwidth(0x1f576) = -1
 assertion "w >= 0" failed: file "sbr/fmt_scan.c", line 296, function 
"cpstripped"
 Abort (core dumped)
 Exit 134

___
Nmh-workers mailing list
Nmh-workers@nongnu.org
https://lists.nongnu.org/mailman/listinfo/nmh-workers


Re: [Nmh-workers] nmh-1.7-RC1: scan with complex subjects dumps core

2017-08-05 Thread Leonardo Taccari
Hello Ralph,
I was bitten by something similar and so I've rebuilt nmh-1.7-RC1 with
debug symbols, attached some (hopefully) useful debug information (I've
used gdb though because AFAIK ltrace isn't available on NetBSD).

Ralph Corderoy writes:
> [...]
> Could you run this scan command with 1.7-RC1 to make sure it still has
> the assert(3) failure on the problem email.
>
> scan -format '%(decode{subject})' cur
> [...]

I've mhstore-ed Norm's problematic email as `1' in the current directory
and reproduced it via:

 % scan -format '%(decode{subject})' +. 1
 assertion "w >= 0" failed: file "sbr/fmt_scan.c", line 291, function 
"cpstripped"
 Abort (core dumped)
 Exit 134

Looking at the problematic char on gdb (this is on NetBSD/amd64 8.99.1):

 % gdb -core ./scan.core `which scan`
 Reading symbols from /usr/pkg/bin/scan...done.
 [New process 1]
 Core was generated by `scan'.
 Program terminated with signal SIGABRT, Aborted.
 #0  0x7e7fe9b2725a in _lwp_kill () from /usr/lib/libc.so.12
 (gdb) bt
 #0  0x7e7fe9b2725a in _lwp_kill () from /usr/lib/libc.so.12
 #1  0x7e7fe9b26e75 in abort () at /usr/src/lib/libc/stdlib/abort.c:74
 #2  0x7e7fe9b26a03 in __assert13 (file=file@entry=0x4171ff 
"sbr/fmt_scan.c", line=line@entry=291,
 function=function@entry=0x417600 <__func__.6577> "cpstripped", 
failedexpr=failedexpr@entry=0x4171f8 "w >= 0")
 at /usr/src/lib/libc/gen/assert.c:72
 #3  0x00407552 in cpstripped (dest=dest@entry=0x7e7fe9901560, max=136,
 str=0x7f7fffc11e41 "\360\237\225\266Sun\342\200\231s out, savings 
ON\342\200\224shop major appliance deals now",
 str@entry=0x7f7fffc11e40 " \360\237\225\266Sun\342\200\231s out, savings 
ON\342\200\224shop major appliance deals now")
 at sbr/fmt_scan.c:291
 #4  0x00407bf7 in fmt_scan (format=, 
scanlp=0x7e7fe9901560, width=136, dat=dat@entry=0x623c10 ,
 callbacks=callbacks@entry=0x0) at sbr/fmt_scan.c:450
 #5  0x00403dda in scan (inb=inb@entry=0x7e7fe9d83460, 
innum=innum@entry=1, outnum=outnum@entry=0,
 nfs=nfs@entry=0x7e7fe9901500 "%(decode{subject})", width=, 
width@entry=-1, curflg=, unseen=0,
 folder=0x7e7fe9918268 "/tmp/m", size=0, noisy=1, scanl=0x7f7fffc14408) at 
uip/scansbr.c:326
 #6  0x00403435 in main (argc=, argv=) at 
uip/scan.c:256
 (gdb) f 3
 #3  0x00407552 in cpstripped (dest=dest@entry=0x7e7fe9901560, max=136,
 str=0x7f7fffc11e41 "\360\237\225\266Sun\342\200\231s out, savings 
ON\342\200\224shop major appliance deals now",
 str@entry=0x7f7fffc11e40 " \360\237\225\266Sun\342\200\231s out, savings 
ON\342\200\224shop major appliance deals now")
 at sbr/fmt_scan.c:291
 291 assert(w >= 0);
 (gdb) list
 286
 287 prevCtrl = 0;
 288
 289 #ifdef MULTIBYTE_SUPPORT
 290 w = wcwidth(wide_char);
 291 assert(w >= 0);
 292 if (max >= (size_t) w) {
 293 charstring_push_back_chars (dest, altstr ? altstr : str, 
char_len, w);
 294 max -= w;
 295 str += char_len;
 (gdb) print w
 $1 = 
 (gdb) print wide_char
 $2 = 128374 L'\x1f576'
 (gdb) quit

L'\x1f576' (in wide_char) is probably the `dark sunglasses' (U+1F576)
unicode character and directly trying to:

 wcwidth(L'\x1f576')

...returns `-1'.

If you need any further information please let me know!

___
Nmh-workers mailing list
Nmh-workers@nongnu.org
https://lists.nongnu.org/mailman/listinfo/nmh-workers


Re: [Nmh-workers] The first release candidate of nmh 1.7 is now available!

2017-08-03 Thread Leonardo Taccari
Hello Ken,

Ken Hornstein writes:
> [...]
> I am pleased to announce that after three years we are finally starting
> the release cycle for nmh 1.7 and the first release candidate is now
> available!  You can download it here:
>
> http://download-mirror.savannah.gnu.org/releases/nmh/nmh-1.7-RC1.tar.gz
>
> [...]

That's great! Thank you and to all nmh developers involved in it!

> The release has a large number of bug fixes and new features.  The NEWS
> file included in the distribution has a reasonably complete list of the
> significant changes.
>
> If you encounter any problems or issues with this release candidate, please
> don't hesitate to contact us at nmh-workers@nongnu.org.

I have just updated the nmh pkgsrc package (mail/nmh) in pkgsrc-wip
to 1.7-RC1 - available as wip/nmh - to ease testing and then update
mail/nmh when it will be released.

For the moment I haven't find any problems/issues with 1.7-RC1 but
I'll surely report them (the only "issue" that maybe will bite
other nmh package maintainers was the configure's --sysconfdir (if
for previous release they already passed a nmh/ subdirectory, like
we did for pkgsrc) argument semantic change, but luckily it was
very easy to debug and documented in NEWS! :))


Thank you very much again!

___
Nmh-workers mailing list
Nmh-workers@nongnu.org
https://lists.nongnu.org/mailman/listinfo/nmh-workers


Re: [Nmh-workers] Incorporating RSS and Atom feeds

2017-05-19 Thread Leonardo Taccari
Hello Thomas!

Thomas Levine writes:
> I have incorporated RSS and Atom feeds as MH messages so that I may read the
> feeds with nmh.
> https://pypi.python.org/pypi/fh
> https://thomaslevine.com/scm/fh/artifact/4f0dd5f8873a8d17
> 
> Has someone else already written a better version of this? My implementation
> so far has only some of the features that I want.

I'm pretty happy with rss2email. Apart some (pkgsrc) LOCALPATCHES[0]
all the works is done by an AWK script (and `rsssm' calls it in order to
ignore all possible - and irrelevant - sendmail flags passed by
rss2email):

% cat rsssm   
#!/bin/sh 

rsssm-plumber 
% cat rsssm-plumber   
#!/usr/bin/awk -f 

/^To:/ {  
if (!folder) {
to = $2   
sub(/@.*/, "", to)  
folder = to   
storer = "MH=~/.mh_rss_profile /usr/pkg/libexec/nmh/rcvstore +" 
folder  
} 
} 
  
{ 
if (!storer) {
lines = (lines) ?  lines "\n" $0 : $0   
} else {  
if (lines) {  
print lines "\n" $0 | storer
lines = ""  
} else {  
print $0 | storer   
} 
} 
} 

END { 
close(storer) 
} 

...then I just set in ~/.config/rss2email.cfg

 email-protocol = sendmail
 sendmail = /home/leot/bin/rsssm

...and adjust every feed entry as follows:

 [feed.example]
 url = http://www.example.org/feed.rss
 to = example@rss2email.invalid

In that way `rsssm-plumber' will just process the `To:' header and
then store the feed^Wmails accordingly in the `+example' folder.


[0]: https://www.NetBSD.org/~leot/pkgsrc-localpatches/mail/rss2email/

___
Nmh-workers mailing list
Nmh-workers@nongnu.org
https://lists.nongnu.org/mailman/listinfo/nmh-workers


Re: [Nmh-workers] Add a -sendmail switch to post(8) and send(1)

2015-08-21 Thread Leonardo Taccari
Hello Ken,

Ken Hornstein writes:
 Looks great!  Please send patches that include man page updates and I'll
 make sure it gets in there.
As requested a new version of the patches that also include man
page updates are attached in this email. The patches attached in the
previous email are not modified but I have attached them here as well
for completeness.

In case I am missing something please let me know!


Thank you very much again!
Ciao,
L.
--- man/post.man.orig	2015-08-21 06:31:27.0 +
+++ man/post.man
@@ -24,6 +24,8 @@ post \- deliver a message
 .IR columns ]
 .RB [ \-mts
 .IR smtp  |  sendmail/smtp  |  sendmail/pipe ]
+.RB [ \-sendmail
+.IR program ]
 .RB [ \-server
 .IR servername ]
 .RB [ \-port
@@ -184,6 +186,14 @@ but can be overriiden here with the
 .B \-mts
 switch.
 .PP
+If nmh is using as its mail transport system
+.BR sendmail/pipe ,
+the
+.B \-sendmail
+switch can be used to override the default
+.B sendmail
+program.
+.PP
 If nmh is using the SMTP MTA, the
 .B \-server
 and the
--- man/send.man.orig	2015-08-21 06:31:27.0 +
+++ man/send.man
@@ -32,6 +32,8 @@ send \- send a message
 .RB [ \-watch  |  \-nowatch ]
 .RB [ \-mts
 .IR smtp  |  sendmail/smtp  |  sendmail/pipe ]
+.RB [ \-sendmail
+.IR program ]
 .RB [ \-server
 .IR servername ]
 .RB [ \-port
@@ -367,6 +369,14 @@ but can be overriiden here with the
 .B \-mts
 switch.
 .PP
+If nmh is using as its mail transport system
+.BR sendmail/pipe ,
+the
+.B \-sendmail
+switch can be used to override the default
+.B sendmail
+program.
+.PP
 If nmh is using the SMTP MTA, the
 .B \-server
 and the
--- uip/post.c.orig	2015-08-21 06:31:27.0 +
+++ uip/post.c
@@ -87,6 +87,7 @@
 X(notls, TLSminc(-5), NTLSSW) \
 X(fileproc, -4, FILEPROCSW) \
 X(mhlproc, -3, MHLPROCSW) \
+X(sendmail program, 0, MTSSM) \
 X(mts smtp|sendmail/smtp|sendmail/pipe, 2, MTSSW) \
 X(credentials legacy|file:filename, 0, CREDENTIALSSW) \
 X(messageid localname|random, 2, MESSAGEIDSW) \
@@ -473,6 +474,12 @@ main (int argc, char **argv)
 		mhlproc = cp;
 		continue;
 
+		case MTSSM:
+		if (!(cp = *argp++) || *cp == '-')
+			adios (NULL, missing argument to %s, argp[-2]);
+sendmail = cp;
+		continue;
+
 		case MTSSW:
 		if (!(cp = *argp++) || *cp == '-')
 			adios (NULL, missing argument to %s, argp[-2]);
--- uip/send.c.orig	2015-08-21 06:31:27.0 +
+++ uip/send.c
@@ -69,6 +69,7 @@
 X(tls, TLSminc(-3), TLSSW) \
 X(initialtls, TLSminc(-10), INITTLSSW) \
 X(notls, TLSminc(-5), NTLSSW) \
+X(sendmail program, 0, MTSSM) \
 X(mts smtp|sendmail/smtp|sendmail/pipe, 2, MTSSW) \
 X(messageid localname|random, 2, MESSAGEIDSW) \
 
@@ -256,6 +257,7 @@ main (int argc, char **argv)
 		case SASLMXSSFSW:
 		case USERSW:
 		case PORTSW:
+		case MTSSM:
 		case MTSSW:
 		case MESSAGEIDSW:
 		vec[vecp++] = --cp;
--- uip/whatnowsbr.c.orig	2015-08-21 06:31:27.0 +
+++ uip/whatnowsbr.c
@@ -953,6 +953,7 @@ buildfile (char **argp, char *file)
 X(tls, TLSminc(-3), TLSSW) \
 X(initialtls, TLSminc(-10), INITTLSSW) \
 X(notls, TLSminc(-5), NTLSSW) \
+X(sendmail program, 0, MTSSM) \
 X(mts smtp|sendmail/smtp|sendmail/pipe, 2, MTSSW) \
 X(messageid localname|random, 2, MESSAGEIDSW) \
 
@@ -1142,6 +1143,7 @@ sendit (char *sp, char **arg, char *file
 		case SASLMECHSW:
 		case USERSW:
 		case PORTSW:
+		case MTSSM:
 		case MTSSW:
 		case MESSAGEIDSW:
 		vec[vecp++] = --cp;
___
Nmh-workers mailing list
Nmh-workers@nongnu.org
https://lists.nongnu.org/mailman/listinfo/nmh-workers