Friday 30 April 2010

Setup linux server to alert you on login

To improve the security of a Linux server, especially a web server, which is exposed to the Internet and possible worldwide hackers, it’s best to enable the server to automatically send a notification email to predefined email address anytime someone logs in as root to the host. To configure the automatic email alert notification to a default email address on each incident of root log on on the server, use the following guide.
1. Login to the server via SSH using as root ID.
2. Ensure that you’re at home directory of root. Then open up the .bash_profile for editing using pico or vi by typing one of the following commands at command shell line:

Using Pico# pico .bash_profile
Using Nano# nano .bash_profile
Using Vi# vi .bash_profile

3. Scroll down to the end of the file and add the following line:

“echo ‘ALERT – echo ‘ALERT – Root Shell Access (YourserverName) :’ `date` `who` | mail -s “Alert: Root Access from `who | cut -d”(” -f2 | cut -d”)” -f1`” user@example.com” (Without the quotes)



Now logout and login again as root, you should receive an email alert at your inbox. This works on most popular flavor of Linux such as RedHat, CentOS, Ubuntu, FreeBSD , etc.


4. Replace user@email.com with the actual email account address that you want to the root access alert notification been sent to. Note that you can change the text contains in the email alert too. You will want to change the (YourserverName) to your actual server name or hostname.

Wednesday 28 April 2010

Looking for a free server load monitoring utility which will email you about the load on the server on a frequent interval ?

CRONJOB is the Answer …..

create a cronjob from the uptime command if thats all you need.

crontab -e
* */1 * * * (cd /usr/bin; ./uptime 2>&1 | mail -s “System load” your.email.com)

The above example will email the load and uptime to you every hour. “System load” is the email subject and of course change your email to your real address.

You can mail yourself a report the same way with any command you like such as netstat, ps and top or anything you like.

Monday 26 April 2010

Server Performance Tips and Tricks


Introduction

If you are sending email to more than 1,000 recipients at a time, you will need to make your server environment perfect to avoid any possible problems and minimize the change getting black listed across spam filters.
In this chapter, we summarized steps you need to follow and complete in order to run 100% legitimate email marketing campaigns.
We did our best to explain every step and process with plain English, however some steps may require mid-advanced level of server experience. Please consult your server administrator for any questions.
Here's a basic chart which displays how email delivery works:
Email Rendering and Delivery Work Flow
Email marketing and mass email delivery performance depend on your server configuration and several other factors:
  • Enough physical server specifications (RAM, hard disk, CPU, bandwidth, etc.)
  • Properly configured and fine tuned MySQL databse
  • Properly configured web server
  • Properly configured and fine tuned MTA (Mail Transfer Agent)
  • Properly configured MTA IP address(es) (reverse DNS, clean and warmed-up IP addresses)
  • Email authentication (SPF, SenderID, DKIM, DomainKeys)

Server Hardware

Your server plays a big role on sending performance and stability. There are different server and hosting types;
  • Shared Hosting
  • Grid Hosting
  • VPS Hosting
  • Dedicated/Managed Hosting
  • Cloud Hosting
  • Local Hosting
In theory, Oempro can be installed to any hosting types listed hosting types, however, if you are planning to perform professional email marketing, selecting the right hosting type for your server plays a big role on the performance and stability.

Shared Hosting

If you prefer shared hosting, your mail server will be sending emails through the shared IP address which your hosting company offers. This is the cheapest hosting method but it has many disadvantages such as;
  • You will be using a shared IP address which means if any other hosting owner on the same server makes spam mailing, you will also be affected from black lists too.
  • Since you will be sending through shared IP address, your delivery reputation will decrease a lot and it will depend on other hosting owners on the same server.
  • Your shared hosting company will probably apply sending limit (ex: 1,000 emails per hour)
  • Your shared hosting company will be monitoring your emailing activity and probably terminate your account after a certain amount of emailing volume
  • You will have very limited server resources which will limit your sending activity
If you have limited budget and shared hosting is the only choice for Oempro hosting, we strongly recommend you to use a third party SMTP relaying service such as octeth.smtp.com. Your mailing activity will not be affected from your shared hosting company (except server resources)

Grid Hosting

Based on Wikipedia, Grid computing (or the use of computational grids) is the combination of computer resources from multiple administrative domains applied to a common task, usually to a scientific, technical or business problem that requires a great number of computer processing cycles or the need to process large amounts of data.
Grid hosting is more flexible and powerful compared to shared hosting, however it's not enough for powerful email marketing, especially when you are sending to big lists.

VPS Hosting

If you don't have enough budget for getting dedicated servers, VPS is the right choice for you. It's powerful, scalable and almost dedicated. You will have dedicated IP addresses and even you are using shared server resources, you will have dedicated resources.
VPS is almost dedicated, you will not have the same hardware flexibility but it's the right choice for limited budget owners.

