03 Oct

Postfix: how to disable local delivery

if you need to send emails from your Postfix server using MX records instead of local delivery you should leave the following line empty:

mydestination = $myhostname, localhost.$mydomain, localhost

in /etc/postfix/main.cf.
This way:

mydestination =

And restart the server:

/etc/init.d/postfix restart
25 Aug

How to minify HTML files

To provide best website performance it makes sense to minify static HTML files. There several ways to do that. One of the most easiest is to use django-htmlmin. To install run:

python-pip install django-htmlmin

To minify run:

pyminify index.html > index_minified.html

It would make sense to tar/zip files before you minify them.

You can also use it as a library for Flask and, obviously, Django. Check the documentation to get the details.