Sunday, August 18, 2013
mkvirtualenv -v --no-site-packages --python=python3.3 virtualenvname
(I am trying to use python 3 with pyside - cross the finger)
Of course, to build pyside one must have qmake installed, so, run:
sudo yum whatprovides '*/qmake'
showing which packages provide the qmake binary, and then
sudo yum install qt-devel
Installing PySide requires python.h, which is provided by both python-devel and python3-devel.
Remember that I am trying with PySide and Python 3, so mandatory is:
yum install qt-devel
This will install version 4.8.something, which brings qmake.
After that activate your virtualenv, and then:
python setup.py bdist_egg --qmake=/usr/bin/qmake-qt4
Monday, July 08, 2013
While having some emails sent from my server is handy, I do not want to handle all of postfix / DNS (mx records) involved in managing a real mail server.
Having a gmail account, I can have postfix relay (send through an external server) mail with this account. In the early internet days, relaying was open - every mail server would have the possibility to ask another mail server to handle the mail. Now, for security reasons (spam, anybody ?) this is no more the case so the configuration is a bit more complicated.
Just append the following lines to /etc/postfix/main.cf:
relayhost = [smtp.gmail.com]:587
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl/passwd smtp_sasl_security_options = noanonymous
smtp_tls_CAfile = /etc/postfix/$hostname.pem
smtp_use_tls = yes
stmp_tls_loglevel = 1
stmp_tls_per_site = hash:/etc/postfix/tls_per_site
Append the following in /etc/postfix/sasl/passwd (create one if not already there).
Now, change permissions to the newly created file:
chmod 600 /etc/postfix/sasl/passwd
After that, you have to create the db file (binary) used by postfix with:
The CertificateFor all of this to correctly work, you need a certificate to be exchanged (for authentication purposes) among your server and gmail's.
So we create a new certificate (the cacert.pem referenced in the main.cf file) with the following steps:
You will receive some questions (leave blank) after that you will find a new file (hostname.pem) to be copied in /etc/postfix
cp $hostname.pem /etc/postfix/$hostname.pem
Final TouchesChange Permissions to sensitive files
chmod o-r /etc/postfix/sasl_passwd
chmod o-r /etc/postfix/sasl_passwd.db
chown postfix /etc/postfix/sasl_passwd
chown postfix /etc/postfix/sasl_passwd.db