
Postfix virtual users forwarding
Postfix virtual users forwardingI've reinstalled completely my mail server with :
- postfix
- dovecot
- ClamAV
- ClamSMTP
- postgrey
- spam assassin
- squirrelmail
Following these great articles. By the way in the first article, be sure you changed ownership of /home/vmail and everything below (domains etc...) to the vmail user or at least for him to rwx. If not your email will bounce to the recipient with the corresponding error message (something like "file or directory not found").
Everything worked as expected and quite quickly under ubuntu I must say... until I wanted to give to my users the same forwarding possibility as before (with qmail). With virtual users for some obscure security reasons (??), you cannot use the .forward (or .qmail) files !
"This agent was originally based on the Postfix local delivery agent. Modifications mainly consisted of removing code that either was not applicable or that was not safe in this context: aliases, ~user/.forward files, delivery to "|command" or to /file/name " from the postfix documentation.
Well in your /etc/postfix/vmaps you can specify redirections (john@doe.com -> johndoe@gmail.com) but you cannot save the email and forward it to one or more addresses like we often do for small mailing lists on "general" email addresses such as "contact@example.com"
As it seems it is not that easy to find a solution to this surprisingly bigger-than-I-thought small problem ! I haven't found anything about this on internet. It's probably resolvable if you choose to store your emails in mysql (although I didnt try) but I like the old filesystem style better, easier for external scripting and it doesnt bother the database.
So I wrote a transport layer who does this. I hope it could be useful to someone.
Features :
- no need to install an external program and should work with any postfix/imap/pop3 installation
- deliver mails locally and/or forward to as many as addresses as you wish
- supports aliases
- if you use spam assassin (or another antispam which follows the same marking rules), the script can dispose automatically of your spam (delete or putting them to a server blackhole directory)
To install it :
- edit /etc/postfix/main.cf and change : virtual_transport = mydrop
- comment your transport_maps line if any
- edit /etc/postfix/master.cf and add at the end (there should be no spaces at the end of the lines)
- put the following script in /home/vmail/mydrop.py and configure if needed the options at the top
- chmod +x /home/vmail/mydrop.py
- restart postfix with: /etc/init.d/postfix restart
To use it :
By default it will deliver to the /home/vmail/domain/johndoe/ directories as before.
At any time you can create a ".qmail" file in each of the account's root (such as /home/vmail/domain/johndoe/) and as per the ususal .qmail files you can use on each line either "&johndoe@gmail.com" to forward to this email or "./Maildir/" (case insentive) to deliver locally. Example to forward to 2 addresses and keep locally :
Let me know if you have any questions...
Note : you need to have all your domains and users to be in lowercase in your directories and your vmaps or you wont be able to receive emails in capitals.
[NOTE this has been updated on 4th of september 2008 to fix a bug] mydrop.py script :

And you, what's your excuse ?
And you, what's your excuse ?Why aren't you an artist, a scientist, a hero ?
Dont you feel the urge to be more than you, but no more than anyone ?
Dont you hear further than the noise of living ?
Dying of being average, simply replaceable copycat.
Arent you tired of your mechanical reactions ?
Dont you see the unbearable mighty numbers ?
Everything's temporary, transiting bodies and futile hapiness
Could you be more, do you have what it takes ?
Would you be able to salt reality ?
To deliver something new.
To create, invent, inspire.
Extirpate the divine out of you.
Build a death with a meaning.
To let the place tidier or cuter.
Dont you smell the fear of your own destiny ?
If life's a bitch, who's creativity ?
Craving to be high but you're too heavy.
Addicted to the very instants tasting god in your veins...

