Wednesday, April 8, 2009

Updating time in Ubuntu

To manually update the time in ubuntu run the following command:
#sudo ntpdate ntp.ubuntu.com

This will update the time from the Ubuntu servers

Postfix enable Subject for logging

To enable logging of the "Subject:" information feature in Postfix, you need to modify the "header_checks" file in the main.cf file.

To create a file use this:
"regexp:/etc/postfix/header_checks".

main.cf entry = "header_checks = regexp:/etc/postfix/header_checks"

Once that file is created, you need to modify the file by adding:
"/^Subject:/ WARN"

This will add the Subject text to the info or mail.info log file. You can then grep based on the subject text.