Archive for category Hardware

Postfix + Gmail SMTP server relay under Ubuntu OS

In order to preserve the useful information, I took information from the internet and posted here. The method was verified and works well for my situation.

I realize that there are too many tutorials on getting your Relaying Postfix SMTP via to work. Most of them are long and complicated, but I found a tutorial from this particular website which provides the shortest, simplest, and the clearest tutorial on how to get it work in less than 5 minutes. I would like to post it here for my future use again, so that I don’t need to spend hours finding the right tutorial to get it done 🙂

Install the required packages
sudo aptitude install postfix libsasl2 ca-certificate libsasl2-modules

Configure Postfix
This tutorial will not outline how to configure your postfix server, but we’ll jump directly to the relayhost section. You’ll want to add the following lines to your /etc/postfix/ file:

relayhost = []: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/cacert.pem
smtp_use_tls = yes

The above lines are telling Postfix that you want to relay mail through gmail on a specific port, telling it to authenticate, and where to find the username and password. The last three lines specify the authentication types supported, where the certificate authority file is and that it should use tls.

Define Username and Password
Next we’ll need to populate the sasl_passwd file. Create the file /etc/postfix/sasl_passwd with the following contents:


This file should have restrictive permissions and then needs to be translated into a .db that Postfix will read.

sudo chmod 400 /etc/postfix/sasl_passwd
sudo postmap /etc/postfix/sasl_passwd

At this point you can restart Postfix and it should work, however it will complain about not being able to authenticate the certificate. To take care of this issue we’ll use the ca-certificate package we installed and tell it where it can validate the certificate.

cat /etc/ssl/certs/Thawte_Premium_Server_CA.pem | sudo tee -a /etc/postfix/cacert.pem

Go ahead and reload postfix (sudo /etc/init.d/postfix reload) and you should be set.

Taken from

Additional materials:
1) Warning message – No address associated with hostname
If the mail relayhost is wrong, you will get a lot of warning message in /var/log/mail.warn with the “No address associated with hostname”. That indicates you have to put a valid smtp relay mail server in the config file. Otherwise all your mail will be stuck in somewhere without your notice.

2) Warning message – no route to host in the mail.log
I checked mail.log and found “no route to host” after I put gmail smtp as the mail relay server. The reason I got this was I did not get the TLS authentication correctly. After I corrected it, everything goes smoothly without error.

3) Error message – 530 5.7.0 Must issue a STARTTLS command first
This message actually came from the gmail smtp server. It tells you something is not right. Actually it is the same problem as the point 2). Gmail smtp server needs TLS authentication.


Tags: , , , , , ,

Configure ActionTec Q1000 to function just as a modem


Qwest (or CenturyLink) provided VDSLs modem – an Actiontec Q1000 combo modem/router.
I have a router setup neatly and do not want to use Q1000’s router function like the Q1000 just as a modem.
How do I physically hook the hardware up?


1. Go to Advanced Setup in the GUI
2. Go to “WAN IP Address” under the “IP Addressing
3. Choose the “RFC 1483 Transparent Bridging” option

After performing those steps the Actiontec will still hand out an IP address to whatever is behind it, but it will not authenticate. However, as soon as you configure a device behind the Actiontec to do the authentication then the Actiontec will stop handing out dynamic IPs and will function just as a modem.

The content is from the following post.

I tested it and it works.


Tags: , , , , , , ,

PPTP VPN server setup in DD-WRT firmware v24 sp2

After I installed DD-WRT v24-sp2 (08/07/10) mega version to my router, I was curious about VPN server. In the service tab, there is VPN page. There are two VPN servers available. I know OpenVPN server, which is a very good and secure VPN server but hard to setup. I have not know anything about PPTP server. After I read a few articles about PPTP server. I understand it and is willing to give it try.

Setup PPTP server

To enable and set up the PPTP server is not too hard. You have to know put the correct ip address in the right boxes. The following is what I use in my PPTP server. To be noticed that and are open DNS servers.

PPTP Server x Enable Disable
Broadcast support x Enable Disable
Force MPPE Encryption x Enable Disable
Server IP
Client IP(s)
lishi * mypassword *
wangwu * wangpwd *

Note about “Server IP”: the server IP should a valid IP address in your LAN. In this case I use because it is the first available IP outside of DHCP server. My router’s ip address is and DHCP server’s range is This in very important.

