WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: A few claws-mail quirks in TC10 x86  (Read 10224 times)

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11632
Re: A few claws-mail quirks in TC10 x86
« Reply #15 on: July 14, 2019, 02:47:49 PM »
Hi Juanito
I don't know. I personally don't bother with that kind of stuff. Function is far more important to me.


Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11632
Re: A few claws-mail quirks in TC10 x86
« Reply #16 on: July 14, 2019, 02:52:40 PM »
Hi Juanito
Hi Juanito
I let  Apps  run an update check and selected updates, then I restart the machine. I just now checked and I see  Apps  showing in
the size tab that I'm still missing a bunch of dependencies. Guess I should have rune a dependency check. Doing it now.
There it was, pinned right at the top of the  TCE Bugs  subforum:
http://forum.tinycorelinux.net/index.php/topic,13342.0.html
Guess I should have read it. :)

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11632
Re: A few claws-mail quirks in TC10 x86
« Reply #17 on: July 14, 2019, 03:11:57 PM »
Hi Juanito
If anyone feels the need for themes, they can check here:
https://www.claws-mail.org/themes.php

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11632
Re: A few claws-mail quirks in TC10 x86
« Reply #18 on: July 24, 2019, 01:05:43 PM »
Hi Juanito
Everytime Gmail routes me to a different serve (usually every 1 or 2 weeks) I get one of these popups:

Yesterday I had that popup on me 4 times, so I decided to search for some answers.
The  claws-mail  wiki states the  Signature status  fields in the above image suggest it can't find the  ca-certificates  package.

A search of the  claws-mail  executable for path and filename information yielded this:
Code: [Select]
tc@box:~$ sudo cat /tmp/tcloop/claws-mail/usr/local/bin/claws-mail  | strings -n 4 | grep -i cert
 ---- SNIP ----
SSL_CERT_FILE
/etc/ssl/cert.pem
/etc/pki/tls/certs/ca-bundle.crt
/etc/certs/ca-bundle.crt
/usr/share/ssl/certs/ca-bundle.crt
/etc/ssl/certs/ca-certificates.crt
/usr/local/ssl/certs/ca-bundle.crt
/usr/lib/ssl/cert.pem
SSL_CERT_DIR
/etc/pki/tls/certs
/etc/certs
/usr/share/ssl/certs
/etc/ssl/certs
/usr/local/ssl/certs
/usr/lib/ssl/certs
 ---- SNIP ----

The  tce.installed/ca-certificates  shows:
Code: [Select]
tc@box:~$ cat /usr/local/tce.installed/ca-certificates
#!/bin/sh
if [ ! -d /usr/local/etc ]; then
        mkdir -p /usr/local/etc
fi
if [ ! -f /usr/local/etc/ca-certificates.conf ]; then
        cp -p /usr/local/share/ca-certificates/files/ca-certificates.conf /usr/local/etc
fi

update-ca-certificates
ln -s /usr/local/etc/ssl/certs/ca-certificates.crt /usr/local/etc/ssl/cacert.pem
ln -s /usr/local/etc/ssl/certs/ca-certificates.crt /usr/local/etc/ssl/ca-bundle.crt
tc@box:~$
It seems the 2 packages use different paths. Not surprising since there is no single standard path.

The man file for  claws-mail  mentions the  SSL_CERT_DIR  and  SSL_CERT_FILE  environmental variables. When I start  claws-mail
like this:
Code: [Select]
tc@box:~$ SSL_CERT_FILE=/usr/local/etc/ssl/ca-bundle.crt SSL_CERT_DIR=/usr/local/etc/ssl/certs claws-mailNow if I click on  Tools->SSL/TLS certificates  I get:

The  Signature status  field now shows  Correct.  It used to show  Uncheckable.

I also noticed  cyrus-sasl.tcz  depends on  openssl-1.1.1.tcz.  ca-certificates.tcz  depends on  openssl.tcz.  Is  ca-certificates.tcz
somehow linked to  openssl.tcz  or can its dependency be changed to  openssl-1.1.1.tcz?

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14819
Re: A few claws-mail quirks in TC10 x86
« Reply #19 on: July 25, 2019, 02:46:33 AM »
openssl-1.1.1 was created for a user who wanted to use a processor with encryption built-in rather than being something to link against. That being said, we will need to swap to openssl-1.1.1 at some  point, which will be a large task.

