Archive for the ‘Uncategorized’ Category

Domain Name Addons

Friday, May 29th, 2009

At the minute, i am working on Domain name addons, things like Dynamic DNS with domain names, Domain checking by SMS, Domain checking by E-Mail, and many other similar tools, Although much of the planning is done, there is still time for requests, If you are a customer at EasyWebDNS or plan to become a customer, or simply a domain buyer, Please let me know what features you would like to see, and i will work on adding them.

When i add domain stuff, i will be writing about them along with notes and other things on easy web dns, So as a revision here are the planned features

1- Nameservers that support Dynamic Updates
2- Checking domain availability by SMS
3- Checking domain availability by E-Mail
4- Wap Version of the website
5- Bind Tutorials
6- Load balancing and other tricks using the DNS system
7- Domain Availability Checking PHP script, free for all (at Domain Reseller Direct)
8- Allowing Domain Reseller Direct customers to allow there customers to check availability by SMS and E-Mail, a white label system

Any suggestions ?

Awaiting your responce

Cheers

ClueBringer for POSTFIX Setup

Tuesday, May 5th, 2009

Blue: ClueBringer Install File
RED: Change

ClueBringer POLICYD is an addon for postfix that limits the amount of mail shared web hosting users can send per hour.

Integrating ClueBringer for PostFix has not been the easiest of tasks especially when a complicated setup exists, Here i will try to make sense of the entire program, POLICYD cluebringer is written in Phython that i know very little about, i will try to make sense of the code with my C knowledge.

To begin with, i will go about this in the same order the installation file requieres.

1. Setup MySQL (or whichever database you plan to use)

a. In database/ run…
$ for i in core.tsql access_control.tsql quotas.tsql amavis.tsql checkhelo.tsql checkspf.tsql greylisting.tsql
$ do
$ ./convert-tsql mysql $i
$ done > policyd.mysql

This will build policyd.mysql, be sure to ALWAYS load core.tsql first, you only really need the
schema for the modules you plan to use, no harm in adding all of them though.

b. Load policyd.mysql into MySQL
$ mysql -u root -p policyd < policyd.mysql

Done with the trivial creation of database and users, converting tsql files to a mysql file and importing it, and having a database ready for cluebringer.

2. Put cluebringer.conf in your /etc directory and adjust cluebringer.conf with your MySQL database details

Let us take a look at the cluebringer.conf file, Other thatn copeying it to the /etc/ directory i will also raise the log level to 4 for debugging

log_level=4

And point the cluebringer log file to /var/log/cbpolicyd.log

log_file=/var/log/cbpolicyd.log

I will also fix the database credentials to use MySQL, and create a file for the log that cluebringer policyd can write to

3. Copy the cbp/ directory into /usr/local/lib/policyd-2.0/
mkdir /usr/local/lib/policyd-2.0
cp -r cbp /usr/local/lib/policyd-2.0/

Taking a look inside, I found a bunch of interesting files .PM, looked inside, nothing to do there.

4. Copy cbpolicyd and cbpadmin into /usr/local/bin
cp cbpolicyd cbpadmin /usr/local/bin/

Those are 2 interesting PERL files, they start with

use lib(‘/usr/local/lib/policyd-2.0′,’/usr/lib/policyd-2.0′);

