[opensuse-factory] hylafax+ 5.5.8 localized Email notification chops german Umlauts
Hi, In current Leap (and TW as well I assume) there seems to be a problem when sending Email notifications in german language: The Umlauts get chopped: What sould be sent: Die folgenden Dokumente wurden zum Versand übermittelt und sind auf dem Server zur erneuten Nutzung verfügbar bis sie automatisch bereinigt werden What is sent: Die folgenden Dokumente wurden zum Versand bermittelt und sind auf dem Server zur erneuten Nutzung verfgbar bis sie automatisch bereinigt werden Note that the Umlauts are missing. Mail itself looks OK from the header: Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable 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. Any idea where the problem could come from? Mail agent is postfix Thanks Axel -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
On 04/08/17 18:39, Axel Braun wrote:
Hi,
In current Leap (and TW as well I assume) there seems to be a problem when sending Email notifications in german language: The Umlauts get chopped:
What sould be sent: Die folgenden Dokumente wurden zum Versand übermittelt und sind auf dem Server zur erneuten Nutzung verfügbar bis sie automatisch bereinigt werden
What is sent: Die folgenden Dokumente wurden zum Versand bermittelt und sind auf dem Server zur erneuten Nutzung verfgbar bis sie automatisch bereinigt werden
Note that the Umlauts are missing. Mail itself looks OK from the header: Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable
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.
Any idea where the problem could come from? Mail agent is postfix
Thanks Axel
Given this is a issue related to a specific piece of software that doesn't effect most people, its probably better as a bug report on bugzilla.opensuse.org so the maintainer can help you diagnose and fix the issue directly. -- Simon Lees (Simotek) http://simotek.net Emergency Update Team keybase.io/simotek SUSE Linux Adelaide Australia, UTC+10:30 GPG Fingerprint: 5B87 DB9D 88DC F606 E489 CEC5 0922 C246 02F0 014B
Gesendet: Freitag, 04. August 2017 um 12:15 Uhr Von: "Simon Lees" <sflees@suse.de> An: opensuse-factory@opensuse.org Betreff: Re: [opensuse-factory] hylafax+ 5.5.8 localized Email notification chops german Umlauts
On 04/08/17 18:39, Axel Braun wrote:
Hi,
In current Leap (and TW as well I assume) there seems to be a problem when sending Email notifications in german language: The Umlauts get chopped:
What sould be sent: Die folgenden Dokumente wurden zum Versand übermittelt und sind auf dem Server zur erneuten Nutzung verfügbar bis sie automatisch bereinigt werden
What is sent: Die folgenden Dokumente wurden zum Versand bermittelt und sind auf dem Server zur erneuten Nutzung verfgbar bis sie automatisch bereinigt werden
Note that the Umlauts are missing. Mail itself looks OK from the header: Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable
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.
Any idea where the problem could come from? Mail agent is postfix
Thanks Axel
Given this is a issue related to a specific piece of software that doesn't effect most people, its probably better as a bug report on bugzilla.opensuse.org so the maintainer can help you diagnose and fix the issue directly.
It is already in bugzilla, but it's probably not a hylafax-specific problem. As many people on the list have deep knowledge in system setup and processes we may get some valuable input. Best regards Axel -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
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 in case when you test with sendmail if it works, compare environments. -- Cheers / Saludos, Carlos E. R. (from 42.2 x86_64 "Malachite" at Telcontar)
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... Axel -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
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)
On 08/04/2017 at 11:09 AM, Axel Braun wrote:
Note that the Umlauts are missing. ... Content-Type: text/plain; charset=iso-8859-1
This looks like a mismatch of character sets. The advertised character set and the actual character set in an email have to match. `file /tmp/examine_me.eml` tells the character set used in that file. `recode utf-8..iso-8859-1` helps to recode your text to the desired character set. You might be able to view the raw email or manually set the character set with your email client. This way you maybe can see the "lost" characters. Have fun, Bernhard -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
Am Montag, 7. August 2017, 21:12:51 CEST schrieb Bernhard Held:
On 08/04/2017 at 11:09 AM, Axel Braun wrote:
Note that the Umlauts are missing.
...
Content-Type: text/plain; charset=iso-8859-1
This looks like a mismatch of character sets. The advertised character set and the actual character set in an email have to match.
That is the case....
`file /tmp/examine_me.eml` tells the character set used in that file.
`recode utf-8..iso-8859-1` helps to recode your text to the desired character set.
You might be able to view the raw email or manually set the character set with your email client. This way you maybe can see the "lost" characters.
Having played some more with it, and redirecting the program call to $SENDMAIL to the fiel as said, in case the call of the notify-script is coming from hylafax, the content is corrupted as well. That means, for whatever reason the handling inside the script causes the error. I'm still trying to fix this...but not yet successful. Cant we set a language environment in systemd, when starting the server? Cheers Axel -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
On 2017-08-08 19:48, Axel Braun wrote:
That means, for whatever reason the handling inside the script causes the error. I'm still trying to fix this...but not yet successful. Cant we set a language environment in systemd, when starting the server?
You set it inside the script that hylafax uses to notify you. Long ago it was /var/spool/fax/bin/notify I have hylafax but it is not working, I have not sent/received a fax in years, would not work over voip. So I can not test this. -- Cheers / Saludos, Carlos E. R. (from 42.2 x86_64 "Malachite" at Telcontar)
Am Dienstag, 8. August 2017, 20:18:03 CEST schrieb Carlos E. R.:
That means, for whatever reason the handling inside the script causes the error. I'm still trying to fix this...but not yet successful. Cant we set a language environment in systemd, when starting the server?
You set it inside the script that hylafax uses to notify you. Long ago it was /var/spool/fax/bin/notify
It still is, and you set language in /var/spool/fax/etc/FaxNotify: LANG=de_DE (or similar). But that most likely will not affect the context notify runs in, I've contacted the author, lets see Thanks Axel -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
Am Dienstag, 8. August 2017, 20:18:03 CEST schrieb Carlos E. R.:
On 2017-08-08 19:48, Axel Braun wrote:
That means, for whatever reason the handling inside the script causes the error. I'm still trying to fix this...but not yet successful. Cant we set a language environment in systemd, when starting the server?
You set it inside the script that hylafax uses to notify you. Long ago it was /var/spool/fax/bin/notify
I have hylafax but it is not working, I have not sent/received a fax in years, would not work over voip. So I can not test this.
Some more insights in between. After applying several changes to the script one can see that the variables get the correct values, but at writing out to sendmail (or a local file) the corruption happens. The only point in time it works is when I change root_uses_lang to 'yes' (means - use de_DE.UTF-8 instead of ctype). So there is a workaround, but not the final solution (export LANG=de_DE in the start of the script does not help either). Maybe one bash-guru has an idea? Alternatively, can we set a locale in the systemd-startscript for the calling process? Thanks Axel -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
participants (5)
-
Axel Braun
-
Axel Braun
-
Bernhard Held
-
Carlos E. R.
-
Simon Lees