Note about “Client IP(s)”: it is a block or a list of valid IP address in your LAN. In my case, I use So I can have 21 VPN clients at same time.

Note about CHAT-Secrets: It includes a list of username and password combinations. You must follow the following rule strictly. Otherwise it does not work.

Username * Password *
(username_to_use,blank space,asterisk,blank space,password_to_use,blank space,asterisk)

Port forwarding

After you complete these setting, save and apply the setting. Then proceed to the next step. Now set the port forwarding through NAT/QoS -> Port Forwarding. In this step, you want to forward ports 1723 and 1792 to the router, because it the router handle the PPTP server.

PPTP 1723 BOTH 1723 Enable
PPTP 1792 BOTH 1792 Enable

Save and apply the setting. Then go to Administration tab to reboot the router. After the router is rebooted, the PPTP server should work properly. To test if the VPN server works, you can create a VPN connection in your Windows machine by following at Remember to fill the host name or IP address with the public IP address in your router, which is visible to the world. will never work. Then we can connect to PPTP server by using the correct username and password combination, set in the CHAT-Secrets.


If a PPTP client to the VPN server, you will see an entry in the Status -> LAN page, similar to the following:

Interface User Name Local IP Remote IP Delete
ppp0 xxxx



Tags: , , , , , , , ,

Experience of playing ASUS RT-N16

First look

The router looks neat, white with three antennas. I love it at the very beginning. I hook it to my laptop and visit its web page. ASUS stock firmware provides all the functionality to utilize the router. I can plug in USB flash drive and access files in it. The stock firmware does not provide your flexibility to access variety of settings related to router functions. After I play it for a couple of hours, I lost my interests on the stock firmware. I started to search internet to find alternative firmware for this router. I tested a couple of the firmwares, Oleg and DD-WRT firmware.

OLeg firmware

I installed Oleg firmware version RT-N16- to my RT-N16 router. Its functionality is better than the stock firmware but not comparable to DD-WRT firmware I used in the Linksys router. I keep this firmware running for a couple of weeks. I read a lot of materials from the following blogs and posts. They are very useful. I suggested you also read them.

DD-WRT firmware

Finally I decided to flash the router with my favorite alternative firmware DD-WRT (version DD-WRT v24-sp2 (08/07/10) mega). It is the latest one. I followed DD-WRT Wiki for RT-N16 page to install the DD-WRT firmware to RT-N16 router. The router running in this firmware is stable and powerful. I have the flexibility to set a lot things. See my another post related to DD-WRT: A tutorial of using DD-WRT firmware in routers, for detail.


Tags: , , , , ,

Experiencing Samba sharing in O!Play Air HDP-R3

I bought a ASUS O!Play Air for $104 from with this coupon in the other day. I was amazed about the little box. I always like ASUS products. I started to play with it and upgrade it firmware to the latest release v1.17N. One thing I tried today is to enable its Samba sharing function.

I read a nice post at It provides simple command to enable the Samba sharing function as the following:

cd /tmp/package/script
./samba start

To do this, you have to telnet to the box first.

First find out the IP address the little box has from its user interface. In your Windows box, use telnet or PuTTY to telnet to box by this IP address. Log in with root and no password. Then, all you need to do is to type the above Linux command to enable Samba sharing. That will allow you to access the external storage attached to the device.

Once this is done, you can use your windows explorer to find and browser files and folders on O!Play. Type \\ (replace with your real IP addrss) to the address bar. I got the shared drive. I selected a folder on O!Play (wlan) and copied entirely over the net to my Windows box (wlan). Figure 1 show some detail information related file coping.

Figure 1

One thing make me bad is that there connection error message pop up frequently. Figure 2 is one of the error message.

Fgiure 2

After I saw this errors, I tested copy function through my wired machine. The windows box (wlan) is same, select and copy file and folder from a wired Linux machine (lan). The speed is much fast 1.86 MB/second instead ot 700-800 KB/second in the above O!Play case. I also connect the O!Play air with ethernet cable to the LAN, the speed bumped up to 2.0MB/second (15 Mbps). That makes me thinking the the Wireless Card (N category) is a very cheap one and does show a lot of errors, just like the ones on EEE BOX machines. My other machines have much better wireless card or wireless usb adapter than those in EEE Boxes. I do not expect I got great hardware at this low price. So I recommend that you always connect your O!Play to your network through wired cable whenever it is possible.

Visit a collection of links and files related to O!Play Media Player at


Tags: , , , , , , ,