Maxime Chambreuil

Thursday July 4, 2013

The new organization of the OpenERP Community

Max @ 11:58 | Filed under: Information Technology


Wednesday June 12, 2013

OpenERP Canadian Localization

Max @ 12:04 | Filed under: Canada,Information Technology


Friday April 4, 2008

Tooltips for GIT

Max @ 21:07 | Filed under: Information Technology

GIT

Initialization

$ git config --global user.name "Your Name Comes Here"
$ git config --global user.email you@yourdomain.example.com

Cloning

$ git clone git+ssh://sflphone_org@sflphone.org/git/sflphone.git

Edit .git/config to have :

[remote "origin"]
        url = git+ssh://sflphone_org@sflphone.org/git/sflphone.git
        fetch = +refs/heads/*:refs/remotes/origin/*
        push = +refs/heads/*:refs/remotes/origin/*

Committing and pushing

$ git-gui

Then “Add Existing”, “Commit” and “Push”.

Branching

Create a new branch toto :

$ git branch toto

List all branches :

$ git branch

Switch to branch toto :

$ git checkout toto

Display branches :

$ gitk

Delete branch toto :

$ git branch -d toto

Saturday March 15, 2008

Québec se prive de dizaines de millions d’économie

Max @ 11:54 | Filed under: Information Technology

Cyberpresse

Drapeau du Québec

Denis Lessard, La Presse, Québec

Le gouvernement du Québec pourrait épargner des dizaines de millions sur-le-champ en adoptant une politique déjà appliquée dans plusieurs pays d’Europe, c’est-à-dire opter pour des logiciels ouverts, comme Linux, plutôt que de multiplier les licences coûteuses des systèmes d’opération Microsoft.

Cyrille Béraud, le patron de Savoir-Faire Linux, une société d’informatique de la rue Saint-Urbain à Montréal, vient d’envoyer à la Cour supérieure une poursuite contre la Régie des rentes du Québec.

En décembre dernier, la Régie des rentes annonçait qu’elle comptait effectuer sans appel d’offres le renouvellement des licences des systèmes d’opération de ses postes informatiques. Microsoft ne fournit plus de support pour son système Windows 2000 ce qui force les organismes à migrer vers une solution plus récente.

Cette «mise à jour» – on voulait pour 700 000$ passer au système Vista de Microsoft – éliminait en pratique toute autre proposition. La Régie des rentes avait entendu les doléances de M. Béraud, mais avait décidé par la suite de maintenir sa décision d’utiliser Microsoft, parce que les fonctionnaires étaient plus familiers avec ce système.

«On a discuté avec eux pendant toute une journée, on a observé qu’il était possible pour eux de passer sur le logiciel libre», observe M. Béraud. Mais on a plaidé des problèmes de compatibilité pour rester avec Microsoft, explique-t-il.

Dans sa requête à la Cour supérieure, la compagnie relève que Vista est un système d’exploitation «radicalement différent» de son prédécesseur. Plutôt qu’une «mise à jour», il faudrait parler d’un remplacement des systèmes d’opération, une démarche qui devrait être soumise à un appel de propositions. Herman Huot, le porte-parole de la RRQ a confirmé que la poursuite avait été signifiée hier. Le contentieux de l’organisme est en train d’en prendre connaissance, précise-t-il.

Un tel recours est une première en Amérique du Nord, mais est déjà apparu dans d’autres pays d’Europe, notamment. Sortir Microsoft des bureaux gouvernementaux créerait des milliers d’emplois car les firmes locales d’informatique, ayant accès au code informatique de ces logiciels «ouverts», pourraient offrir des services impossibles sur les systèmes fermés «propriétaires» de Microsoft.

Savoir-faire LinuxSelon M. Béraud, le gouvernement québécois est devenu «une filiale de Microsoft» alors que déjà bien des gouvernements dans le monde utilisent les «logiciels libres» comme Linux. Ces logiciels «ouverts» permettent aux programmeurs d’avoir accès aux codes. Surtout, ils sont beaucoup moins coûteux. Le gouvernement du Québec consacre chaque année 80 millions à ses licences Microsoft. Déjà au gouvernement fédéral, ces systèmes qui font fonctionner Google notamment ont fait une percée.

Aux Pays-Bas, désormais tous les ordinateurs du gouvernement doivent fonctionner sur les logiciels libres. «En France, toute la gendarmerie est en logiciel libre, 100 000 postes ont basculé. En deux ans, 400 000 fonctionnaires français sont passé à ce type de logiciels», observe M. Béraud. Et au Brésil, les compagnies ne peuvent répondre aux appels d’offres si leurs solutions ne sont pas compatibles avec ce type de logiciels, ajoute M. Béraud.

Plus d’infos

Saturday January 19, 2008

Fetchmail + Procmail + Cyrus + SASL + LDAP + Roundcube + GetLive

Max @ 12:30 | Filed under: Information Technology

Postfix logoAs many of you, I have a couple years of experience of using Internet and as such I have created different email accounts on different websites : not because I needed it, but mostly because each provider came out with a great benefit compared to the others. Funny thing, the last email account I have is the one from my Internet service provider which doesn’t propose a webmail. Buuuuuuuuuu. You must admit it is not very convenient when you are away from home or work. So here is my need for a solution to retrieve all my emails from Yahoo, Gmail, Free, etc. and serve them with IMAP to either Thunderbird or a Webmail.

Before going into the details of configuring each services, few things to know about my current setup :

Fetchmail

Install fetchmail :

# apt-get install fetchmail

Edit /etc/default/fetchmail to start it as a daemon :

START_DAEMON=yes

Create /etc/fetchmailrc :

poll pop.example.com with proto pop3 
  user 'john.doe' there with password 'passwd' is 'john' here 
  keep mda 'sudo /usr/bin/procmail -m /etc/procmailrc'
poll pop.gmail.com with proto pop3 port 995 
  user 'john.doe' there with password 'password' is 'john' here 
  ssl keep mda 'sudo /usr/bin/procmail -m /etc/procmailrc'

The reason I use sudo to execute procmail is that the fetchmail daemon runs as user fetchmail, and as the fetchmail user I wouldn’t be able to deliver the email.

Edit /etc/sudoers to add this line at the end :

fetchmail	ALL=NOPASSWD: /usr/bin/procmail

Start fetchmail :

# invoke-rc.d fetchmail restart

Procmail

Install procmail :

# apt-get install procmail

Create /etc/procmailrc :

SHELL="/bin/sh"
DELIVERMAIL="/usr/sbin/cyrdeliver"
USER="john"
IMAP="$DELIVERMAIL -a $USER -m user/$USER"
LOGFILE="/var/log/mail/$USER.log"
LOGABSTRACT="all"
VERBOSE=YES

:0
|$IMAP

This is a quick and dirty version of /etc/procmailrc. Improvements have to be made to turn it system-wide (for all the users) and add some filtering and anti-spam rules.

Logo CyrusCyrus + SASL

Install Cyrus :

# apt-get install cyrus-imapd-2.2 cyrus-admin-2.2 cyrus-clients-2.2 sasl2-bin

Edit /etc/imapd.conf :

configdirectory: /var/lib/cyrus
partition-default: /var/spool/cyrus
admins: cyrus administrator
sievedir: /var/lib/cyrus/sieve
sendmail: /usr/sbin/sendmail
hashimapspool: true
lmtpsocket: {configdirectory}/socket/lmtp
sasl_pwcheck_method: saslauthd
sasl_mech_list: PLAIN
unixhierarchysep: yes

The user cyrus is a /etc/passwd user. administrator is an LDAP user. lmtpsocket is the same path as the one specified in /etc/cyrus.conf :

lmtpunix	cmd="lmtpd" listen="/var/lib/cyrus/socket/lmtp" prefork=0 maxchild=20

Disable POP3 server :
In /etc/cyrus.conf and the SERVICES section, comment the pop3 line as follows :

# pop3		cmd="pop3d -U 30" listen="pop3" prefork=0 maxchild=50

OpenLDAP logoCreate /etc/saslauthd.conf with :

ldap_servers: ldap://127.0.0.1/
ldap_search_base: dc=example,dc=com

In /etc/default/saslauthd, set the authentication mechanism :

MECHANISMS="ldap"

Start saslauthd :

# invoke-rc.d saslauthd start

Test your ldap connection with :

# testsaslauthd -u john -p password
0: OK "Success."

Start cyrus :

# invoke-rc.d cyrus start

We now have to create mailboxes and give users their rights. We have to log in Cyrus with an LDAP account set as Admins in the cyrus config file (administrator). Once in the cyrus prompt, type help to get the list of command and their arguments :

# su - administrator
$ cyradm localhost
IMAP Password: password
localhost.localdomain> cm user/john
localhost.localdomain> lm
user/john (\HasNoChildren)
localhost.localdomain> sam user/john john all
localhost.localdomain> lam user/john
john lrswipcda
localhost.localdomain> exit
$

I didn’t need it but you can also fix your quota at this step.

Now emails should be ending up in /var/spool/cyrus/j/user/john/ in file named 1. 2. 3. etc.

RoundCube logoRoundCube

Install roundcube :

# apt-get install roundcube

Edit /etc/roundcube/apache.conf to uncomment :

Alias /roundcube /var/lib/roundcube

Reload Apache :

# invoke-rc.d apache2 reload

Point your browser to http://localhost/roundcube to make sure you can access Roundcube login page.

Edit /etc/roundcube/main.inc.php and change this option to connect RoundCube to your IMAP server (authentication and emails) :

$rcmail_config['default_host'] = "imap://localhost:143";

Edit /etc/roundcube/main.inc.php and change those options to connect RoundCube to your LDAP server (addressbook) :

$rcmail_config['ldap_public']['example.com'] = array(
'name'          => 'example.com',
'hosts'         => array('ldap.example.com'),
'port'          => 389,
'base_dn'       => 'ou=addressbook,dc=example,dc=com',
'bind_dn'       => '',
'bind_pass'     => '',
'ldap_version'  => '3',       // using LDAPv3
'search_fields' => array('mail', 'cn'),  // fields to search in
'name_field'    => 'cn',    // this field represents the contact's name
'email_field'   => 'mail',  // this field represents the contact's e-mail
'surname_field' => 'sn',    // this field represents the contact's last name
'firstname_field' => 'givenName',  // this field represents the contact's first name
'scope'         => 'sub',   // search mode: sub|base|list
'filter'        => '',      // used for basic listing (if not empty) and will be &'d with search queries. ex: (status=act)
'fuzzy_search'  => true);   // server allows wildcard search

Now try logging in to RoundCube with john/password and click on Addressbook. “example.com” should appear in the Groups list and with the search box, you should be able to get your LDAP entries.

Hotmail/Live account

When I installed GetLIve, it wasn’t available on Debian repositories, so I have downloaded it from Sourceforge: Download GetLive.

Decompress the archives :

tar zxf GetLive_0_56.tgz

Organize the differents files :

mv GetLive_0_56/*.pl /usr/local/bin/.
mv GetLive_0_56/Manual /usr/local/doc
mv GetLive_0_56.tgz /usr/local/src/.

Create a repository to store the list of downloaded email ID :

mkdir /var/lib/getlive

Create /etc/getliverc :

UserName        = jdoe
Password        = password
Downloaded      = /var/lib/getlive/downloaded.data
Processor       = grep -v 'From ' | /usr/bin/procmail -m /etc/procmailrc
Folder          = INBOX
MarkRead        = YES

The reason of the grep is explained in the Troubleshooting section below.

Add a crontab entry to execute GetLive at 7am, noon and 6pm, for example :

# crontab -e
0 7,12,18 * * * /usr/local/bin/GetLive.pl --config-file /etc/getliverc > /dev/null

Troubleshooting

Most of the problem I had were due to the “From ” (From space, not From:) line, which is the first line in an email. It raised a “Message contains invalid header” error with Cyrus and cyrdeliver. Make sure to keep messages on the server during your tests, because your downloaded emails might end up nowhere on your system.

Logs are your friends :

  • /var/log/mail.log,
  • /var/log/mail/john.log and
  • /var/log/messages.

Check your logs and pay attention to what they say.

Wednesday December 19, 2007

La vente sur Internet est en retard…

Max @ 21:00 | Filed under: Information Technology,Sales

SugarCRM… comparé à la vente en magasin.

Lors d’une réunion avec un client, une réflexion s’est introduite dans la discussion concernant le marketing et la vente sur le web : SugarCRM permet de savoir quelle personne à cliquer sur tel ou tel lien dans une lettre d’information et de l’appeler afin de clore la vente plus rapidement. Autre exemple, Google Analytics qui fournit des détais très pertinents sur le parcours des visiteurs sur votre site web.

Je me suis donc posé la question en rentrant : mais quel est le but ultime de tout ça (à part vendre, bien évidemment) ? Tout le monde vend et achète depuis des millénaires, qu’est-ce que le web essaie donc de reproduire ?

Comme Valéria me manque beaucoup en ce moment, je me suis mis à faire le parallèle avec la vente en magasin, un domaine qu’elle connait plus que moi.

Le parallèle était évidemment très simple mais faisons cette expérience : Mettez-vous dans la tête d’un vendeur dans un magasin, vous connaissez votre magasin et vos produits par coeur, avec leurs avantages et leurs faiblesses. Un client entre. Vous ne lui avez pas encore parlé que parmi tous vos produits, vous savez déjà lequels vous allez lui proposer. Parce que notre apparence physique (âge, vêtements, etc) en dit long sur notre personnalité et notre budget, un bon vendeur sera capable de faire ce travail d’analyse et de vous amener très vite vers l’acte d’achat.

GoogleExercice plus difficile maintenant : Mettez-vous à la place d’un site web. Idem, vous connaissez très bien votre magasin (l’organisation du site ou sitemap) et vos produits (vous avez tout ça dans votre base de données). Un visiteur arrive sur votre site. Quelle information disposez-vous pour caractériser votre visiteur et faire en fait le travail d’analyse qu’à fait notre vendeur dans le magasin ? Très peu en réalité :

  • le navigateur web : une dizaine sont utilisés. Variable apportant peu de pouvoir de distinction
  • le système d’exploitation : une dizaine existe, il caractérise très peu votre visiteur
  • la langue : déjà un peu plus intéressant mais ca reste maigre pour adapter votre discours

Quelques sites (Amazon par exemple) ont compris qu’ils y avait un manque à combler pour adapter leur offre. C’est pour cela qu’ils ajoutent des informations à votre compte, explicitement : vous devez rentrer votre adresse, votre âge, vos intérêts, etc; ou implicitement : votre parcours sur le site, les pages web des produits sur lesquels vous vous êtes arrêtés, etc… Tout ca permet de retracer votre comportement d’acheteur, comme ferait un vendeur de magasin, il vous observerait : dans quel rayon vous allez, combien de temps vous vous arrêtez devant tel produit, etc.

C’est en cela que le web est encore en retard, car les vendeurs de magasin vont encore plus loin grâce au département de présentation visuelle : ils vont jusqu’à modifier l’organisation du magasin pour faciliter votre parcours de la porte jusqu’au produit désiré. Ça le web n’est pas encore capable de le faire, mais le potentiel est énorme car autant le magasin ne peut pas tout ré-arranger à chaque client, autant le site web oui : On peut très bien imaginer une page d’accueil spécifique à chaque visiteur. On le voit déjà avec certains paramètres comme la langue : plus besoin d’avoir à cliquer sur la bonne langue, le site vous affiche la langue spécifiée par le navigateur.

J’aimerai terminer avec ces 3 points :

  1. les vitrines des magasins se comparent au référencement sur les moteurs de recherche et c’est à ce niveau là que Google Adwords est très bon. Il met votre site disponible à un click de la page de référence pour un internaute. Le client potentiel n’a plus qu’à ouvrir la porte, tout en étant au départ dans un lieu public et familier (la rue, le centre commercial ou le moteur de recherche).
  2. Le référencement au sens large (bannière, lien croisé, etc) démontre une démarche un peu plus agressive et s’apparente plus à des tracts dans les boîtes aux lettres, des messages radiophoniques ou télévisuelles, etc.
  3. Enfin, Google Analytics permet au web de compenser le fait que vous n’avez pas (encore) de compte sur tous les sites webs. Il permet ainsi à un site d’obtenir les informations manquantes pour construire les profils des internautes. La tendance est plus au partage et à l’interconnexion des sites : LinkedIn peut aller chercher mes contacts sur Gmail, mon compte sur hotmail.com est relié à celui sur expedia.ca, etc.

Sunday August 5, 2007

VoIP with Ekiga

Max @ 14:09 | Filed under: Information Technology,Telecom

Ekiga

As I will be moving in August, I have asked Bell Canada to install the new line on August the 1st and terminate the old one on the 20th. Unfortunately, they cut the old one on the 1st.

Great news, I still have Internet. Bad news, this is my mom birthday and I can’t call her! Such a good opportunity to try and use VoIP softwares on Ubuntu Feisty Fawn.

I gave Skype a try : download, install, configure, play around with my routeur to open a port, etc… Still “Signin Failed”. My login works, I know it. No log.

I tried Ekiga with a Ekiga PC-to-Phone account on Diamond Card. For those considering using it and willing to have an idea of the call rates, here are some examples :

  • 30 minutes on a wired line in France : 0.60 US$
  • 4 minutes on a mobile in France : 0.68 US$
  • 1 minute on a mobile in Canada : 0.021 US$
  • 1 minute in Mexico : 0.113 US$

Quality of the line was excellent when calling my cell phone.

I was able to wish a happy birthday to my mom and call my dad for 30 minutes. Although we never repeat ourselves (not more than a normal line), I had to decipher his speech due to some cuts.

Cuts were longer when calling to Mexico… :o(

Monday July 30, 2007

Ubuntu Live

Max @ 20:00 | Filed under: Information Technology

Ubuntu LiveI went to the Ubuntu Live last week-end. it was the first Ubuntu conferences, sponsored by Canonical. Beyond learning many things on the distribution, its future and the way it works, I met a lot of people, with whom I had great discussions.

DSCN0046

Ubuntu drove GNU/Linux at a further step towards the needs of users, and so is its community. Folks tagging the open source world as a geek underground world should get their stereotypes updated. I guess the open source became mature in the mean time of its growing community. Some of you might be very surprised how speakers behaved on stage and managed their stress. We were very far from the anti-social stereotypes of open source contributors. This means that anyone can contribute to the movement with its abilities, one way or the other. So I stood up, and I started walking with few sentences translated in french on Launchpad.net. I guess next step would be to get my mother on Launchpad… :o)

I would like to thank Etienne Goyer. I had a great pleasure helping him to prepare its tutorial “LDAP in Ubuntu”. I think he did a very good job on stage and deserved all the pride ;o)

Monday July 2, 2007

How do I use GPG ?

Max @ 22:17 | Filed under: Information Technology

Here are the basics command after installing gnupg :Generate his public and private key :

$ gpg --gen-key

Publish his public key :

$ gpg --keyserver wwwkeys.pgp.net --send-key [your email]

Retrieve public keys :

$ gpg --keyserver wwwkeys.pgp.net --search-keys [email]
$ gpg --keyserver wwwkeys.pgp.net --recv-keys [hexadecimal code of the key]
$ gpg --sign-key [email]

List all your keys :

$ gpg --list-keys

Update/Modify key :

$ gpg --edit-key [email]

Delete key :

$ gpg --delete-secret-keys [email]
$ gpg --delete-key [email]

Store his public key in a file :

$ gpg --export --armor [email] > publickey.asc

Verify a signature :

$ gpg --verify signature.asc

How can I protect a part of a website ?

Max @ 22:14 | Filed under: Information Technology

You have to create an .htaccess file in the directory you want to protect. Here is an example of the syntax :

AuthUserFile /home/*/*/protected/.htpasswd 
AuthGroupFile /dev/null
AuthName ByPassword
AuthType Basic
<Limit GET POST>
require valid-user
</Limit>

Then you just have to use the htpasswd command of the Apache Web Server to create a base of users and encrypted passwords :

# htpasswd -c .htpasswd user
« Previous PageNext Page »

Copyright © Maxime Chambreuil