Blog jubilado de Paco Ros

Fue bonito mientras duró

Archive for the ‘Libre’ Category

Install Thunderbird 3 in Ubuntu 9.10 Karmic

Posted by Paco Ros en 8 \08\+01:00 diciembre \08\+01:00 2009

This is a reminder, but I publish it here. I hope it helps somebody else.

Add ubuntu-mozilla-daily repositories using karmic ppa new style syntax:

$ sudo add-apt-repository ppa:ubuntu-mozilla-daily/ppa

Once added, simply update and install:

$ sudo aptitude update && sudo aptitude install thunderbird-3.0 thunderbird-3.0-gnome-support

Enjoy.

Posted in Libre, Linux, Software | Etiquetado: , , , , , | 12 Comments »

Dropbox package for Ubuntu 9.10 Karmic

Posted by Paco Ros en 10 \10\+01:00 octubre \10\+01:00 2009

I’ve just compiled the sources from dropbox and packaged 0.6.1 in a deb. Download and double click it to install. Please, let me know if there are some unmet dependences.
Download dropbox for ubuntu 9.10 karmic.

Posted in Linux, Software | Etiquetado: , , , , | Leave a Comment »

Tips to make Acer Aspire One 751h (AO751h) work better with Ubuntu

Posted by Paco Ros en 2 \02\+01:00 octubre \02\+01:00 2009

The new toy from Acer is a affordable netbook featuring HT Intel Atom Z520 and a 1366×768 11.» LED LCD.

Almost all the hardwre included inside thie «piece of iron» is good and works out of the box with Ubuntu 9.04 (a.k.a. Jaunty) updated to 2.6.28-15 linux kernel version, but some manual configuration is needed to leave all the (at least for me) important things working:

Graphics Driver

I can’t stand without complaining about the stupid fact that Intel ordered another corp to develop the drivers for Intel GMA500 graphics chip. Somebody contracted Tungsten Graphics to build a driver that makes Dell mini family work with this piece of hell… and they did! So we now have a unmaintained old graphics driver with a binary privative piece inside it and we have to push it inside a free software system. I’d like to thank Lucazade at this point for the efforts made for this crap to work.

After complaining, let’s go for work. Remember this word, it’ll be your obsession th next hour afer you read this post: poulsbo. All GMA500 stuff is labeled with poulsbo or psk keyword, so, you know, you can begin by apt-cache searching for this term.

Karmic instructions

Updated: AOS751h works better in Jaunty than in Karmic. If you don’t care about lastest updates, it’s better to install Jaunty and follow the instructions. If you need Karmic or you prefer being in the cutting edge, the best you can do is to use Lucazade (Thanks Again) script published in ubuntu forums:

wget http://gma500re.altervista.org/scripts/poulsbo_ppa.sh && sudo sh ./poulsbo_ppa.sh

I can’t make software suspend work in Karmic. See the comments, I’m not the only one.

Jaunty instructions

Begin by adding the following unofficial repositories to your /etc/apt/sources.list

deb http://ppa.launchpad.net/ubuntu-mobile/ppa/ubuntu jaunty main
deb-src http://ppa.launchpad.net/ubuntu-mobile/ppa/ubuntu jaunty main

And authorize PPA packages to be installed

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys C6598A30

If you arrived here, you’ll probably know what to do:

$ sudo apt-get update
$ sudo apt-get install poulsbo-driver-2d poulsbo-driver-3d psb-firmware

But, this is not enough, you must compile and install a kernel driver (let DKMS do the work):

$ sudo apt-get install psb-kernel-source

Time to reboot now, next time you login you’ll see a beautiful 1366×768 3D accelerated desktop. No need to edit /etc/X11/xorg.conf for me, but you can do to enable horitzontal scrolling for synaptics touchpad.

If you want to enable desktop effects, locate /usr/bin/compiz and add psb at the beggining of the list in the line «WHITELIST»

WHITELIST="psb nvidia intel ati radeon i810 fglrx"

Now you can activate compiz by selecting System -> Appearance -> Visual Effects and clicking in «Normal»

Remember, if you update the kernel you must reinstall psb kernel module and if compiz-wrapper gets updated, you should edit it again and add psb to whitelist. You can read the long thread about GMA500, poulsbo and ubuntu at ubuntu forums here.

Wireless