but there is no /usr/lib/policyd-2.0, No need to reach for the good old camel book yet, it turns out that adding this (Non existing location) to the include directory of PERL is not really a big deal.
5. Install the webui/* into your apache directory, check out includes/config.php and adjust the MySQL server details.

No rocket science there.

So, up to this minute, no change has been done to the system, You see everything we have done up to this minute is simply adding files and configuring them to wait for some other program to execute them, No change has been done to the system up to now.

The first change that will be done to the system is when we approach POSTFIX to add POLICYD to its list of consultants.

Although we will not be asking it to do it directly (We will ask amavisd-new to do it), we do need to add some rules to postfix, according to the installation file.

6. Setup Postfix to use cbpolicyd…
Add the following Postfix config…
check_policy_service inet:127.0.0.1:10031
in BOTH smtpd_recipient_restrictions and smtpd_end_of_data_restrictions.

In short, they want me to edit /etc/postfix/main.cf , If this is the first time you hear of this file, Or if you don’t know what the risk of being an open relay is, or if you don’t know what an open relay is, or if you know very little about email and the internet in general, and if you don’t know what SPF means, or if you don’t know how to write to this file, this tutorial is not yet for you, you need to start with a postfix book not here, You have been warned.
7. Copy your amavisd from /usr/sbin/amavisd and patch it with contrib/amavisd-new-2.5.3_policyd-200802070918.patch like this…
$ patch < contrib/amavisd-new-2.5.3_policyd-200802070918.patch
After this change your initscripts to start the patched amavisd.

AMAVISD-NEW, The patch that comes with cluebringer does the following to the amavisd-new file that is written in PERL.

———————————-

Ads 2 parts to the script

1- First it ads (The part in RED)

sub new { my($class,$conn,$msginfo) = @_; undef }
sub checks { my($self,$conn,$msginfo) = @_; undef }
sub before_send { my($self,$conn,$msginfo) = @_; undef }
sub after_send { my($self,$conn,$msginfo) = @_; undef }
sub mail_done { my($self,$conn,$msginfo) = @_; undef }
sub process_policy { my($self,$conn,$msginfo,$pbn) = @_; return $pbn }

2- Then it ads a part (In RED)

my($cnt_local) = 0; my($cnt_remote) = 0;
for my $r (@{$msginfo->per_recip_data}) {
my($recip) = $r->recip_addr;
my($is_local) = lookup(0,$recip, @{ca(‘local_domains_maps’)});
$is_local ? $cnt_local++ : $cnt_remote++;
$r->recip_is_local($is_local);
if (!$r->bypass_banned_checks) {
my($bypassed_b) = lookup(0,$recip, @{ca(‘bypass_banned_checks_maps’)});
$r->bypass_banned_checks($bypassed_b);
}
if (!$r->bypass_spam_checks) {
my($bypassed_s) = lookup(0,$recip, @{ca(‘bypass_spam_checks_maps’)});
$r->bypass_spam_checks($bypassed_s);
}
}

# Check if we need to do last minute policy changes
if (ref $custom_object) {
$which_section = “custom-process_policy”;
eval {
my $new_policy_bank = $custom_object->process_policy($conn,$msginfo,\%current_policy_bank); 1;
%current_policy_bank = %{ $new_policy_bank };
} or do {
my($eval_stat) = $@ ne ” ? $@ : “errno=$!”; chomp $eval_stat;
do_log(-1,”custom process_policy error: %s”, $eval_stat);
};
section_time($which_section);
}

———————————————————————————————–

The initscript that does the amavisd-new initialisations is /etc/init.d/amavisd
8. Copy amavisd-policyd.pm where you see fit, and add this configuration line to your amavisd.conf file…
include_config_files(‘/path/to/amavisd-policyd.pm’);

9. Edit the top of amavisd-policyd.pm and change …
use lib(‘/root/cluebringer-trunk’); # to point to the directory which contains cbp/

my $DB_dsn = “DBI:SQLite:dbname=/tmp/cluebringer.sqlite”; # to point to your MySQL DB

10. Fire everything up and browse to the web gui to configure

moving the blog

Monday, May 4th, 2009

So, This blog is moving to a much faster host !

Not exactly but here is how it is.

I have setup a server that is specialised in WordPress, Joomla, and other very popular PHP scripts

The morale (And what’s new) abou this is the speed, i will tell you about it in a minute

After making a server in over 2 days nonstop work, And after securing it from spammers, hackers, and other annoying people, i modified the WordPress system to use non-trivial software on the server.

Don’t get me wrong, WordPress is one fine software and so is Joomla, but they have been written to work on as many systems as possible, And not tailored to a certain system and it’s resources.

So, i will be selling Lightning Fast WordPress setup, With modified WordPress files to run on the system !

The system is expected to go live in 3 to 5 days, and will offer a free 1 month no credit card requiered trial, For those who opt to buy the service right away, the trial month is added to there account as a free month !

So, to top things off, A live chat person will actually set things up for the clients ! This is not just support, this is a managed blog !

The offering is a 5GB space, on an 8 Xeon Processor server (Two Quad Xeon Processors) with 8GBs of ram serving WordPress, this is nothing like our excellent PLESK offering, this is something you can find nowhere on the internet !

I will keep you updated on how things go as soon as we finish testing the server, Some very uncommon techniques are used to speed up your wordpress blog on this server, And for the same price as all our hosting level1 plans ($2.8/Mo), 5GB space and 100 email mailboxes, and a bunch of other nice stuff

Users on this server will not be restricted in any way, this is simply value added with no compromise for bloggers who want faster blogs (For both admin pannel and blog).

The only restriction to users who have not yet opted to use the server is email limit, this is because spammers usually hit on freee hosting, and we don’t want this server that we have spent so much time setting up blacklisted or sending spam to anyone, This restriction is removed as soon as the user is a paying customer !

Horde webmail : Content Encoding Error (content_encoding_error)

Saturday, May 2nd, 2009

So, users were getting

Content Encoding Error (content_encoding_error)

Server response could not be decoded using encoding type returned by server.
This is typically caused by a Web Web site hosting presenting a content encoding header of one type, and then encoding the data differently.

For assistance, contact Customer Support.

And they did

Turned out horde comression for some encodings has issues, Solution was editing C:\Inetpub\vhosts\webmail\horde\config\conf.php, and change $conf['compress_pages'] to false (Turn off compression)

Everything works fine for now, If i intend to host any mail on a Windows server that is.

Changing GoDaddy secureserver PLESK server hostname

Saturday, May 2nd, 2009

So, changing the hostname on My CentOS Virtual Machine keeps reverting back to ip-xxx-xxx-xxx-xxx.ip.secureserver.net, Not exactly what i want, especially when there is a 1,000 Emails mail quota for all godaddy VPS, i don’t really use this particular box for anything important, But i do need to have things right on every single box i run, With 10 Servers and 2 Virtual Dedicated servers, i really can use every peice of related information i can use.

So, the PLESK over virtuzzo has a license key, and i very much doubt that it is related to the hostname, but i will keep you posted once i finish the following steps

1- Adding the domain name (Sub domain as domain) to PLESK so that mail routs internally without going to godaddy once things change, So servername.powerdonkey.com domain gets added to PLESK.

Changing in the following places

/etc/hosts

/etc/sysconfig/network

/etc/network/interfaces
Then /etc/init.d/networking restart
/var/qmail/control/me
/etc/httpd/conf/httpd.include
hostname servername.powerdonkey.com
/etc/hostname

/etc/init.d/hostname.sh start

For testing

hostname
hostname -f

In the psa mysql database , in misc table (FullHostName, sso_relay, sso_server, sso_server_user_url), While the first updates from within CP, the other two do not !

Now, what about that… will it requier a full server reboot, or just

/etc/init.d/psa stopall
/etc/init.d/psa stop
/etc/init.d/psa start

IIS application pool from within PLESK

Monday, April 27th, 2009

The three options for this on a PLESK server running plesk 9.01 and IIS6 is as follows

Assignment and placement policy

We will choseto always have everyone in the shared application pool, CPU limit will come after some investigation