On 2017-08-04 18:18, Axel Braun wrote:
Am Freitag, 4. August 2017, 13:42:39 CEST schrieb Carlos E. R.:
On 2017-08-04 11:09, Axel Braun wrote:
In the Script that triggers the mail notification I changed the command to write into a file:
echo "--$MIMEBOUNDARY--" ) 2>$ERRORSTO | $SENDMAIL -f$FROMADDR -oi -t
changed to
echo "--$MIMEBOUNDARY--" ) 2>$ERRORSTO | cat > /tmp/examine_me.eml
Result: All Umlauts are there
So I logged in as root (as well as uucp) and tried from the command line: echo abcäöü | mail -s "Täst" $email
-> worked as well.
Ah, but you are not using the same mail command as the script. They call "sendmail" - note that Postfix has a small sendmail binary so that script like that continue working with Postfix.
I would also add something to copy the environment from the script to a file. Something like:
set > file locale > otherfile
Good point. So I exported the locale settings: LANG=de_DE.iso-8859-1 LC_CTYPE=de_DE.UTF-8 LC_NUMERIC="de_DE.iso-8859-1" LC_TIME="de_DE.iso-8859-1" LC_COLLATE="de_DE.iso-8859-1" LC_MONETARY="de_DE.iso-8859-1" LC_MESSAGES="de_DE.iso-8859-1" LC_PAPER="de_DE.iso-8859-1" LC_NAME="de_DE.iso-8859-1" LC_ADDRESS="de_DE.iso-8859-1" LC_TELEPHONE="de_DE.iso-8859-1" LC_MEASUREMENT="de_DE.iso-8859-1" LC_IDENTIFICATION="de_DE.iso-8859-1" LC_ALL=
as well as the output of export:
declare -x HOME="/root" declare -x LANG="de_DE.iso-8859-1" declare -x LC_CTYPE="de_DE.UTF-8" declare -x LOGNAME="root" declare -x OLDPWD declare -x PATH="/usr/sbin:/bin:/usr/bin:/etc:/usr/local/bin" declare -x PWD="/var/spool/hylafax" declare -x SHELL="/bin/sh" declare -x SHLVL="2" declare -x TMPDIR="/tmp/hylafaxtmp-q9ce2pAg" declare -x USER="root" declare -x canonical="032122994" declare -x chopthreshold="3" declare -x client="localhost" declare -x comments="" declare -x commid="000000017" declare -x company="" declare -x conntime="27" declare -x cover="" declare -x csi="<UNSPECIFIED>" declare -x dataformat="2-D MMR" declare -x desiredbr="13" declare -x desireddf="3" declare -x desiredec="2" declare -x desiredst="0" declare -x desiredtl="0" declare -x doneop="remove" declare -x duration="51" declare -x equipment="unknown " declare -x errorcode="" declare -x faxname="" declare -x faxnumber="" declare -x faxstatus="" declare -x files_1="docq/doc13.ps.13" declare -x filetype_1="PostScript" declare -x fromcompany="" declare -x fromlocation="" declare -x fromvoice="" declare -x groupid="13" declare -x ignoremodembusy="0" declare -x jobid="13" declare -x jobtag="Fax Auftrag 13" declare -x jobtype="facsimile" declare -x killtime="1501873773" declare -x location="" declare -x mailaddr="axel.braun@gmx.de" declare -x maxdials="12" declare -x maxtries="6" declare -x minbr="0" declare -x modem="ttyS0" declare -x modemused="ttyS0" declare -x ndials="0" declare -x nfiles="1" declare -x nocountcover="0" declare -x notify="when done+requeued" declare -x npages="1" declare -x npins="0" declare -x ntries="0" declare -x number="0321.2299.0" declare -x owner="axel" declare -x pagechop="default" declare -x pagehandling="" declare -x pagelength="297" declare -x pagewidth="210" declare -x passwd="" declare -x priority="127" declare -x probeonly="0" declare -x receiver="" declare -x regarding="" declare -x resolution="196" declare -x retrytime="0" declare -x returned="2" declare -x schedpri="127" declare -x sender="axel" declare -x serverdocover="0" declare -x signalrate="14400 bit/s" declare -x skippages="0" declare -x skippedpages="0" declare -x state="7" declare -x station="" declare -x subaddr="" declare -x tagline="" declare -x timeofday="" declare -x timezone="" declare -x totdials="1" declare -x totpages="1" declare -x tottries="1" declare -x tsi="" declare -x tts="1501863035" declare -x useccover="1" declare -x usecolor="0" declare -x usexvres="0" declare -x voice=""
...and the funny thing is - the output is chopped this time
Confused...
The hyafax script is using those settings? Not UTF-8? Then that may be the problem. What is using /tmp/examine_me.eml? iso-8859-1 or UTF-8? The mail should be sent using the same thing. Another idea. If your command using "mail" was correct, you could edit the hylafax script to use mail instead. echo "--$MIMEBOUNDARY--" ) 2>$ERRORSTO | $SENDMAIL -f$FROMADDR -oi -t Replace the sendmail call with a "mail" call, which will need changing options. For instance: -f$FROMADDR to -r $FROMADDR -oi When reading a message from standard input, don´t treat a line with only a . character as the end of input. -t Extract recipients from message headers. This requires that no recipients be specified on the command line. -- Cheers / Saludos, Carlos E. R. (from 42.2 x86_64 "Malachite" at Telcontar)