ath5k works out of the box. I tried to enable Atheros unsuccessfully, but there’s no need to enable it because ath5k seems to work fine, despite of some messages about jumbo packages being logged in syslog. I will try to make Madwifi work when I have some time, it’s useful if you need to inject frames in a signal.

Suspend to RAM

All the info above can be easily found in the internet, but there is no info about suspend. Suspend works out of the box, but it got broken when you installed psb video driver (Did i told this is a piece of shit?) and I can’t imagine a laptop that can’t be suspended. Fortunately Wander Boessenkool published a patch to hal mailing list. You must locate /usr/share/hal/fdi/information/10freedesktop/20-video-quirk-pm-acer.fdi and add the following at the end (before the last </match>):

&lt;match key="system.hardware.product" string="AO751h"&gt;
   &lt;merge key="power_management.quirk.dpms_on" type="bool"&gt;true&lt;/merge&gt;
   &lt;merge key="power_management.quirk.vbemode_restore" type="bool"&gt;true&lt;/merge&gt;
   &lt;merge key="power_management.quirk.vbestate_restore" type="bool"&gt;true&lt;/merge&gt;
 &lt;/match&gt;

This patch shouldn’t take too many time to be included in ubuntu hal packages. Remember to edit it it again if you update hal.

I couldn’t get suspend working by closing the lid. I’m working on ot and will update when it works.

Updated: It works fine by setting it in System -> Preferences -> Power Management

Enjoy the toy :-)

Posted in Hardware, Libre, Software | Etiquetado: , , , , , , , , | 10 Comments »

La revalorització del programador

Posted by Paco Ros en 23 \23\+01:00 febrero \23\+01:00 2009

Ahir llegia a trespams un interessant post d’en Toni on explicava com pareixia mentida que encara s’havés de justificar el desenvolupament fent servir programes lliures en front dels clàssics privatius .Net i J2EE.

La meva resposta es basava en la meva anterior entrada sobre la crisi i la innovació on pareix evident que la única manera de sortir-ne és innovant i els nous bastiments de programació lliures en són una manera excel·lent, ja que permeten reduïr el cost i duració del desenvolupament de manera dramàtica.

Mira per on que avui he llegit un altre post de Alejandro Suárez, un emprenidor del mundillo dels buzz (compta amb vèries empreses a internet) on comenta que amb la crisi molts projectes deixen de ser viables per mor del seu cost i que els programadors de programari lliure tornen a revaloritzar-se.

Si bé la idea de fons és la mateixa, no n’estic del tot d’acord. Sí és cert que el programari lliure en serà el clar guanyador, ja que la qualitat / preu dels programes lliures és insuperable, però els programadors són personatges molt especials.

N’hi ha que no n’aprendran mai i que no creuen en el model de programari lliure. Si hi ha sort, com a molt fabriquen frasses de l’estil «sí, bé, és gratis, no podem demanar més» i d’altres ni això «jo necessito una empresa que em recolzi i no aquesta cosa que ha fet un pringat en les seves estones lliures».

D’altra banda existeix un gran i generalitzat desconeixement sobre el funcionament dels projectes de programari lliure i les seves llicències. Cal explicar un pic i un altre les diferències entre la GPL 2 i la 3 a més de que la majoria no entenen que només existeix l’obligació d’entregar el codi al client, cosa especialment poc retllevant quan es tracta de desenvolupaments a mida, ja que normalment aquests no publiquen el codi font a internet.

La figura del programador serà important i ho serà la figura del programador de programari lliure: tant el que el fabrica com el que el personalitza, però, fixau-vos-hi, es tracta d’un perfil de programador molt especial: un programador de programari lliure que coneix els processos del programari liure, que coneix com funcionen els sistemes de control de versions i sap el que és un branch, un tag, un diff, un patch a més de no tenir problemes en treballar en entorns altament basats en text i manejar apadaçaments de codi i compilar naturalment.

Una persona que està acosutmada a treballar amb GNU/Linux  i al menys saps escupir cuatre coses en mitja dotzena de llenguatges de programació com perl, python, ruby, php, java, c/c++, i potser alguns funcionals esotèrics com Lisp, Haskell o  privatius i les seves versions lliures com C#, Visual Basic i algun pascaloide.

També coneix força bé Apache i els mòduls relacionats amb la programació web dels llenguatges que millor coneix com Tomcat si és «javero», django si sap python, rails si sap ruby i alguna cosa més -n’hi ha molts- si sap PHP.

