Archive

Author Archive

E-mail Marketing Trend

April 6th, 2010

Email Marketing is not dead. SMB’s still believes Email Marketing as the popular way of marketing their products.

The other traditional marketing methods cannot be totally avoided because case studies shows that always try email marketing after you make a buzz using the traditional marketing methods like TV, news paper ads etc.

In a real world scenario suppose a company plans to market a new Laptop, they should first advertise the product using TV advertisement, newspaper and other traditional mediums. This will make the crowd aware that there is a new Laptop available in the market. Awareness plays a important role in the marketing
Next step is to send a customized mail to potential customers describing features of the new Laptop, its features, specifications, pricing and shops they are available. All the people who are aware of this product is definitely going to open and read this mail if it had reached his inbox.

If the mail is descriptive enough and a persuading one, for the potential customers there is a 90% chance that they makes an inquiry, and if you are providing a discount coupon along with this mail, the chance of inquiry further goes to 95%.

Once your product is purchased by the customers you can send out a feedback-form to these customers after a certain period of time. This enabled you to understand more about your product. If they have complaints you should rectify it as soon as possible and that makes customer happy because of you being pro-active. These steps will help you to further impress the customers and for creating goodwill about your product. Within no time your product is on the roll through word of mouth

VN:F [1.9.1_1087]
Rating: 10.0/10 (2 votes cast)
VN:F [1.9.1_1087]
Rating: +2 (from 2 votes)

Shijil T S email ,

How to develop troubleshooting skills and become a good server admin

January 7th, 2010

10 points to increase troubleshooting skills and become a good Server Admin

1) Be clear with the concepts

You will be learning lot of things in random in your day-to-day work, but essentially what you need to remember are the basic concepts of each technology you have come across, starting from basic commands, services associated, the applications related, tools etc. Before you enter the system admin scenario, join the popular discussion boards, mailing lists relating to your domain. Believe me, a lot of quick tips can be gathered just by reading what others in the business have to say.

2) Build your knowledgebase

Its always good habit to write down somewhere whatever you have learned new in your days work. It would definitely come in handy in the future, cos you might have got it after rigorous research and you need not do it a second time. My notes that I always keep have saved me plenty of time for many of the issues that creep up. Also be willing to ask your peers or seniors or in the forums when you find yourself stuck, cos experience is one thing you can never garner in a little time. Remember, you can revert the favor when they look for you.

3) Try to relate with the technologies

In my early days I have wasted plenty of hours trying to find a fix without understanding the cause, but that has changed. You have to keep in mind that there will be some relation with services or applications you are working with. So if something not working it might be that of some other service that is related to it. Knowing which is causing the problem is the measure of your troubleshooting skill. So think cleverly and identify the possible causes. Read more…

VN:F [1.9.1_1087]
Rating: 9.2/10 (5 votes cast)
VN:F [1.9.1_1087]
Rating: +3 (from 3 votes)

Shijil T S troubleshoot ,

Qmail flush stuck queue

December 5th, 2009

Qmail is a wonderful MTA in all sense but its quite easy to have the troubles like your queue getting filled up and you don’t know how to flush the queue. I’ll give you some insights how to do that

If you have already downloaded qmHandle you can remove the mails by issuing the command

qmHandle -S'failure notice'

Here we have deleted all the mails with the subject “failure notice” change it as per your needs, but I don’t think qmHandle can work on a busy system and when the queue is quite large. By default qmHandle has to stop qmail first so make sure that qmailctl is correctly mentioned in the qmHandle script just another tip :)

Our installation of qmail was based on qmailrocks and here is the method we followed

You cannot simply stop qmail by issuing qmailctl stop

you need to stop by the command

svc -d /service/*
svc -d /service/*/log

then kill all qmail process

pgrep |xargs kill -9

now go to qmail queue directory

cd /var/qmail/queue/
find mess -type f -exec rm -rf {} ;
find info -type f -exec rm -rf {} ;
find remote -type f -exec rm -rf {} ;

