Chinese Simplified PinYin Input Doesn’t Work on Blackberry OS 5.0.0.x

Recently I have upgraded to Blackberry OS version 5.0. Everything works except for Chinese Pin Yin input where it supposes can be swap between English and Chinese. Chinese Simplified PinYin input is installed and I am able to read Chinese Characters but the language switching options cannot be seen at Options > Language and Text Input.

My model is Blackberry Bold 9000, running on latest OS v5.0.0.454 (Platform 5.2.0.41). Suspect that Application Center is crash with Chinese PinYin Input. If you have the similar problem, try to make it works by following the steps below with Blackberry Desktop Manager.

  • First, remove Application Center from your Blackberry.
  • After Application Center has been removed, install East Asian Characters and Font Support > Simplified Chinese Characters and Font Support
  • Try to do Alt + Enter, you should able to switch between English and Chinese Simplified Pin Yin

Please do share if you have others workaround.

Configure Smarthost SMTP Authentication on Postfix

My machine at home cannot send email using port 25, end up I got to do smart host SMTP authentication on Port 587 means your machine will connect to your public mail server, and from your public mail server deliver the email to recipient. Let’s do some simple Smarthost SMTP authenication on Postfix. The example is Postfix on Linux Ubuntu server.

Create Authentication Password File For Postfix

Create a password file which require authentication on your mail server.


shell> vi /etc/postfix/smarthosts.conf

#mailserver username password
mail.example.com test 123123

Save the file and perform some simple permission settings.


shell> cd /etc/postfix
shell> chown root:root smarthosts.conf
shell> chmod 0600 smarthosts.conf
shell> postmap hash:$P

Now you have done with SMTP server authentication configuration file.

Configure Smart Relay on Postfix

Fire up Postfix’s main.cf config file


vi /etc/postfix/main.cf

Paste the config below on the bottom of the configuration


relayhost = mail.example.com:587
# smtp_sasl_auth_enable = yes
smtp_auth_enable = yes
# smtp_sasl_password_maps = hash:/etc/postfix/smarthosts.conf
smtp_password_maps = hash:/etc/postfix/smarthosts.conf

relayhost is the your server address and with port 587, in case your ISP is blocking port 25. You can use either plain password authentication or SASL authentication, depend on what type of authentication does your server support.

Save it and reload Postfix Service


shell> /etc/init.d/postfix reload

Perform the testing on your newly configured SMTP Smart Host Authentication


shell> echo 'Hello World' > /tmp/hello
shell> mail -s 'Hello World' test@example.com < /tmp/hello
shell> rm -f /tmp/hello

Check on the mail server log on delivery status.


shell> tail -F /var/log/mail.log
Mar 25 22:42:43 dummyserver postfix/pickup[6747]: 755A441202: uid=0 from=
Mar 25 22:42:43 dummyserver postfix/cleanup[6772]: 755A441202: message-id=<20100325144243.755A441202@dummyserver.WAG160N>
Mar 25 22:42:43 dummyserver postfix/qmgr[6748]: 755A441202: from=, size=305, nrcpt=1 (queue active)
Mar 25 22:42:54 dummyserver postfix/smtp[6775]: 755A441202: to=, relay=mail.example.com[203.222.222.222]:587, delay=11, delays=0.12/0.01/10/0.99, dsn=2.0.0, status=sent (250 OK id=1NuoGu-000PGq-6l)
Mar 25 22:42:54 dummyserver postfix/qmgr[6748]: 755A441202: removed

If the status is sent, it means your smart host is working well.

Enable SMTP Port 587 on Exim

Most of the ISP block port 25 for outgoing SMTP. To enable Port 587 on exim, add this configuration to Exim’s configuration file.


daemon_smtp_ports = 25 : 587

Alternatively, with latest exim configuration file, uncomment the line below and you might want to remove 465.


# daemon_smtp_ports = 25 : 465 : 587

After that, save your configuration and restart exim service.

Test on Port 587

After exim service has restarted, make a telnet test to port 587


shell> telnet localhost 587

Connected? If yes, it means Exim on SMTP Port 587 is enabled now.

Configure NTP Server on FreeBSD

Configure a NTP time server on FreeBSD is fairly easy. We will spend about 10 minutes to configure a NTP Server on FreeBSD.

Select Global NTP Server to Sync

Before setting up configuration file, you might want to find out which global NTP servers to sync with on strategy locations. Strategy means select the NTP server nearby your country/continent. Here is the list of Asia NTP servers which can be obtained here http://www.pool.ntp.org/zone/asia. If you already have selected NTP server to go with, put the URL into your NTP configuration file.

Read the rest of this entry »

Open file and Splitting String in Perl

What I gonna do is to read a bunch of data from a file, and perform some data processing from the string.

  • split() is the Perl function which I will use for filtering the data.
  • open for reading a file into array.

I took MRTG’s data log to do some data processing. On the first column of MRTG log file is Unix timestamp, I would like to print the unix Timestamp to human readable date and time, the other columns are traffic in and out in bytes, which I want to find out which traffic is more than certain values.

Read the rest of this entry »