stenur changed the topic of #mailx to: SysV mail/BSD Mail/POSIX mailx: send and receive Internet mail | May take a day, Sundays never | Logs: https://libera.irclog.whitequark.org/mailx
<arekm> en_GB.UTF-8
<arekm> [arekm@ixion ~]$ echo $LANG; lynx --dump https://google.com | mail -:/ -Smta=test -s "test" root
<arekm> en_GB.UTF-8
<arekm> s-nail: Cannot find a usable character set to encode message: No such entry, file or directory
<arekm> /home/users/arekm/dead.letter 39/1677
<arekm> s-nail: ... message not sent
<arekm> [arekm@ixion ~]$ lynx --dump https://google.com | LC_ALL=C mail -:/ -Sttycharset=utf8 -Smta=test -s "test" root
<arekm> s-nail: Cannot find a usable ch
<stenur> This is very strange.
<stenur> He.
<stenur> curl https://www.google.com -o x.html; iconv -f utf8 -tlatin1 < x.html >x2.html
<stenur> iconv: illegal input sequence at position 9685
<stenur> < x.html mail -:/ -Smta=test -Smime-force-sendout -Sttycharset=utf8 -s test d@a > bogus-but-works.mbox
<stenur> Hm. Funny. Somehow they use LATIN1 in a document declared to contain UTF-8. But -- this is german. If you are english this should not be your problem likely.
<stenur> Anyhow. -Smime-force-sendout does it.
<stenur> In v14.10 there will be *iconv-disable* available for -S iconv-disable.
<stenur> Until then the input must be valid as it will be passed through iconv no matter what. (Unless disabled at compile time.)
<stenur> Hope that helps.
<stenur> ...Google! I mean, .. wow and oops.
<arekm> Adding mime-force-sendout as default here then (otherwise it would be very problematic "mail" replacement)
<stenur> Werner Fink of SUSE was it who asked for iconv-disable. I refrained from making mime-force-sendout a default; well i mean -- have you tried it once with -Sttycharset=latin1?
<stenur> ..If that is package you could also edit mx-config.h and replace '#define CHARSET_8BIT "utf-8"' with latin1. latin1 should never fail i would think.
<stenur> This can be overwritten by users.
<stenur> (Via *charset-8bit*)
<stenur> It is by default only latin1 if we do not have iconv.
<stenur> But i think you are right to make force-sendout a default. I think i will do that. With credit to you.
<stenur> And thanks for a PLD Linux recipe.
<arekm> Another tiny issue - SHELL gets ignored (not seeing why yet) - https://pastebin.com/yBrixTPu
<stenur> What is that sync-mutex thing?
<stenur> VAL_SHELL?
<stenur> Ie VAL_SHELL=...bash
<arekm> ends up hardcoded in mk-config.mk
<arekm> test: all $(ECHO_TEST)/bin/sh /home/users/arekm/rpm/BUILD/s-nail-14.9.24/mx-test.sh --check ./s-nail
<stenur> You need to use VAL_SHELL not SHELL.
<stenur> We run the test with the shell that is later used when the MUA is used.
<arekm> but I use /bin/sh for built time and only need bash for tests
<arekm> and VAL_SHELL as variable is not used for tests in .obj/mk-config.mk but hardcoded /bin/sh from build time
<stenur> Hm i mean does it matter to you which shell drives the test? The test runs on quite a couple of platforms. Important is which shell is then used by the MUA when the tests are run, and that is VAL_SHELL?
<stenur> Btw View arekm's full-sized avatar
<stenur> hm clipboard that i have not copied; i wanted to say Btw Arkadiusz Miśkiewicz, which email address for the credit?
<arekm> actually I can use any test just "No process groups available, killed tests may leave process "zombies"!"
<arekm> arekm@maven.pl
<stenur> ok :)
<stenur> mksh
<stenur> no but wait $SHELL= is re-execed. with a typo though "# Re-exxec ourselfs with the "correct" $SHELL, if not already."
<stenur> AH! Wait. Looking at your pastebin again. You cannot overwrite SHELL for "make test". You must do it when "make config" runs, im- or explicitly (ie make all or what)
<arekm> Don't want to use bash at config time. Leaving as is. Potential zombies left are not a big deal. (in theory bash is optional here in pld)
<arekm> Thanks for help. mime-force-sendout solved my problem :)
<stenur> Ok. Ciao.
<stenur> (The problem is with what MAKEFLAGS carries etc, and mk-config.sh actively overwrites SHELL on Sun/Solaris, for example. Maybe an additional TEST_SHELL= make.rc variable would do something for you. Keeping that on the list for v14.10.)
<arekm> Still need to figure out how to get that sent as not base64 (and as 8bit instead for example) but that's for tomorrow.
<stenur> That will not do, Arkadiusz.
<stenur> The input is faulty.
<stenur> To let it be treated as text you must say which character set it is.
<stenur> In v14.10 there will be *ttycharset-detect*.
<stenur> You could then say -S ttycharset-detect=latin1, and we check the content ourselfs, and if it is valid UTF-8 then it is that, otherwise we would use latin1. (The value given, if any.)
<stenur> latin1 always succeeds, whether it is right or not.
<stenur> Or you set *iconv-disable*, and then we send garbage. :( I only added iconv-disable after periodic year long prodding of Werner Fink of SUSE.
<stenur> Interesting that Google also sends out falsely encoded content for the Polish.
<stenur> But the ttycharset-detect is a good thing. vim(1) also checks the content to figure out its fileencoding=.
<arekm> In many cases (various existing scripts etc that then mail output) partial garbage is better than not sending anything, so I can understand why he needs that. Looking for something similar (aka do "we try our best but still send" fallback). v14.10 then, and ttycharset-detect (after it gets released)
<stenur> It needs to be configured; for you then iso-8859-2 maybe? Does that work?
<stenur> Yes. mime-force-sendout will be default then in v14.10, and ttycharset-detect is a good thing.
<arekm> I have no clue what people use "mail" (from heirloom mailx as we use that) for currently and what will break if replaced with s-nail. My problem was one case. For now mime-force-sendout and we will see
<arekm> Time to sleep. Thanks again.
<stenur> ciao. (but heirloom should fail also on invalid input.)
<stenur> Good night.