Now enable qmail service

svc -u /service/*
svc -u /service/*/log

now tail the log files

 tail -f /var/log/qmail/qmail-smtpd/current also tail -f /var/log/qmail/qmail-send/current and see how it goes.
VN:F [1.9.1_1087]
Rating: 9.7/10 (3 votes cast)
VN:F [1.9.1_1087]
Rating: 0 (from 0 votes)

Shijil T S Mailservice, linux

Command-line tips: Understanding Dig

September 24th, 2009

dig is a command-line tool for querying DNS name servers for information about host addresses, mail exchanges, name servers, and related information.

Understanding the default output

The most typical, simplest query is for a single host. By default, however, dig is pretty verbose. You probably don’t need all the information in the default output, but it is probably worth knowing what it is. Below is an annotated query.

This article explains you how to do the data recovery from a crashed windows-plesk server.


$ dig www.sparksupport.com

That is the command-line invocation of dig I used

; <<>> DiG 9.2.3 <<>> www.sparksupport.com

;; global options: printcmd

The opening section of dig’s output tells us a little about itself (version 9.2.3) and the global options that are set (in this case, printcmd). This part of the output can be quelled by using the +nocmd option, but only if it is the very first argument on the command line (even preceeding the host you are querying).


;; Got answer:

;; -&gt;&gt;HEADER&lt;&lt;- opcode: QUERY, status: NOERROR, id: 43071

;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 3, ADDITIONAL: 3

Here, dig tells us some technical details about the answer received from the DNS server. This section of the output can be toggled using the +[no]comments option, but beware that disabling the comments also turns off many section headers.


;; QUESTION SECTION:

;www.sparksupport.com. IN A

In the question section, dig reminds us of our query. The default query is for an Internet address (A). You can turn this output on or off using the +[no]question option.


;; ANSWER SECTION:

www.sparksupport.com. 600 IN A 203.23.184.88

Finally, we get our answer: the address of www.sparksupport.com is 204.152.184.88. I don’t know why you’d ever want to turn off the answer, but you can toggle this section of the output using the +[no]answer option.


;; AUTHORITY SECTION:

sparksupport.com. 2351 IN NS ns1.nis.tc.org.

sparksupport.com. 2351 IN NS ns1.gnac.com.

sparksupport.com. 2351 IN NS ns2.nis.tc.org.

The authority section tells us what DNS servers can provide an authoritative answer to our query. In this example, sparksupport.com has three name servers. You can toggle this section of the output using the +[no]authority option.


;; ADDITIONAL SECTION:

ns1.gnac.com. 171551 IN A 203.23.34.21

ns-int.sparksupport.com. 2351 IN A 211.52.18.65

ns-int.sparksupport.com. 2351 IN AAAA 2001:4f8:0:2::15

The final section of the default output contains statistics about the query; it can be toggled with the +[no]stats option.

Some useful options with dig

dig will let you perform any valid DNS query, the most common of which are A (the IP address), TXT (text annotations), MX (mail exchanges), NS name servers, or the omnibus ANY.


# get the address(es) for yahoo.com

dig yahoo.com A +noall +answer

# get a list of yahoo's mail servers

dig yahoo.com MX +noall +answer

# get a list of DNS servers authoritative for yahoo.com

dig yahoo.com NS +noall +answer

# get all of the above

dig yahoo.com ANY +noall +answer

#Short answer

dig sparksupport.com +short

#To get the TTL values

dig +nocmd sparksupport.com mx +noall +short

#To get a long answer

dig +nocmd sparksupport.com any +multiline +noall +answer

#To reverselookup

dig -x 216.109.112.135 +short

To bulk lookups # do full lookups for a number of hostnames

#dig -f /path/to/host-list.txt

#the same, with more focused output

dig -f /path/to/host-list.txt +noall +answer

Tracing dig's path

dig sparksupport.com +trace

How to interpret TTL value