Aquest tipus de personatge suposa un ordre del 10% del total de programadors en actiu i en alguns casos, fins i tot no es dedica a programar, sino que es dedica a tasques de caire comercial o al management ja que calen varis anys per tenir els coneixements necessaris i després d’uns anys es tendeix a minusvalorar el treball de programació en favor d’altres tasques més burocràtiques o amb una forta component de relació humana amb altres professionals, directius o clients.

En definitiva, la crisi durà una modernització del desenvolupament de programes que durà inevitablement cap a les plataformes lliures a la fi massivament i la feina de programació, que fins ara s’ha anat deixant als informàtics més joves i poc experimentats, cobrarà una gran rellevància i neixerà la figura del programador senior com a part indispensable del projecte i referent tecnològic com a clau competitiva en fornt de la competència. I lo millor de tot és que en Richard Stallman serà viu per veure-ho :-)

Posted in Libre, Software | 7 Comments »

Programas Gnome bonitos en KDE 4.1

Posted by Paco Ros en 13 \13\+01:00 septiembre \13\+01:00 2008

Hace una semana que instalé la última versión de KDE (4.1.1) en Ubuntu.

Las últimas veces que he instalado una Ubuntu, lo he hecho con la versión estándar oficial del momento (o sea, ni kubuntu, ni xubuntu… «Ubuntu» a pelo) principalmente porque el KDE 3 me aburría ya.

Hay que reconocer que la versión 4.0 de KDE no es casi ni usable. Es una «proof of concept» pero, como es software libre, se ponde a disposición de todos para que la vayamos probando.

La nueva versión 4.1 sí que es usable. Una vez que uno se acostumbra a que el «Desktop» no es el «Desktop» sino que es una «Folder View» del desktop, no se explica cómo puede haber vivido tanto tiempo sin eso.

El único inconveniente que tenía es que hay algunos programas en GTK que se ven fatal cuando inicias la sesión en KDE. Una pena porque algunos de mis favoritos, como por ejemplo mi recién descubierto Gwibber se han convertido en un «must have» y no puedo trabajar sin ellos.

Me dí cuenta, por casualidad de que si abría el panel de control de Gnome en KDE, todos estos programas se veían perfectamente así que, después de unos ps -ef redireccionados a fichero y unos diffs me dí cuenta de que había un daemon que si se ejecuta hace que los programas GTK no tengan ese look and feel tan feo al inicio.

Con lo cual, los pasos fáciles para tener bonitos los programas GTK son:
1.- Instalar gnome-control-center si no lo tenemos ya (sudo aptitude install gnome-control-center)
2.- Instalar el paquete de controles GTK Oxygen
3.- Ejecutar gnome-control-center (en consola o con «Alt + F2») y personalizar «Apariencia» seleccionando el estilo «Oxygen-kde4»
4.- Abrir «System Settings» en KDE y en la pestaña «Advanced» en «Autostart» añadir «/usr/lib/gnome-settings-daemon/gnome-settings-daemon» (sin las comillas, claro)

De esta manera se ejecuta el daemon que aplica los estilos en Gnome al inicio de la sesión y, como el tema GTK seleccionado es Oxygen todo se verá la mar de bonito y lustroso :-)

PD: Como veis, sigo vivo (ocupado, pero vivo, que es lo que cuenta X’-D)

Posted in Libre, Linux, Software | 2 Comments »

Dell Vostro 400, Ubuntu y RAID 1

Posted by Paco Ros en 8 \08\+01:00 junio \08\+01:00 2008

Hace unos meses que compré un Dell Vostro 400. El modelo es un Quad Core 6600 (a 2.4GHz) y viene con dos discos de 500GB SATA.

Pedí a Dell si me lo podían configurar con RAID 1 y me dijeron que no, así que, como de todos modos le iba a instalar Ubuntu, lo dejé correr y me lo sirvieron con 2 discos NTFS y Windows Vista.

Hasta hoy no he podido ponerme manos a la obra. Tenía ganas de configurar el RAID 1 (mirror) porque tengo alguna información delicada y no soy mu amigo de quemar plástico haciendo copias de seguridad.

El chipset ICH9 de Intel que lleva este PC cuenta con una controladora RAID de las llamadas «fakeraid«, es decir, muestran al sistema un RAID, pero delegan su funcionamiento real al sistema operativo.

