WING LOON

decoding my knowledge through blogging

Archive for September, 2007


Vacation Email Responder for Sendmail in CentOS 5

Vacation is the automatic mail answering program found on many Unix systems. This write up will guide you on how to install and configure the vacation email responder and setup it using the popular webmail SquirrelMail in CentOS 5. Do not use my previous write up as a guide because the SquirrelMail Vacation Local plugin contains dangerous vulnerabilities. You are advised to upgrade to the SquirrelMail Local User Autoresponder and Mail Forwarder plugin immediately.

Requirement: Vacation, Sendmail, SquirrelMail, SquirrelMail Local User Autoresponder and Mail Forwarder plugin, SquirrelMail Compatibility plugin, vsftp and CentOS 5

1. Download vacation-1.2.6.3.tar.gz from the link below: -
http://vacation.sourceforge.net

2. Extract the vacation to a temporary directory as below: -
tar xvfz vacation-1.2.6.3.tar.gz -C /tmp

3. Change directory to /tmp/vacation-1.2.6.3 as below: -
cd /tmp/vacation-1.2.6.3

4. Run the “make” command as below: -
make

5. Copy the “vacation” binary to “/usr/bin” as below: -
cp vacation /usr/bin

6. Create a softlink in the Sendmail’s restricted shell utility “smrsh” as below: -
cd /etc/smrsh
ln -s /usr/bin/vacation vacation

7. Next, lets proceed with installing and configuring SquirrelMail’s Local User Autoresponder and Mail Forwarder Plugin. Download local_autorespond_forward-3.0-1.4.0.tar.gz from the link below: -
http://www.squirrelmail.org/plugin_view.php?id=264

8. Extract the local_autoresponder_forward to SquirrelMail’s plugin directory (in CentOS 5) as below: -
tar xvfz local_autorespond_forward-3.0-1.4.0.tar.gz -C /usr/share/squirrelmail/plugins

9. Download the Compatibility plugin from the link below: -
http://www.squirrelmail.org/plugin_view.php?id=152

10. Extract the compatibility plugin to SquirrelMail’s plugin directory (in CentOS 5) as below: -
tar xvfz compatibility-2.0.8-1.0.tar.gz -C /usr/share/squirrelmail/plugins

11. Run the SquirrelMail’s config command as below: -
cd /usr/share/squirrelmail/config
./conf.pl

12. Patch your SquirrelMail according to your version as below: -
patch -p0 < patches/compatibility_patch-1.4.8.diff

13. In SquirrelMail Configuration Main Menu, key-in “8″ to enter Plugins menu. Next, key-in the number that refer to “local_autorespond_forward” to install the plugin

14. Create the local_autorespond_forward configuration file as below: -
cd /usr/share/squirrelmail/plugin/local_autorespond_forward
cp config.php.sample config.php

15. Edit the config.php file and change the following as below: -
$ftp_passive = 1;

16. Next, you need to enable the vsftp service in init level 3, 4 and 5 as below: -
chkconfig --level 345 vsftp on

17. Let’s start the vsftp service as below: -
service vsftp start

You can now begin to use the SquirrelMail’s local_autorespond_forward plugin to configure the vacation email responder for Sendmail.

Source: Vacation Email Responder

If you found these helpful, please contribute to help:

Network Card High Availibility in Linux

My friend called me today and requesting me to help him to solve a network card issue in a Linux box. It is a CentOS 5 box running as a mail server. The network card gives a lot of problem. Every time he need to reboot the box to resolve the network issue. So, I recommend him to purchase two network cards and team/bond them up into a single network card with active-backup policy mode. This mode provides fault tolerance. He agrees with my recommendation. He proceed with the configuration I gave him as below.

1. Append the following line into /etc/modprobe.conf file.

alias bond0 bonding
options bond0 miimon=80 mode=1

2. Create a new interface configuration file for bond0 /etc/sysconfig/network-scripts/ifcfg-bond0 and append the following line into the file.

DEVICE=bond0
IPADDR=192.168.190.128
NETMASK=255.255.255.0
NETWORK=192.168.190.0
BROADCAST=192.168.190.255
GATEWAY=192.168.190.1
ONBOOT=yes
BOOTPROTO=none
USERCTL=no

3. Modify the interface configuration file for eth0 /etc/sysconfig/network-scripts/ifcfg-eth0 as below.

DEVICE=eth0
BOOTPROTO=none
ONBOOT=yes
MASTER=bond0
SLAVE=yes

4. Modify the interface configuration file for eth1 /etc/sysconfig/network-scripts/ifcfg-eth1 as below.

DEVICE=eth1
BOOTPROTO=none
ONBOOT=yes
MASTER=bond0
SLAVE=yes

5. Let’s reboot the box. Run a ifconfig command and the output is as below.

