Skip to main content

Posts

Showing posts from March, 2009

Saving date and time to hardware clock manually

If you change date and time in console, the hardware clock may not be updated instantly. There's a script usually find in many distros that save the date and time to hardware clock before the computer off or restart. Some GUI apps changed the hardware clock if you change the software clock. If you want to change the hardware clock manually, here's the command:

hwclock --systohc

and obviously, you have to run it as root.

dbmail and database default character set

I migrated my mailserver to another server recently. I installed dbmail from scratch and restored my database into new mysql server. When I started dbmail to connect to the database server, I found out in syslog (see below) that the dbmail-imapd couldn't connect to the server because of the different character set. It's a FATAL error!. I found out that my old database used latin1 as the default character set and dbmail used utf8 as I defaulted in /etc/dbmail.conf. So I just change the default character set of my dbmail database in MySQL to utf8 (see below). This solved the problem.

In syslog before changing the character set:
Mar 14 13:01:54 webmail.fakedomain.com.my dbmail-imapd[13986]: Error:[sql] dbmysql.c,db_mysql_check_collations(+138): collation mismatch, your MySQL configuration specifies a different charset than the data currently in your DBMail database.
Mar 14 13:01:54 webmail.fakedomain.com.my dbmail-imapd[13986]: FATAL:[server] server.c,StartServer(+129): Unable to co…