Wednesday, May 25, 2011

Enable Tamil and Sinhala input methods

Here how I enabled Tamil (Renganathan IM) and Sinhala (Wijesekara) on Ubuntu 11.

Step 1 : As a root, do :

apt-get install ibus im-switch ibus-m17n m17n-db m17n-contrib ttf-tamil-fonts language-pack-ta-base ttf-sinhala-lklug language-pack-si-base

Step 2 : Just run from your user account (Not as root) :
rm -f ~/.xinput.d/* ; im-switch -z all_ALL -s ibus

Thereafter restart the session (Just logoff and login)

Thereafter do "ibus-setup" and configure your prefered input setup. In addition to that you can configure where it should appear in your screen.


Reference :

Monday, May 2, 2011

Postfix with MySQL Backend

Here I am trying to describe how I configured Postfix with MySQL backend. Here I have given only the important parameter, however you can find tune this in various ways.


Configure your Postfix with MySQL support.

I used following command - make -f Makefile.init makefiles 'CCARGS=-DHAS_MYSQL -I/usr/include/mysql' 'AUXLIBS=-L/usr/lib/mysql -lmysqlclient -lz -lm'

Before do this, please make sure that you have installed all the MySQL components, including mysql-devel.


Then do the make


DO the make install. At the end of this phase you will be prompt with many questions, answer them appropriate.


Then start configure your Postfix, normally you can find the configuration in

The important settings (though there are several settings) you need to add are :

data_directory = /var/lib/postfix
mail_owner = postfix
- make sure that you have created the user postfix
myhostname =
mydomain = XX,
myorigin = $mydomain
inet_interfaces = all
mydestination = $myhostname, localhost.$mydomain, localhost
relayhost = 192.NN.N.N
home_mailbox = Maildir/
- This is important, and this is where you say that you want to use MailDir, not Mailbox
virtual_gid_maps = static:506
virtual_mailbox_base = /var/mail/vhosts
virtual_mailbox_domains = mysql:/etc/postfix/
virtual_mailbox_maps = mysql:/etc/postfix/
virtual_minimum_uid = 100
virtual_transport = virtual
virtual_uid_maps = static:504
- You must create another user, may be vmail, who should have permission to write mails to maildir. After adding those user, you need to specify the uid and gid of that user here in uid_maps and gid_maps. Also make sure that you have given sufficient permission to the mailbox_base to the user that you have created.

After doing all these settings in the file, you need to create another two files that you have given in "virtual_mailbox_domains" and "virtual_mailbox_maps".

In my case etc/postfix/ contains following parameters :

hosts = localhost
dbname = maildb
user = mailuser
password = xxxxxxx
table = mail_domains
select_field = mail_domain
where_field = mail_domain

This tells postfix that what are the domains should be handled by the postfix it self and what are should be routed to other MTAs.

/etc/postfix/ contains :
hosts = localhost
dbname = maildb
user = mailuser
password = XXXX
table = mail_accounts
select_field = maildir
where_field = mail_user

This is used to select the MailDir name for the respective email account. For example if someone sends a mail to, this will find and tells that where that message should go in the virtual_mailbox_base.

Hope this will work for you all as well.

Good luck

Reference :