Rechercher dans ce blog

jeudi 24 mai 2012

Raccourcis BASH

Control Key combinations (CTRL+KEY)

Ctrl + a : jump to the start of the line

Ctrl + b : move back a char

Ctrl + c : terminate the command

Ctrl + d : delete from under the cursor

Ctrl + e : jump to the end of the line

Ctrl + f : move forward a char

Ctrl + k : delete to EOL

Ctrl + l : clear the screen

Ctrl + r : search the history backwards

Ctrl + R : search the history backwards with multi-occurrence

Ctrl + u : delete backward from cursor

Ctrl + w : delete backward a word

Ctrl + xx : move between EOL and current cursor position

Ctrl + z : suspend/stop the command

Alt Key combinations (ALT+KEY)

Alt + < : move to the first line in the history

Alt + > : move to the last line in the history

Alt + ? : show current completion list

Alt + * : insert all possible completions

Alt + / : attempt to complete filename

Alt + . : yank last argument to previous command

Alt + b : move backward

Alt + c : capitalize the word

Alt + d : delete word

Alt + f : move forward

Alt + l : make word lowercase

Alt + n : search the history forwards non-incremental

Alt + p : search the history backwards non-incremental

Alt + r : recall command

Alt + t : move words around

Alt + u : make word uppercase

Alt + Backspace : delete backward from cursor

Escape Key combinations (ESC+KEY)

Esc + d : delete from cursor position to end of the word

Esc + f : move forward a word

Esc + b : move backward a word

Esc + t : transpose two adjacent words

lundi 7 mai 2012

How to make fetchmail happy with the YAHOO server’s SSL cert


Pour résoudre le problème indiqué dans le mail.log (solution un peu au pif en fonction de quelques informations que j'ai trouvées sur le net) :

fetchmail: Server certificate verification error: unable to get local issuer certificate
fetchmail: Server certificate verification error: certificate not trusted
fetchmail: Server certificate verification error: unable to verify the first certificate
Sous UBUNTU, première chose à essayer : mettre à jour les certificats :

apt-get upgrade ca-certificates

Redémarrer fetchmail et voir si le problème est corrigé.

Sinon essayer ceci.

Pour vérifier l'existence du répertoire fetchmail

ls -l /usr/local/etc/

Créer un répertoire de travail

mkdir /usr/local/etc/fetchmail
mkdir /usr/local/etc/fetchmail/certs

Se placer dans le répertoire de travail

cd /usr/local/etc/fetchmail/certs


openssl s_client -connect pop.mail.yahoo.fr:995 -showcerts > pop.mail.yahoo.fr.pem

vi pop.mail.yahoo.fr.pem

Cut and paste the stuff between the “—–BEGIN CERTIFICATE—–” and “—–END CERTIFICATE—–” lines (inclusive)

Vérifier dans l'output de la commande avant de couper BEGIN-END les lignes issuer

save & quit

Server certificate
subject=/C=US/ST=CA/L=Sunnyvale/O=Yahoo! Inc./OU=Yahoo/CN=pop.mail.yahoo.fr
issuer=/C=US/O=DigiCert Inc/OU=www.digicert.com/CN=DigiCert High Assurance CA-3

Télécharger le certificat indiqué sur le site

wget https://www.digicert.com/CACerts/DigiCertHighAssuranceCA-3.crt

Je ne pense pas que ce soit nécessaire pour résoudre le problème yahoo, mais pendant que j'y suis je télécharge tous les certificats disponibles...

wget https://www.digicert.com/testroot/DigiCertGlobalRootCA.crt
wget https://www.digicert.com/testroot/DigiCertHighAssuranceEVRootCA.crt
wget https://www.digicert.com/testroot/DigiCertAssuredIDRootCA.crt

Je rename tous les .crt en .pem (ici avec la commande ubuntu)

rename s/crt/pem/ *

Je place (copie) tous les certificats dans le répertoire ssl
cp *.pem  /etc/ssl/certs/

Rehash obligatoire du répertoire contenant les certificats.

c_rehash /etc/ssl/certs/

On vérifie que tout s'est bien passé et que les certificats sont présents et avec les liens symboliques produits par le hashage.

cd /etc/ssl/certs/
ls -l

On redémarre fetchmail

/etc/init.d/fetchmail restart

Le message d'erreur doit avoir disparu.