pykolab/wallace encoding problem

Michael Menge michael.menge at zdv.uni-tuebingen.de
Thu Jun 29 15:32:18 CEST 2023


Hi,

i have a problem setting up a kolab server for testing. At the moment  
i try to fix
the incoming mail.

/var/log/pykolab.log indicates that there is a problem with the mail  
encoding in wallace.

Traceback (most recent call last):
   File "/usr/lib/python3.9/site-packages/wallace/modules.py", line  
163, in _sendmail
     _response = smtp.sendmail(sender, recipients, msg)
   File "/usr/lib64/python3.9/smtplib.py", line 875, in sendmail
     msg = _fix_eols(msg).encode('ascii')
UnicodeEncodeError: 'ascii' codec can't encode character '\xe4' in  
position 2321: ordinal not in range(128)

The Mail did contain umalauts in my signature. Hex "e4" is the Latin1  
(ISO_8859-1) encoding for
UTF-8 Hex "c3 a4" "LATIN SMALL LETTER A WITH DIAERESIS". This is the  
first umlaut in my mail.

But the the Content Type is "text/plain; charset=utf-8; format=flowed;  
DelSp=Yes"
and the Content-Transfer-Encoding is "8bit". So there should be no "\xe4".

Sending the same mail with Content-Transfer-Encoding  
"quoted-printable" the mail is received
without problems. I am sure that the 8bit mail is encoded correct, as  
the dkim signature is
still valid, the umlauts are displayed in the log-file and postcat  
output in a terminal
with $LANG=C.UTF-8 and the copy received in my other is displayed in  
my mail client
without error.

Is there an error in my setup/configuration or is this a bug in wallace?

The system is AlmaLinux release 9.2

With the following rpm packages
python3-3.9.16-1.el9_2.1.x86_64
python3-libs-3.9.16-1.el9_2.1.x86_64

kolab-16.0.1-50.2.el9.kolab_16.x86_64
pykolab-0.9.0-10.2.el9.kolab_16.noarch
pykolab-xml-0.9.0-10.2.el9.kolab_16.noarch
wallace-0.9.0-10.2.el9.kolab_16.noarch


Kind Regards

     Michael Menge

PS.: I have replaced the umlauts in my signature in case this is a bug  
and others have the same problem.

--------------------------------------------------------------------------------
Michael Menge                          Tel.: (49) 7071 / 29-70316
Universitaet Tuebingen                 Fax.: (49) 7071 / 29-5912
Zentrum fuer Datenverarbeitung         mail:  
michael.menge at zdv.uni-tuebingen.de
Waechterstraße 76
72074 Tuebingen


More information about the users mailing list