If you ask your local DNS server for an Internet address, the server figures out where to find an authoritative answer and then asks for it. Once the server receives an answer, it will keep the answer in a local cache so that if you ask for the same address again a short time later, it can give you the answer quickly rather than searching the Internet for it all over again.
When domain administrators configure their DNS records, they decide how long the records should remain in remote caches. This is the TTL number (usually expressed in number of seconds).

When domain administrators configure their DNS records, they decide how long the records should remain in remote caches. This is the TTL number (usually expressed in number of seconds).

For example, as of this writing, the TTL for the MX records for the gmail.com domain is 300 seconds. The gmail.com admins are asking that remote servers cache their MX records for no more than five minutes. So when you first ask for that record set, dig will report a TTL of 300.


$ dig +nocmd gmail.com MX +noall +answer

gmail.com. 300 IN MX 20 gsmtp57.google.com.

gmail.com. 300 IN MX 10 gsmtp171.google.com.

If you ask a few seconds later, you’ll see the TTL number reduced by approximately the number of seconds you waited to ask again.


$ dig +nocmd gmail.com MX +noall +answer

gmail.com. 280 IN MX 10 gsmtp171.google.com.

gmail.com. 280 IN MX 20 gsmtp57.google.com.

If your timing is good, you can catch the record at the very end of its life.


$ dig +nocmd gmail.com MX +noall +answer

gmail.com. 1 IN MX 10 gsmtp171.google.com.

gmail.com. 1 IN MX 20 gsmtp57.google.com.

After that, the DNS server you are querying will “forget” the answer to that question, so the whole cycle will start over again (in this example, at 300 seconds) the next time you perform that query.

VN:F [1.9.1_1087]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.1_1087]
Rating: +1 (from 1 vote)

Shijil T S Articles, linux

Qmail vpopmail transfer

July 31st, 2009

Another challenging task for server admin is to transfer the existing qmail with vpopmail to another server. Copying qmail and vpopmail directory won’t work

Here are the steps you need to keep in mind and follow if you are going to install qmail and vpopmail in the same path

qmail -> /var/qmail
vpopmail -> /home/vpopmail

1) Install qmail and vpopmail as per the instruction in new server using qmailrocks docs
By default the installation of vpopmail will be in /home/vpopmail.

2) Copy the contents of /var/qmail/control and /var/qmail/users to the new server

3) Take the dump of vpopmail database you can view the details of database in the path

cat ~vpopmail/etc/vpopmail.mysql

4) Copy the file in the new server

5) Dump the database

6) rsync the ~vpopmail/domains/ to~vpopmail the new server ~vpopmail/domains/ folder

7) chown vpopmail.vchkpw ~vpopmail -R

8) This step is most important, you should verify the uid of vpopmail and gid of vchkpw and they should be same in the new server too. The file /var/qmail/users/assign will have the details of uid and gid of the old server.

In the second scenario

Old server

qmail -> /var/qmail
vpopmail -> /var/qmail/vpopmail

New server

qmail -> /var/qmail
vpopmail -> /home/vpopmail

Here you need to worry about the path mentioned for the mail accounts in the vpopmail database. Take the dump of the database you can edit the dump using vi and sed as usually it won’t be that big since it contains only information about the mail account and its path not the entire mails. You need to alter the path with the new installation path.

open the dump file with vi editor

:%s/var//qmail//vpopmail//home//vpopmail/g 

Rest of the steps are same as above.

PS: Dont just copy vpopmail to new server it is not going to work, vpop binaries like vuserinfo has the installation path in it and it will give out errors.

VN:F [1.9.1_1087]
Rating: 6.4/10 (5 votes cast)
VN:F [1.9.1_1087]
Rating: 0 (from 0 votes)

Shijil T S Mailservice, linux

uu_upload.pl download prompt

April 29th, 2009

I happen to see this uu_upload.pl download prompt error when installing phpmotion on a subfolder. This is because Apache doesn’t understand this perl file in cgi-bin.

Here is a fix which worked for me