PECL and PEAR memory problem
PECL and PEAR memory problemif you had like me this kind of problem when trying to install or uninstall a package with PECL or PEAR:
Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 16 bytes) in /usr/share/php/PEAR/Registry.php on line 1012
Than your version of php is older than 5.2.0, either because you didnt reinstall it for a while or because you're under ubuntu for example.
After this version they figured out that the memory limit by default in PHP is 8M, which is very low, so probably you have all figured out how to increase this value in the php.ini !
Yeah but pecl and pear are not using the php.ini sadly, not even the "cli" version that you have under ubuntu or other installation. It is just PLAIN DEFAULT values.
So the trick is to edit the pecl script which is locate here under ubuntu (at least 6.10) :
/usr/bin/pecl
edit the last line where << exec $PHP ... >> is written and add << -d memory_limit="-1" >> just after $PHP, this should look like :
exec $PHP -d memory_limit="-1" -C -n -q $INCARG -d output_buffering=1 -d safe_mode=0 $INCDIR/peclcmd.php "$@"

Subversion url change
Subversion url changeWhat if my repository has changed its url ?
Forget svn switch it will only work if the domain name has changed (and yes especially if you used --relocate)
You can checkout again. Yes, but what if you changed some of the files and didnt want to commit them ? And you dont want to check out again 350 MB of data ?
Special attention for lucas.


Express delivery package arrived !
Express delivery package arrived !
Hi, I'm nathanaël. I weight 6.50 pounds and 19.685 inches high. I landed on earth on the 2nd of January 2008 at 18:33 in "Chez Les Grangettes", a nice hostel with bed and breakfast and plenty of nice people around. Food is great. Not only mine but for my mother too - and I'm not against that ! I dont always understand humans, they have a huge balloon in here but they don't let me play with it ! Only my mother could... Anyway I thought I was gonna say hello here since my parents insisted, trying to see how clever I was, and skilled with a keyboard. Seriously do you really think this thing is going to change the world ??? |
![]() |
![]() |
|
![]() |
Le colis en recommandé est arrivé !
Le colis en recommandé est arrivé !
Hello, je suis nathanaël. Je pése 2.950 kilogrammes et je mesure 50 cm. J'ai atteri sur terre le 2 janvier 2008 à 18h33 "Chez Les Grangettes", un hotel chic type B&B avec plein de gens sympas qui s'occupent de moi. La bouffe est géniale. Pas seulement la mienne mais celle de ma mère aussi - et je n'en suis pas contre ! Je ne comprends pas toujours les humains, ils ont un énorme ballon ici je ne vous dis que ca ! Mais ils ne me laissent pas jouer avec ! Seule ma mère a pu ?! Bref, j'ai pensé que je pouvais vous faire coucou ici, vu que mes parents ont insisté et que je les soupçonne de vouloir tester mes capacités intellectuelles... avec un clavier. Franchement vous pensez sérieusement que ce truc va changer le monde ??? |
![]() |
![]() |
|
![]() |


China - Preview II
China - Preview IITime for a second sneak peak
Processing the pictures is quite a pain. Ah bloody digital photography : countless pictures saved, total liberty for editing them !
Fewwww I wish I could not change anything at all.
I'm just like Sisyphus...
On the left, well I'm sure you know what is it.
Below this is a bouddha from the Yungang grottoes. The small one on the right actually remind me of someone, you know somebody at his peak of power ?
And here is the chinese solution to reduce CO2 emissions !
Chine - 2ème mise en bouche
Chine - 2ème mise en boucheC'est l'heure pour une seconde bouchée !
Retoucher les photos est réellement pénible. Ah qu'est ce qu'on aime la photographie numérique : peu ou pas de limite de stockage, une totale liberté pour les retoucher !
Fiouuuu et si je préférerais ne rien pouvoir modifier ???.
Je ne suis qu'un autre Sisyphe...
Sur la gauche, je pense qu'il n'y a pas besoin de ... dessin ?
Ci dessous un bouddha des grottes de Yungang. Le petit sur la droite me rappelle quelqu'un vous ne trouvez pas ? Si si un "grand" homme au sommet de son pouvoir ?
Et voici la solution chinoise aux problèmes de transport en commun et d'émissions de CO2 !