Dedicated/Managed Hosting

This is the right choice for professional email marketers and big list senders. You will have fully dedicated server resources, several dedicated IP addresses and scalable hardware.
Getting a dedicated server from a reputable hosting company is important. Customer service quality and clean IP address available are important factors on choosing the right dedicated server hosting company.

Local Hosting

We don't recommend hosting Oempro and your MTA on your computer at the office or home. Sending emails through ADSL or similar internet connection IP addresses will cause your email delivery rate to get minimized.

MySQL Database Server

All your data (recipients, lists, campaigns, statistics, etc.) are stored on your MySQL database. There will be huge MySQL transaction volume during email delivery and campaign statistics tracking. Your MySQL database should be configured properly in order to handle the load.
Standard MySQL database server configuration will still be able to handle the load until a certain level. But if you start having connection problems to your server, it's the time to scale and optimize your MySQL database server.

Web Server

Web server serves Oempro components (statistics tracking and other HTTP processes) to your recipients. You should configure it considering the load you will have upon email campaign delivery. If you send an email campaign to 100,000 recipients, this kind of email delivery will cause at least1;
  • [number of opens] x [email open tracking image size] HTTP request
  • [number of clicks] x [link click tracking] HTTP request

Oempro

Configure your Oempro properly based on your server environment to avoid any possible email delivery problems. Please refer to "Setting Up Your Oempro" chapter for more details.

MTA (Mail Transfer Agent)

This is the server component which sets the email delivery success and delivery reputation. You must configure your MTA properly to make it ready for email marketing.
Using an MTA with a standard configuration for mass email delivery will not work on big lists. You will start having delivery problems, black listing issues and several other unexpected problems in time.
MTA is the heart of your email marketing success. A properly configured MTA will maximize your email delivery success and minimize the chance of getting black listed.

Email Authentication

Email authentication is the most important factor which affects your inbox delivery rate. If you have not done email authentication properly for sender domains, your emails will not arrive in inbox mostly. All major email services such as Hotmail, Yahoo!, Gmail, AOL checks for properly set email authentication for incoming emails.
There are four email authentication methods and we strong recommend you to set all of these methods:
Setting these authentication methods are done on your sender domain DNS zones as well as on your MTA (mail server) side.
Setting up authentication methods has no relationship with Oempro. You need to set these on your domain DNS zones as well as mail server. You may request assistance from your server administrator.

Sender Reputation

Sender reputation is another important factor on your inbox delivery performance. The sender reputation is calculated for your sender domains based on many factors such as the bounce volume, spam complaint volume, delivery frequency, etc.
You can check your sender reputation by using ReturnPath's free tool.

Useful Links

  • PreviewMyEmail.com
    This service takes screen shots of your email on several email applications and shows you within a few minutes. Also provides you detailed information about your inbox delivery rate. Comes with an API option.
  • SenderScore.org
    Monitor your SenderScore by entering your MTA IP address(es)
  • SPF
    Important information regarding SPF email authentication method
  • SenderID
    Important information about Microsoft's SenderID email authentication method
  • DKIM
    Important information about Yahoo's email authentication method
  • DomainKeys
    Important information about DomainKeys email authentication method

How To Deal With Google’s Hack Attack Warning




Google recently announced of an update in their search results where the sites believed to be hacked, will have the hack alert message ‘This site may be compromised’ similar to the warning for malware ‘this site may harm your computer’.

As always Google have kept how they will track the websites believed to be hacked, under wraps which is not a good news for the webmasters as if their sites are detected to be false positive by Google then it could lead to serious loss of business and tarnish the reputation of the organization.

The whole of the internet trusts Google, but situations may arise which might affect Google and webmasters relations even if there is a little flaw in Google’s algorithm. If the site is reported to be hacked by Google , it will try to contact the webmaster and also encourage the user to inform, but the webmaster can just ask Google to review their sites .There are also no details on how long the review will take.

So all expect Google to have a sophisticated algorithm and the webmaster would not want to see their sites in Google with the hack alert message for just a sudden redesign of their site.


Thursday 15 April 2010

Change or Set the MySQL Root password

For every database, you should set the root or sa passwords to something other than the default, unless you want to get hacked. For mysql, the system administrator user is called root. You will use the mysqladmin utility from a command line to set the new password. Notice that there are two commands to be run.

Syntax:
mysqladmin -u root password “newpassword”
mysqladmin -u root -h host_name password “newpassword”

Example:
mysqladmin -u root password ws8dr8as3
mysqladmin -u root -h localhost password ws8dr8as3

You will also want to restart the database server after running this command
sudo /etc/init.d/mysql restart