I’ve got a few servers in different places around the country and try to monitor them using the logwatch utility. One problem that I’ve run into however is that a few of these servers are not able to send their logwatch emails to me, based on email restrictions by the ISPs. I spent some time this afternoon researching what was required to have my servers authenticate to my gmail account and send me the mail that way. This setup assumes Ubuntu 8.04 (or later) and Postfix.
Install the required packages
sudo aptitude install postfix libsasl2 ca-certificate libsasl2-modules
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/main.cf file:
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/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.
To install ubuntu on Dell system you need to change the default boot loader to grub2 or something else
#change the root password to something that you know
mount /dev/sda1 /media/ubuntu
# check that you have mounted the right partition.
mount -t proc none /media/ubuntu/proc
mount -o bind /dev/ /media/ubuntu/dev
cp /etc/resolv.conf /mediaubuntu/etc
chroot /media/ubuntu /bin/bash
aptitude install grub2
The one I use is Xming but it is rare. Most often I prefer the integrated in Gnome VNC.
The reason I am posting this link is that sometimes I really need and want to connect to my desktop machine in this way but I cant find good software. So I decide that my blog is the perfect place to note this.
aptitude install nvidia-glx-new
aptitude install nvidia-settings
Some options that you can put in the Screen section
Option “NoLogo” “True”
Option “RenderAccel” “True”
# This turns on NVidias TwinView
# Option “MetaModes” “1280×1024″ “1152×864″ “1024×768″
# LeftOf, RightOf, Below, Above, or Clone.
# Option “TwinViewOrientation” “LeftOf”