Enchanted
EnchantedI've just watched Enchanted... and pretty proud to find it great. Ok ok it's christmas and this is a disney movie : 2 reasons to avoid paying 17.-- CHF and get stuck watching an over-sweety "life is greaaaaat" kissy kissy piece of celluloid.
Don't get me wrong, some are great such as Mary Poppins - Julie Andrews is actually the narrator of Enchanted - but lately apart of the pixar productions, the disney movies and animes have not been very exciting lately.
This one is a touchdown. It's cleverly written, full of wit and even the usual nauseous songs are finally a real catch since they have their own logic in the movie... and dont be afraid, the good thing too is that they're kept to a minimum - the longest one being in the park.
The actors are quite good, especially Amy Adams who is just perfect in the role and James Marsden is impressive as the pain-in-the-ass "perfect" prince. Only Patrick Dempsey is just about average but is sufficient enough.
So whichever you're a little child, third ager or heavy metal biker, run to see this movie and if the christmas spirit is not coming to you... Let it snow because this is just a bloody good entertaining movie.
Il était une fois...
Il était une fois...Je viens juste de voir "Il était une fois..." et plutôt fier de trouver ça excellent. Ok ok c'est noël et c'est un disney : 2 raisons d'éviter de payer 17.-- CHF et de rester scotché à un siège façon Orange mécanique devant un morceau de pellicule archi-sucré "tout le monde il est beau, tout le monde il est gentil".
Ne jetons pas l'eau du bain avec le bébé (comme c'est d'actualité !), certains films de ce genre comme Mary Poppins sont des chefs d'oeuvre - Julie Andrews est d'ailleurs le narrateur de Il était une fois... - mais dernièrement on ne peut pas dire que ce fut une veine dorée pour les films disney, si ce n'est ceux d'animation de pixar.
Celui ci est une réussite. C'est brillament écrit, plein d'esprit et même les habituelles pompeuses et nauséuses chansons se laissent écouter avec plaisir puisqu'elles ont cette fois une vague raison d'être présentes... Et restons calmes, la bonne chose aussi (surtout?) c'est qu'il n'y en a que peu, la plus longue étant celle du parc.
Le jeu des acteurs est aussi une composante de la réussite, en particulier Amy Adams qui est juste par-faite dans son rôle de princesse de conte de fées perpétuellement droguée aux effluves de bisounours et James Marsden vraiment impressionnant de tête-à-claqueries dans le rôle du "parfait" prince charmant (sans être trop lourd ce qui est une gageure !). Il n'y a que Patrick Dempsey qui ne s'en sorte quand même mais qu'à peine avec les honneurs.
Donc que vous soyez un bambin qui croit au père noël, un vieux croulant à qui on ne la fait plus ou un fan de tektonic piercé jusqu'au trognon, courez voir ce film et si l'esprit de Noël ne vient pas sur vous... C'est normal car c'est juste un bon moment à passer ! Et ca le fait !


Pictures Widget
Pictures WidgetOk I've been busy lately, my girlfriend took me on a nice week end off, weather has been bad bad bad and so on... plenty of excuses made me dont move on very quickly with the whole piccies thinggy. Who am I kidding ? It even kind of stalled for a moment ! But still I made some progresses... sort of.
So as I do am a clever guy full of ... wonderful ideas, I've lost spent some time to make a picture counter ! Yeah. And I still don't figure out why I've not received the nobel prize, don't I ?
Anyway, you can see on the left how far am I real time. God bless technology... and the holy ghost in the machine.
Compteur Photos
Compteur PhotosOk, j'ai été pas mal occupé ces derniers temps, ma petite chérie m'emmena en week end, le temps a été plutôt désagréable etc... plein d'excuses qui ne m'ont pas véritablement fait avancer disons de manière respectable sur le projet P. (P pour Put... de Photos Pénibles)
Quoiqu'il en soit j'ai fait quelques progrès. Si on veut.
Comme je suis un garçon plein de ressources, je n'ai pas hésité un instant à prendre sur moi (au péril de ma vie bien évidemment) pour... faire un compteur de photos. Si si. Et moi qui me demande encore pourquoi je n'ai pas été nominé pour le prix nobel ?
Quoiqu'il en soit, enjoy (zut je suis du mauvais côté), profitez en bien pour suivre les chiffres passionnants d'une aventure photoromanesque du plus bel effet. Hitchcock en prendra de la graine niveau suspens.