En Ubuntu (y Debian) es relaivamente fácil y se gestiona casi solo usando dmraid. El problema es que algunas herramientas y el instalador no están preparados para trabajar con un RAID y algunos pasos no funcionan bien, así que hay que darles una ayuda.

Empecemos: Lo primero que hay que hacer es configurar los discos como RAID. Se pulsa F2 en el arranque y se selecciona RAID en el apartado de discos. Después, al reiniciar, aparece un menú adicional, al que se debe entrar con Ctrl + I y ahí hay que crear el volumen RAID 1.

Cuando metemos el CD y arrancamos en modo «Live CD» (no instalar directamente) tenemos que abrir una consola, editar /etc/apt/sources.list para añadir el repositorio univerese e instalar dmraid (sudo aptitude install dmraid).

A partir de ese momento, ya disponemos de los módulos del kernel necesarios instalados y funcionando. Podemos comprobarlo con dmraid -r y con dmraid -ay (que de paso activa los volúmenes). Finalmente, iremos a /dev/mapper y con un ls veremos los volúmenes, que tendrán un nombre distinto en función de la controladora que tengamos.

Es el momento de crear y formatear todas las particiones no swap que necesitemos. Yo lo hago sólo con una, de manera que, usando fdisk /dev/mapper/<nombre_del_raid> crearemos una particion primaria de tipo Linux y dejé unos 150 (aprox. 1.5GB) bloques libres que, más adelante, usaremos como swap.

Grabamos la tabla de particiones y en unos segundos, veremos como en /dev/mapper tenemos un dispositivo de bloques más que se llama como el raid, pero con un «1» al final. Es la partición que acabamos de crear.

Creamos el sistema de ficheros. Yo usé ext3 así que mkfs.ext3 /dev/mapper/<nombre_del_raid>1

En este momento podemos hacer click en el icono de instalar Ubuntu, pero os adelanto que va a dar error cuando, al final, intente instalar GRUB. Lo solucionaremos con una instalación manual.

Otro punto importante es no seleccionar «formatear» en el particionado de discos. Simplemente seleccionariemos la partición ext3 y le diremos que el punto de montaje es «/», pero no seleccionaremos «formatear». El instalador se quejará de que no tenemos swap y nos avisarás de que va a borrar toda la partición. Está bien, podemos seguir.

Cuando acaba la instalación e intenta instalar grub da error. Mejor, porque aún no hemos acabado. Vamos a hacer un chroot a /target (que es donde el instalador monta el sistema de ficheros de destino) y vamos a instalar dmraid en el chroot igual que hicimos al principio, pero antes hay que enlazar en /target proc sysfs y dev así:

# sudo mount --bind /dev /target/dev
# sudo mount --bind /cdrom /target/cdrom
# sudo mount -t proc proc /target/proc
# sudo mount -t sysfs sysfs /target/sys

De esta manera podremos acceder a los dispositivos correctamente. Ahora sí, hacemos el chroot:

# sudo chroot /target

Una vez dentro del chroot, editamos /etc/apt/sources.list y añadimos el repositorio universe si fuera necesario e instalamos (aptitude install dmraid) dmraid.

Ahora hay que crear el directorio /boot/grub y copiar ahí desde /usr/lib/grub/i386-pc/ stage1, stage2 y e2fs_stage1_5 (usar otro si no habéis usado ext3).

Por último, nos queda instalar grub, que había fallado en el instalador:
# grub
(grub) device (hd0) /dev/mapper/<nombre_del_raid>
(grub) root (hd0,0)
(grub) setup (hd0)
(grb) quit

Finalmente ejecutamos update-grub, que nos creará el /boot/grub/menu.lst final. Este menu.lst tenemos que editarlo y asrgurarnos que allí donde ponga root=XXXXXX poga root=/dev/mapper/<nombre_del_raid>1

Listo, sudo reboot y a funcionar.

Posted in Libre, Linux, Software | 5 Comments »

Configurar postfix para que envíe correo a través del SMTP de GMail

Posted by Paco Ros en 14 \14\+01:00 abril \14\+01:00 2008

Hace tiempo, no había ningún problema en tener un servidor SMTP en la red local para el envío de correo.
Si el servidor estaba en marcha las 24h, era una buena opción porque el correo se enviaba casi de inmediato hacia la cola del servidor y nos despreocupábamos.