bond0 Link encap:Ethernet HWaddr 00:15:C5:19:22:CC
inet addr:192.168.190.128 Bcast:192.168.190.255 Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:fe19:22cc/64 Scope:Link
UP BROADCAST RUNNING MASTER MULTICAST MTU:1500 Metric:1
RX packets:594 errors:0 dropped:0 overruns:0 frame:0
TX packets:360 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:61043 (59.6 KiB) TX bytes:73868 (72.1 KiB)

eth0 Link encap:Ethernet HWaddr 00:15:C5:19:22:CC
inet6 addr: fe80::20c:29ff:fe19:22cc/64 Scope:Link
UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1
RX packets:462 errors:0 dropped:0 overruns:0 frame:0
TX packets:342 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:45776 (44.7 KiB) TX bytes:70342 (68.6 KiB)
Interrupt:177 Base address:0x1400

eth1 Link encap:Ethernet HWaddr 00:15:C5:19:22:CC
inet6 addr: fe80::20c:29ff:fe19:22cc/64 Scope:Link
UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1
RX packets:137 errors:0 dropped:0 overruns:0 frame:0
TX packets:27 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:15567 (15.2 KiB) TX bytes:4944 (4.8 KiB)
Interrupt:185 Base address:0x1480

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:8 errors:0 dropped:0 overruns:0 frame:0
TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:560 (560.0 b) TX bytes:560 (560.0 b)

6. Let’s verify the bonding mode by running this command cat /proc/net/bonding/bond0 and you will get this output below.

Ethernet Channel Bonding Driver: v3.0.3 (March 23, 2006)

Bonding Mode: fault-tolerance (active-backup)
Primary Slave: None
Currently Active Slave: eth0
MII Status: up
MII Polling Interval (ms): 80
Up Delay (ms): 0
Down Delay (ms): 0

Slave Interface: eth0
MII Status: up
Link Failure Count: 0
Permanent HW addr: 00:15:c5:19:22:cc

Slave Interface: eth1
MII Status: up
Link Failure Count: 0
Permanent HW addr: 00:15:c5:19:22:d6

Finally, the fault tolerance network card in the mail server is up and running fine.

Source: HowtoForge

If you found these helpful, please contribute to help:

FoxClocks extension for Mozilla Firefox

FoxClocks extension for my Mozilla Firefox. FoxClocks has extension for Mozilla Thunderbird and Mozilla Sunbird too. It’s Zone Picker tree lets you browse virtually all the world’s time zones by country, region or city. You can change the standard time format if you don’t like. You can even create your own custom time format. FoxClocks can take you to any location from Google Earth database. It is a very good extension for me because I need to work with different people globally for me to know their working hours.

The current stable version of FoxClocks is 2.1.93 released on 26 June 2007. The new features in this version are: -

  • Keep up-to-date with automatic time zone database updates (can’t reach the Internet? Update automatically from your LAN)
  • Set your clocks to change colour, e.g. make your clocks green from 9 to 5 local time
  • Style your clocks: bold, italic, underlined
  • Move your FoxClocks settings between computers
  • Choose the right time zone more easily with a new Zone Picker (English-only)
  • Show your clocks in the statusbar/toolbar, just in a tooltip, or both
  • Sort your clocks by name or local time

You can set each clock’s country flag as below.

You can set each clock’s colour individually as below.

Source: FoxClocks

ZYB enables online mobile phone storage

ZYB is a free online mobile phone storage for contacts, pictures, text messages and calendar events. With ZYB, you can connect to people you know and have your contact details updated on your mobile phone. You can sync your mobile phone content over-the-air using GPRS, EDGE, 3G, HSDPA and/or WiFi. No special software is needed to install on your mobile phone or your PC. All the basic features of ZYB are FREE FOREVER. A small fee is chargeable if you want to sync with iPod, Outlook and MSN.

Thank you Danny for recommending this cool website. My mobile phone is supported and I am now a ZYB member. So, why wait… Sign up today.

Source: ZYB

BitComet 0.92

BitComet is a powerful C++ BitTorrent/FTP/HTTP download management software and its completely free. This new version 0.92 was released on 31 Aug 2007. I decided to download it today and give it a try since the µTorrent 1.7.2 build 3458 which I am using didn’t give me good download speed because my Internet Service Provider (ISP) is throttling BitTorrent the download speed.

Wow!!! I was surprised that BitComet 0.92 now give me good download speed of 100kB/s on a single download. What’s the configuration I did used in BitComet 0.92?

Well… I have “Protocol encryption (avoid BT blocked)” set to “Always”. I didn’t enable the “Enable UPnP port mapping (Windows XP Only)” and I didn’t setup any port forwarding in my router.

So, don’t wait… get yourself a BitComet 0.92 and begin to rock, :D

Source: BitComet

Add to Technorati Favorites

  • Archives

  • Categories

Your Ad Here

    • ss_blog_claim=f8aa1b1967b5d8b3279b4c39b76b2da1
    • Download Day 2008