Internet Explorer CSS button display problem
Internet Explorer CSS button display problemProblem of the day :
under IE if you want to have buttons without too much space on left and right ( which cannot be removed by neither margin:0 nor padding: 0 ), you can use this trick : { overflow: visible; } which works on all version of IE.
But you may just trigger another bug in IE7 : when you scroll the page the buttons display start to be corrupted ( they disappear / vanish pieces by pieces) and fixed only if you move the mouse pointer above them ! Cool...
This is because you used the directive { height: ...; } which seems to make IE try to "stretch" the box and therefore triggers these problems.
To fix this you just have to use { line-height: ...; } instead of height and this will work better in FF as well.
Example of a nice button : (without the complete rules as on the trick above)
PS: yes I really need to implement some styles for the code !
[EDIT] : done!


China - Preview I
China - Preview I
A little UpdateSome figures first : After 10 hours of processing, I've (hum) done around 75 pictures out of 2755... This may take a little bit more time than even the worse of my previsions ! I should hurry a little bit more I'm afraid. As a little preview here are some pictures, probably it wont be the last one before the end
The picture on the right has just its canvas cut. It's from a garden in the forbidden city. |
![]() |
The next one (below) is a piece of one of the roof. This picture has been heavily processed : sky was not as blue, colors have been changed a little bit and because of direct sun the part in the shade has been greatly improved. The result looks pretty much like it should be in the end of afternoon.
Roofs in ancient China empire follow strict rules :
-
See the yellow/orangish top : it is the emperor color.
-
There are several (up to ten) beasts on each corner. They are always the same and on the same order. The number of the beasts represents the social rank : the greater the merrier. 10 is for the emperor's room.
-
Just below it is usually green or blue or in-between.
-
The walls themselves are red because it represents joy and happiness. Same for the flag nowadays.
The last picture is from a garden near the lake Zhinghai and lake Nanhai, very next to the forbidden city.
Tell me what you think ?
Chine - mise en bouche I
Chine - mise en bouche I
Petite Mise à jourQuelques chiffres d'abord : Après un peu plus de 10 heures de travail, je n'ai terminé qu'environ 75 d'entre elles sur 2755... Cela risque de prendre un peu plus de temps que prévu - probablement plus que mes pires prédictions ! Je vais probablement devoir me dépêcher un peu plus j'en ai peur. Donc pour une petite "preview", voici quelques photos, bon certes il va peut être y en avoir quelques unes de plus de preview d'ici la fin du travail
La photo sur la droite a juste été recoupée. Il s'agit d'une vue dans un jardin à l'entrée de la cité interdite. |
![]() |
La suivante est une partie d'un toit. Cette photo a été beaucoup retouchée : le ciel n'était pas aussi bleu ce jour là, les couleurs ont été embellies quelque peu et à cause du soleil assez brutal la partie dans l'ombre était beaucoup plus sombre. Le résultat correspond à peu près à la scène en fin d'après-midi.
Les toits dans l'empire de l'ancienne Chine se doivent de suivre certaines règles bien précises :
-
La partie jaune/orangée au dessus : c'est la couleur de l'empereur.
-
Il y a plusieurs animaux (réels ou imaginaires) sur chaque coin du toit. Ce sont toujours les mêmes et dans le même ordre mais pas toujours le même nombre. Ce nombre représente le rang social : plus il y en a, mieux c'est. 10 est pour la chambre de l'empereur.
-
Juste en dessous la couleur est généralement verte ou bleue ou turquoise, dans le style de la dernière dynastie.
-
Les murs eux même sont rouges (en fait presque bordeaux) car cette couleur représente la joie et le bonheur. Vous noterez que c'est la même chose pour le drapeau de nos jours.
La dernière photo vient d'un jardin près des lacs Zhinghai et Nanhai, eux même juste à côté de la cité interdite.
Dites moi ce que vous en pensez ?