DevOp - consultant - artisan

Qualité, amélioration continue, agilité, professionnalisme.

Un besoin ? Un projet ? Écrivez moi !

Permission denied creating inbox file in /var/mail – dovecot

Hi !

this morning I have seen this error :

Permission denied creating inbox file in /var/mail

I have done a basic setup of dovecot + postfix.
At the time to test my new mailbox, after added a new user, no luck, and this message in the log.

Solution is really simple, as the mailboxes are owned by the user, and the group is set to « mail »

[pastacode lang= »bash » manual= »-rw——-%20%201%20amavis%20%20%20%20mail%20%20%20%20836%20Jun%2019%20%202015%20amavis%0A-rw——-%20%201%20jenkins%20%20%20mail%20442270%20Sep%2030%2000%3A00%20jenkins%0A-rw——-%20%201%20root%20%20%20%20%20%20mail%20634190%20Sep%2030%2000%3A12%20root%0A-rw——-%20%201%20technique%20mail%20%20%20%20%20%200%20Sep%2030%2014%3A43%20technique » message= » » highlight= » » provider= »manual »/]

You just need to add your user to the « mail » group :

[pastacode lang= »bash » manual= »addgroup%20technique%20mail » message= » » highlight= » » provider= »manual »/]

Where « technique » is my username.

That’s all !


debian, ubuntu under KVM really slow

I can’t remember where I found this, so, if you are the original author of this solution, say hello, with the original link 🙂

If you install a debian or an ubuntu, you can experience some bad perf.

I use virt-manager to manage my vm’s.

Simple file with some options for the QXL driver fix the problem.

[pastacode lang= »bash » manual= »nano%20%2Fusr%2Fshare%2FX11%2Fxorg.conf.d%2Fqxl.conf » message= » » highlight= » » provider= »manual »/]

Inside the file :

[pastacode lang= »bash » manual= »Section%20%22Device%22%0A%20%20%20%20Identifier%20%22qxl%22%0A%20%20%20%20Driver%20%22qxl%22%0A%20%20%20%20Option%20%22ENABLE_SURFACES%22%20%22False%22%0AEndSection » message= » » highlight= » » provider= »manual »/]

And reboot !


How to : elastic search + fosElastica + symfony2 + typehead + bloodhound + elastic suggesters

(POST in BETA version, but I prefer release it, and enhance it later, than never publish ^^)

I want to use Elastic, to manage my search functionality.

It’s a symfony2 project, so I start my research by the integration of Elastic in symfony2, and FosElastica came up.
Thanks to FOS #friendOfSymfony2 people again, and again, your work is amazing !
Also nothing happends here without Elastica

This bundle provides integration with ElasticSearch and Elastica with Symfony2. Features include:

Integrates the Elastica library into a Symfony2 environment
Automatically generate mappings using a serializer
Listeners for Doctrine events for automatic indexing

I assume here, you have already a running symfony2 project, with data on it, I use this setup, to search over user, by name, mail, and over another data named « tags », a kind of internal references to group items.

Steps :

  1. install Elastic
  2. configure Elastic
  3. install FosElastica
  4. configure FosElastica
  5. try with Elastic web interface to confirm 4 firsts sets
  6. add typeahead.js to your page
  7. configure and implement bloodhound and typeahead
  8. Enjoy !


1 – Install of elasticsearch :

[pastacode lang= »bash » message= » » highlight= » » provider= »manual »]

apt-get install elasticsearch


(If you are under ubuntu use sudo if you not root, tested on ubuntu 15.10 and Debian 8.)

To have elastic working, I’ve to :

[pastacode lang= »bash » message= » » highlight= » » provider= »manual »]

chmod -R elasticsearch:elasticsearch /var/lib/elasticsearch


Both debian and ubuntu.

After that, you need to go to :

[pastacode lang= »bash » message= » » highlight= » » provider= »manual »]

cd /etc/elasticsearch/


and open « elasticsearch.yml » to configure it.

2 – Configuration

(TODO : CORS config + security)

3 – Install FosElastica

with composer :

[pastacode lang= »bash » message= » » highlight= » » provider= »manual »]

php composer.phar require friendsofsymfony/elastica-bundle "~3.0"


And enable it :

[pastacode lang= »php » message= » » highlight= » » provider= »manual »]


4 - FosElastica configuration :

Faster Autocomplete with typeahead.js, Elasticsearch & nginx