Create a .htaccess file in cgi-bin of the subfolder and add the entry


  Options +ExecCGI
 AddHandler cgi-script .pl  

This error can also happen if you haven’t given the correct path for cgi-bin in uploader_conlib.php file


     $path_to_upload_script      = '/myvideos/cgi-bin/uu_upload.pl';
     $path_to_ini_status_script  = '/myvideos/cgi-bin/uu_ini_status.pl'; 

myvideos replace it with subfolder name.

VN:F [1.9.1_1087]
Rating: 7.0/10 (6 votes cast)
VN:F [1.9.1_1087]
Rating: 0 (from 0 votes)

Shijil T S general, linux

video not converting

April 29th, 2009

Hi

Its common that video files are not getting converted into flv format for streaming. This can be caused due to deprecated option that is still used for mencoder in the scripts of phpmotion and clipshare. All you have to do is to replace the existing options with the latest one in the convertor.php file of these scripts. I will give you a easy approach to accomplish this.

copy paste the sample code to a file named fixscript.sh in your home directory below public_html

find . ( -name "*.php" -or  -name "*.html" ) -exec grep -l "-lavfopts i_certify_that_my_video_stream_does_not_use_b_frames -vop" {} ; |xargs -d 'n'  sed -i -e 's/-lavfopts i_certify_that_my_video_stream_does_not_use_b_frames -vop/ -ofps 24 -vf/g'
find . ( -name "*.php" -or  -name "*.html" ) -exec grep -l "-lavfopts i_certify_that_my_video_stream_does_not_use_b_frames" {} ; |xargs -d 'n'  sed -i -e 's/-lavfopts i_certify_that_my_video_stream_does_not_use_b_frames/ -ofps 24/g' 

chmod it to 755 and execute the script by the command

sh fixscript.sh

if you get sed no input file, there is nothing to worry it means that there is no file that requires the change, it can be a newer version and doesn’t needs it.

there you go !! video conversion should be working now..

VN:F [1.9.1_1087]
Rating: 5.5/10 (2 votes cast)
VN:F [1.9.1_1087]
Rating: 0 (from 0 votes)

Shijil T S general, linux , ,

nginx wordpress permalink

April 29th, 2009

As you are aware nginx don’t read .htaccess rewrite rule nginx has its own rewrite rule. Wordpress has already embraced nginx, wordpress.com works with nginx. There will be problems if you enable permalink option in wordpress nginx. Here is the workaround for it.

You can find permalink option at

Login as wordpress admin
Click on settings -> permalinks
Custom Structure /%postname%/   # This is the one I am using you can opt any other which is given as example in that page.

Now goto wp-content/plugin directory of your wordpress installation

 wget http://downloads.wordpress.org/plugin/nginx-compatibility.0.1.1.zip 

unzip it in the plugin directory
Now go to admin settings and activate this plugin. Permalink should be working now. Mind you if you have installed wordpress on a separate folder your
“location /” in nginx should look something like the below

   location / {
        root /home/user/public_html;      #replace user with actual username
        index index.html index.htm index.php;
if ($request_uri ~* ^.*/.*$) {
     rewrite ^/(w*)/(.*)$ /$1/index.php?q=$2 last;
     break;
}
}

A working example is this blog itself :)

VN:F [1.9.1_1087]
Rating: 6.2/10 (5 votes cast)
VN:F [1.9.1_1087]
Rating: 0 (from 0 votes)

Shijil T S Webservice, linux

startup scripts for nginx

April 28th, 2009

Startup script for nginx that can be used for centos. Save the below code in a file named nginx in /etc/init.d/. Chmod its permission to 755.

Also make sure that you give the correct path for your conf file in NGINX_CONF_FILE and of the nginx binary location.


#!/bin/sh
#
# nginx - this script starts and stops the nginx daemin
#
# chkconfig:   - 85 15
# description:  Nginx is an HTTP(S) server, HTTP(S) reverse
#               proxy and IMAP/POP3 proxy server
# processname: nginx
# config:      /usr/local/nginx/conf/nginx.conf
# pidfile:     /usr/local/nginx/logs/nginx.pid