I'll try to take a look at claws-mail in the next few days.
« Last Edit: July 25, 2019, 11:56:05 AM by Juanito »

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11632
Re: A few claws-mail quirks in TC10 x86
« Reply #20 on: July 25, 2019, 12:05:09 PM »
Hi Juanito
... I'll try to take a look at claws-mail in the next few days.
No hurry. The  SSL_CERT_DIR  and  SSL_CERT_FILE  environmental variables were likely put there as an alternative to constantly
updating the path/file information hard coded in the executable. Maybe it would make sense to use those environmental variables
when starting  claws-mail? Possibly in the form of a claws startup script?

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11632
Re: A few claws-mail quirks in TC10 x86
« Reply #21 on: July 26, 2019, 01:01:01 PM »
Hi Juanito
... Maybe it would make sense to use those environmental variables
when starting  claws-mail? Possibly in the form of a claws startup script?
Here's a possible fix if you are interested. I modified the  tce.installed  script:
Code: [Select]
#!/bin/sh
gtk-update-icon-cache -q -f -t /usr/local/share/icons/hicolor
if [ ! -e /usr/local/bin/claws-mail-start ]
then
        sudo echo -e "#!/bin/sh\n\nexport SSL_CERT_DIR=/usr/local/etc/ssl/certs\nexport SSL_CERT_FILE=/usr/local/etc/ssl/ca-bundle.crt\n\nclaws-mail" > /usr/local/bin/claws-mail-start
        sudo chmod 775 /usr/local/bin/claws-mail-start
        sudo chown root:staff /usr/local/bin/claws-mail-start
fi

The  if  clause I added creates the following file (/usr/local/bin/claws-mail-start) if it does not exist:
Code: [Select]
#!/bin/sh

export SSL_CERT_DIR=/usr/local/etc/ssl/certs
export SSL_CERT_FILE=/usr/local/etc/ssl/ca-bundle.crt

claws-mail

If someone needs a different path or filename for the certificates, they can edit the exports lines and backup this file.

I changed the first  Exec  line in the desktop file
From:
Code: [Select]
Exec=claws-mail %uTo:
Code: [Select]
Exec=claws-mail-start %u
I updated my copy of  claws-mail.tcz  with the above changes and it's finding the certificates.


I'm not sure what to do (if anything) with this section at the end of the  desktop  file:
Code: [Select]
Actions=GetMail;ComposeMail;SendFile;

[Desktop Action GetMail]
Exec=claws-mail --receive-all
Name=Get Mail
Name[ca]=Rebre
Name[es]=Recibir
Name[fr]=Relever
Name[he]=השג דואר
Name[pt]=Receber
Name[ru]=Получить Почту
Name[tr]=Posta Al

[Desktop Action ComposeMail]
Exec=claws-mail --compose
Name=Email...
Name[ca]=Correu...
Name[es]=Correo...
Name[fr]=Message...
Name[he]=דוא״ל...
Name[pt]=Mensagem...
Name[ru]=Письмо...
Name[tr]=E-posta yaz...

[Desktop Action SendFile]
Exec=claws-mail --compose --attach %f
Name=Send file...
Name[ca]=Enviar arxiu...
Name[es]=Enviar fichero...
Name[fr]=Envoyer fichier...
Name[he]=שלח קובץ...
Name[pt]=Enviar ficheiro...
Name[ru]=Отправить файл...
Name[tr]=Ekli e-posta yaz...
There are 3 other  Exec  actions. Flwm_topside  seems to ignore them. I don't know about other window managers.


I also noticed the following, though I haven't observed any problems with  claws-mail:
Code: [Select]
tc@E310:~$ tail -n 3 /var/log/messages
Jul 26 11:41:23 box auth.err claws-mail: unable to dlopen /usr/local/lib/sasl2/libsql.so: libmariadb.so.3: cannot open shared object file: No such file or directory
Jul 26 11:41:23 box auth.err claws-mail: unable to dlopen /usr/local/lib/sasl2/libsasldb.so: libgdbm.so.6: cannot open shared object file: No such file or directory
Jul 26 11:41:23 box auth.err claws-mail: unable to dlopen /usr/local/lib/sasl2/libldapdb.so: libldap-2.4.so.2: cannot open shared object file: No such file or directory
tc@E310:~$
The first one is in  mariadb-10.3.tcz
The second on is in  gdb.tcz
The third on is in  openldap.tcz,  though  cyrus-sasl.tcz  provides  /usr/local/lib/libldap.so.3.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14819
Re: A few claws-mail quirks in TC10 x86
« Reply #22 on: July 27, 2019, 06:13:57 AM »
start-up script and desktop file modified and claws-mail re-posted - thanks.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11632
Re: A few claws-mail quirks in TC10 x86
« Reply #23 on: July 27, 2019, 09:18:27 AM »
Hi Juanito
You left out the  i  in  if  in the start-up script.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14819
Re: A few claws-mail quirks in TC10 x86
« Reply #24 on: July 27, 2019, 09:44:39 AM »
hopefully fixed now...

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11632
Re: A few claws-mail quirks in TC10 x86
« Reply #25 on: July 27, 2019, 09:51:22 AM »
Hi Juanito
Looks good now.