De un tiempo hacia acá, con la proliferación de las IPs dinámicas y las «black lists» cada vez era más habitual que te tocara una IP de un PC zombie que había sido usado para enviar SPAM, con lo cual la mayoría de los servidores de correo rechazaban en envío.

La solución temporal que me fue más cómoda pasó por configurar directamente el SMTP de GMail en todos los clientes de correo, pero me tenía que «comer» todo el correo local además de algunos otros correos. La cosa funcionaba, pero claramente desorganizada.

Estuve buscando y rebuscando y haciendo pruebas y al fin funcionó. Me alegraré de que estos pasos le sean útiles a alguien más, pero me los pongo aquí como recordatorio personal por si tengo que repetir la jugada un día.

Paso 1: Crear un directorio de trabajo (que al final eliminaremos)


paco@nena:~$ cd /tmp
paco@nena:/tmp$ mkdir cert
paco@nena:/tmp$ cd cert

Paso 2: Creamos una autoridad de certificación (se crea en un directorio demoCA)


paco@nena:/tmp/cert$ /usr/lib/ssl/misc/CA.pl -newca

Salida:

CA certificate filename (or enter to create)


Making CA certificate ...
Generating a 1024 bit RSA private key
.......++++++
......................................................++++++
unable to write 'random state'
writing new private key to './demoCA/private/cakey.pem'
Enter PEM pass phrase:
Verifying - Enter PEM pass phrase:
-----
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Country Name (2 letter code) [AU]:ES
State or Province Name (full name) [Some-State]:Balearic Islands
Locality Name (eg, city) []:
Organization Name (eg, company) [Internet Widgits Pty Ltd]:Nombre y Apellidos
Organizational Unit Name (eg, section) []:
Common Name (eg, YOUR name) []:Nombre y Apellidos
Email Address []:usuario_gmail@gmail.com


Please enter the following 'extra' attributes
to be sent with your certificate request
A challenge password []:
An optional company name []:
Using configuration from /usr/lib/ssl/openssl.cnf
Enter pass phrase for ./demoCA/private/cakey.pem:
Check that the request matches the signature
Signature ok
Certificate Details:
Serial Number:
xx:xx:xx:xx:xx:xx:xx:xx
Validity
Not Before: Apr 14 07:34:14 2008 GMT
Not After : Apr 14 07:34:14 2011 GMT
Subject:
countryName = ES
stateOrProvinceName = Balearic Islands
organizationName = Nombre y Apellidos
commonName = Nombre y Apellidos
emailAddress = usuario_gmail@gmail.com
X509v3 extensions:
X509v3 Subject Key Identifier:
xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx
X509v3 Authority Key Identifier:
keyid:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx
DirName:/C=ES/ST=Balearic Islands/O=Paco Ros/CN=Nombre y Apellidos/emailAddress=usuario_gmail@gmail.com
serial:xx:xx:xx:xx:xx:xx:xx:xx


X509v3 Basic Constraints:
CA:TRUE
Certificate is to be certified until Apr 14 07:34:14 2011 GMT (1095 days)


Write out database with 1 new entries
Data Base Updated

Paso 3: Crear el certificado que usaremos con Postfix en el servidor (se pega en una sola línea):


paco@nena:/tmp/cert$ openssl req -new -nodes -subj '/CN=casa.pacoros.net/O=Nombre y Apellidos/C=ES/ST=Balearic Islands/L=/emailAddress=usuario_gmail@gmail.com' -keyout cert-key.pem -out cert-req.pem -days 3650

Salida:

Generating a 1024 bit RSA private key
..........................................................................................................++++++
..............++++++
unable to write 'random state'
writing new private key to 'cert-key.pem'

Paso 4: Firmar el certificado usando la CA creada en el paso 2:


paco@nena:/tmp/cert$ openssl ca -out cert.pem -infiles cert-req.pem

Salida:

Using configuration from /usr/lib/ssl/openssl.cnf
Enter pass phrase for ./demoCA/private/cakey.pem:
Check that the request matches the signature
Signature ok
Certificate Details:
Serial Number:
xx:xx:xx:xx:xx:xx:xx:xx
Validity
Not Before: Apr 14 07:39:47 2008 GMT
Not After : Apr 14 07:39:47 2009 GMT
Subject:
countryName = ES
stateOrProvinceName = Balearic Islands
organizationName = Nombre y Apellidos
commonName = casa.pacoros.net
emailAddress = usuario_gmail@gmail.com
X509v3 extensions:
X509v3 Basic Constraints:
CA:FALSE
Netscape Comment:
OpenSSL Generated Certificate
X509v3 Subject Key Identifier:
xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx
X509v3 Authority Key Identifier:
keyid:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx


Certificate is to be certified until Apr 14 07:39:47 2009 GMT (365 days)
Sign the certificate? [y/n]:y


1 out of 1 certificate requests certified, commit? [y/n]y
Write out database with 1 new entries
Data Base Updated

Paso 5: Bajar el certificado raíz de Thawte y guardarlo en un directorio «root»


paco@nena:/tmp/cert$ mkdir root
paco@nena:/tmp/cert$ cd root/
paco@nena:/tmp/cert/root$ wget https://www.verisign.com/support/thawte-roots.zip

Salida:

--09:44:38-- https://www.verisign.com/support/thawte-roots.zip
=> `thawte-roots.zip'
Resolviendo www.verisign.com... 65.205.249.60
Connecting to www.verisign.com|65.205.249.60|:443... conectado.
Petición HTTP enviada, esperando respuesta... 200 OK
Longitud: 28,793 (28K) [application/zip]


100%[====================================================================================================================>] 28,793 55.90K/s


09:44:41 (55.73 KB/s) - `thawte-roots.zip' saved [28793/28793]


paco@nena:/tmp/cert/root$ unzip thawte-roots.zip
Archive: thawte-roots.zip
inflating: Thawte SGC CA.cer
inflating: Thawte SSL Domain CA.cer
inflating: ThawtePersonalBasicCA.cer
inflating: ThawtePersonalFreemailCA.cer
inflating: ThawtePersonalPremiumCA.cer
inflating: Thawte Server Roots/Thawte Server Roots.txt
inflating: Thawte Server Roots/ThawtePremiumServerCA.509
inflating: Thawte Server Roots/ThawtePremiumServerCA.cer
inflating: Thawte Server Roots/ThawteServerCA.509
inflating: Thawte Server Roots/ThawteServerCA.cer
inflating: Thawte Test Roots/Thawte Test Root _TEXT.txt
inflating: Thawte Test Roots/Thawte Test Root.cer
inflating: Thawte Code Signing CA.cer
inflating: Thawte_EV_SSL_CA.cer
inflating: Thawte Extended Validation Root/Thawte_EV_Root.cer
inflating: Thawte Extended Validation Root/Thawte_EV_Root.txt
inflating: Thawte_EV_SSL_CA_b64.txt
inflating: Thawte SSL Domain CA_b64.txt
inflating: Thawte SGC CA_b64.txt
inflating: Thawte Code Signing CA_b64.txt
inflating: ThawtePersonalPremiumCA_b64.txt
inflating: ThawtePersonalFreemailCA_b64.txt
inflating: ThawtePersonalBasicCA_b64.txt
inflating: Thawte Extended Validation Root/Thawte_EV_Root_b64.txt
inflating: Thawte Primary Root CA/Thawte_Primary_Root_CA.cer
inflating: Thawte Primary Root CA/Thawte_Primary_Root_CA.txt
inflating: Thawte Primary Root CA/Thawte_Primary_Root_CA_b64.txt
inflating: Thawte Server Roots/ThawteServerCA_b64.txt
inflating: Thawte Server Roots/ThawtePremiumServerCA_b64.txt

Paso 6: Poner los certificados en un directorio «certs» de /etc/postfix con permisos adecuados y añadir el certificado raíz:


paco@nena:/tmp/cert/root$ cd /etc/postfix/
paco@nena:/tmp/cert/root$ sudo mkdir certs
paco@nena:/etc/postfix$ sudo cp /tmp/cert/demoCA/cacert.pem /tmp/cert/cert.pem /tmp/cert/cert-key.pem ./certs/
paco@nena:/etc/postfix$ cd certs
paco@nena:/etc/postfix/certs$ chmod 644 *
paco@nena:/etc/postfix/certs$ chmod 400 key.pem
paco@nena:/etc/postfix/certs$ sudo cat /tmp/cert/root/Thawte Server Roots/ThawtePremiumServerCA_b64.txt >> cacert.pem

Paso 7: Editar los ficheros de configuración de postfix para añadir TLS, autentificación SASL y un nuevo «transport» hacia GMail:

Añadir a /etc/postfix/main.cf

## TLS
#
smtp_tls_CAfile = /etc/postfix/certs/cacert.pem
smtp_tls_cert_file = /etc/postfix/certs/cert.pem
smtp_tls_key_file = /etc/postfix/certs/key.pem
smtp_tls_session_cache_database = btree:/var/run/smtp_tls_session_cache
smtp_use_tls = yes
smtpd_tls_CAfile = /etc/postfix/certs/cacert.pem
smtpd_tls_cert_file = /etc/postfix/certs/cert.pem
smtpd_tls_key_file = /etc/postfix/certs/key.pem
smtpd_tls_received_header = yes
smtpd_tls_session_cache_database = btree:/var/run/smtpd_tls_session_cache
smtpd_use_tls = yes
tls_random_source = dev:/dev/urandom
#
## SASL Settings
# This is going in to THIS server
smtpd_sasl_auth_enable = no
# We need this
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtpd_sasl_local_domain = $myhostname
smtp_sasl_security_options = noanonymous
#smtp_sasl_security_options =
smtp_sasl_tls_security_options = noanonymous
smtpd_sasl_application_name = smtpd

Crear un /etc/postfix/transport:

# Envío del correo hacia el SMTP de GMail
gmail.com smtp:[smtp.gmail.com]:587

Crear un /etc/postfix/sasl_password (este es el más feo)

#Usuario y contraseña para que postfix use el SMTP de GMail
#
[smtp.gmail.com]:587 usuario_gmail@gmail.com:password_gmail

Ya que estamos, le ponemos unos permisos más restrictivos:

paco@nena:/etc/postfix$ sudo chmod 600 sasl_password

Paso 8: Crear los Hashes de los nuevos ficheros:


paco@nena:/etc/postfix$ sudo postmap sasl_passwd && sudo postmap transport

Paso 9: Reiniciar Postfix:


paco@nena:/etc/postfix$ sudo /etc/init.d/postfix restart

Salida:

Stopping Postfix Mail Transport Agent: postfix.
Starting Postfix Mail Transport Agent: postfix.

Paso 10: Borrar el directorio con certificados de /tmp que habíamos creado al prinicipio:


paco@nena:/etc/postfix$ cd /tmp
paco@nena:/tmp$ rm -rf cert

Para probar la configuración hay muchas maneras, pero he descubierto una que no sabía y la pego aquí también como recordatorio:

paco@nena:~$ sudo sendmail -bv unadireccion@decorreo.com
paco@nena:~$ tail /var/log/mail.log

Si todo ha ido bien, veremos una línea como esta en el log:

pr 14 09:57:34 nena postfix/smtp[15115]: B4577163409E: to=, relay=aspmx.l.google.com[66.249.93.27]:25, delay=7, delays=0.02/0.09/0.86/6, dsn=2.1.5, status=deliverable (250 2.1.5 OK)

Si no ha ido bien pondrá «undeliverable» en lugar de «deliverable».

Posted in Libre, Linux, Software | 1 Comment »

Por fin Dell + Ubuntu disponible en España

Posted by Paco Ros en 21 \21\+01:00 febrero \21\+01:00 2008

Una URL vale más que mil palabras: http://tinyurl.com/2joa22 :-)

Posted in Hardware, Libre, Software | Leave a Comment »

PHPMotion, tu propio YouTube

Posted by Paco Ros en 17 \17\+01:00 enero \17\+01:00 2008

Poco a poco van cayendo todos los grandes servicios de internet que no han publicado su software.

Esta vez, es YouTube el afectado, pues acabo de enterarme de la existencia de PHPMotion, un bonito CMS que permite subir, visualizar, etiquetar, incluso editar tus propios vídeos.

Soporta múltiples formates (MPG, AVI, DIVX… etc) y permite listas públicas y privadas.

En la web, tenéis una demo on-line y elnaces a varios sitios que lo están usando… y tiene una pinta estupenda!

Vía Webmaster Libre, gracias a los Shared Items de Xisco (o sea, que me he enterado de puto rebote ;-))

Posted in Libre, Software | Leave a Comment »

Open bravo: caso de éxito con software libre

Posted by Paco Ros en 23 \23\+01:00 diciembre \23\+01:00 2007

Entrevista a los fundadores. Vista en Emprendedores TV.

Posted in Libre, Software | Leave a Comment »