# Source function library.
. /etc/rc.d/init.d/functions

# Source networking configuration.
. /etc/sysconfig/network

# Check that networking is up.
[ "$NETWORKING" = "no" ] && exit 0

nginx="/usr/local/sbin/nginx"
prog=$(basename $nginx)

NGINX_CONF_FILE="/usr/local/nginx/conf/nginx.conf"

lockfile=/var/lock/subsys/nginx

start() {
    [ -x $nginx ] || exit 5
    [ -f $NGINX_CONF_FILE ] || exit 6
    echo -n $"Starting $prog: "
    daemon $nginx -c $NGINX_CONF_FILE
    retval=$?
    echo
    [ $retval -eq 0 ] && touch $lockfile
    return $retval
}

stop() {
    echo -n $"Stopping $prog: "
    killproc $prog -QUIT
    retval=$?
    echo
    [ $retval -eq 0 ] && rm -f $lockfile
    return $retval
}

restart() {
    configtest || return $?
    stop
    start
}

reload() {
    configtest || return $?
    echo -n $"Reloading $prog: "
    killproc $nginx -HUP
    RETVAL=$?
    echo
}

force_reload() {
    restart
}

configtest() {
  $nginx -t -c $NGINX_CONF_FILE
}

rh_status() {
    status $prog
}

rh_status_q() {
    rh_status >/dev/null 2>&1
}

case "$1" in
    start)
        rh_status_q && exit 0
        $1
        ;;
    stop)
        rh_status_q || exit 0
        $1
        ;;
    restart|configtest)
        $1
        ;;
    reload)
        rh_status_q || exit 7
        $1
        ;;
    force-reload)
        force_reload
        ;;
    status)
        rh_status
        ;;
    condrestart|try-restart)
        rh_status_q || exit 0
            ;;
    *)
        echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload|configtest}"
        exit 2
esac
VN:F [1.9.1_1087]
Rating: 6.7/10 (3 votes cast)
VN:F [1.9.1_1087]
Rating: 0 (from 0 votes)

Shijil T S Webservice, linux ,

kernel 2.6 compile steps

April 28th, 2009

I decided to compile my own kernel for my centos.Here are the steps I have followed and which worked without any errors.

Goto kernel.org for the list of kernel source available

http://kernel.org/pub/linux/kernel/v2.6/ 

Download the one you like to the directory /usr/src

If you are using wget and by chance you got disconnected and if you wanted to continue from the last point you stopped use the command with -c option

wget -c [kernelsourceurl]

You can also apply the patch which can be downloaded from this Index page of kernel source. Applying patch is little bit tricky, another interesting thing I noticed is the revert function if you have already applied the patch, here are the steps

normally patch comes in bzip or gzip format, use the command bunzip2 or gunzip to extract the patch you can also do without extracting it but lets do it straight. First goto the extracted source directory of the kernel

/usr/src/kernel-2.6

patch -p1 < .../patch-2.6  #this ../patch-2.6 is the exact path of patch file 

and in order revert the patch use the command

patch -R -p1 < ../patch-2.6

Now start the steps for compilation


make menuconfig #select the options you want
make
make_modules
make install      #this will ensure that bzImage is copied, initrd image is made and the grub.conf is edited.

In order to boot the new kernel you need to edit default=0 in grub.conf but since you are unsure that it will work or not you can do a workaround to boot your compiled only once, that means in the next boot if the compiled kernel didn’t comes up you again do a reboot and then the previous kernel will be loaded.

Issue following commands

grub --no-floppy

and at the grub prompt

grub>savedefault --default=0 --once

If the new kernel boots up without any error you can edit the grub.conf to make this new kernel as the default one permanently.

VN:F [1.9.1_1087]
Rating: 5.8/10 (6 votes cast)
VN:F [1.9.1_1087]
Rating: 0 (from 0 votes)

Shijil T S general, linux ,