Skip to main content

Posts

How to balance outgoing emails via multiple IP addresses with postfix

Postfix how to balance outgoing emails via multiple IP addresses The solution is depending on postfix`s TCP_TABLES and a perl script. In my example I`m using 7 different IP address to route outgoing mails, make sure you`ve already the IP addresses you are going to use have been configured on your box. First get a recent postfix rpm from here http://ftp.wl0.org/official/2.9/RPMS-rhel5-x86_64/. This one is built for rhel5/centos5 however should be working without much hassle on rhel6/centos5. Install the package: # rpm -Uvh postfix-2.9.1-1.rhel5.x86_64.rpm Make sure its built with tcp tables support: # postconf -m btree cidr environ fail hash internal ldap memcache nis proxy regexp static tcp texthash unix Install the perl module  List::util::WeightedRoundRobin: cpan install /List::util::WeightedRoundRobin/ Create the following perl script and make it executable: vi /etc/postfix/postfix.pl #!/usr/bin/perl -w # author: ...

How to install Litespeed web server on Ubuntu 14.04 (LTS)

LiteSpeed Web Server (LSWS) is a high-performance Apache drop-in replacement. LSWS is the 4th most popular web server on the internet and the #1 commercial web server. Upgrading your web server to LiteSpeed Web Server will improve your performance and lower operating costs. This guide shows you how to install a litespeed webserver on an Ubuntu 14.04 (LTS) server. Before you begin update your system  - # sudo apt-get update && sudo apt-get upgrade   Installation must be performed in a command line terminal. For testing purposes, LiteSpeed Web Server can be installed into a home directory by a non-privileged user. For production use, it should be installed into a system directory. Download latest litespeed package from there website - wget https://www.litespeedtech.com/packages/5.0/lsws-5.0.18-ent-x86_64-linux.tar.gz Decompress the package into a convenient location: tar -xvf  lsws-5.0.18-ent-x86_64-linux.tar.gz get your production lice...

Setup Password authentication for website with apache on ubuntu 14.04

In order to create the file that will store the passwords needed to access our restricted content, we will use a utility called htpasswd. This is found in the apache2-utils package within the Ubuntu repositories. Update the local package cache and install the package by typing this command. We will take this opportunity to also grab the Apache2 server in case it is not yet installed on the server:     sudo apt-get update     sudo apt-get install apache2 apache2-utils   Create the Password File We now have access to the htpasswd command. We can use this to create a password file that Apache can use to authenticate users. We will create a hidden file for this purpose called .htpasswd within our /etc/apache2 configuration directory. The first time we use this utility, we need to add the -c option to create the specified file. We specify a username (sammy in this example) at the end of the command to create a new entry within the file:   ...

AWS Certification RoadMap

Setup AWS Cloudfront

Amazon CloudFront   is used to improve the performance of your website. CloudFront makes your website's files (such as HTML, images, and video) available from data centers around the world (called edge locations ). When a visitor requests a file from your website, the request is automatically redirected to a copy of the file at the nearest edge location, which results in faster download times than if the visitor had requested the content from a data center farther away. This Guide shows you how to setup cloudfront to help you website performance . Cloudfront distribution  - We need to create cloudfront distribution first to make our website available from data centers around the world. Today we will create cloudfront for our website which is hosted in an ec2 instance behind aws elb.  Open the CloudFront console at https://console.aws.amazon.com/cloudfront/    Click on Create Distribution. Select a delivery met...

LAMP on Ubuntu

LAMP Configuration on Ubuntu A LAMP (Linux, Apache, MySQL, PHP) stack is a common web stack used for hosting web content. This guide shows you how to install a LAMP stack on an Ubuntu 14.04 (LTS) server. Before you begin update your system  - # sudo apt-get update && sudo apt-get upgrade   Apache Install and Configure sudo apt-get install apache2 Configure Virtual Hosts There are several different ways to set up virtual hosts; however, below is the recommended method. By default, Apache listens on all IP addresses available to it. Within the /etc/apache2/sites-available/ directory, create a configuration file for your website, example.com.conf , replacing example.com with your own domain information:   vim /etc/apache2/sites-available/example.com.conf         <VirtualHost *:80>    ServerAdmin webmaster@example.com ServerName example.com ServerAl...

How to delete queue of PowerMTA

How to delete  queue of PowerMTA To delete / clear queue of PowerMTA: Use  pmta delete   Syntax : pmta delete [--dsn] [--queue=domain[/vmta] [--orig=addr] [--rcpt=addr] [--jobId=id] [--envId=id] [--accounting] Description :                  Deletes recipients from the queue. Although "--queue"'s default is */*, the command requires either --queue or --jobId to be entered explicitly, so that an accidental "pmta delete" command doesn't delete the entire queue. Messages are marked in the accounting file as deleted by administrator. Options : --dsn specifies that a DSN report should be sent. Using this option may slow the deletion process. No entry is written to the accounting file unless the --accounting flag is used as well. --accounting specifies that deletion information should be written to the accounting file. Using this option may slow...