Friday, September 5, 2008

Qmail behind Postfix on debian etch #3 (Squirrelmail)

In this session we will write step by step installing squirrelmail web interface on debian, you need compiling courier-imap from source in debian cause in debian package courier-imap configure without vchkpw authentication support. This is my step by step (i got from )

imap server
# mkdir -p /usr/src/deb-source; cd  /usr/src/deb-source
# apt-get install dpkg-dev
# apt-get source courier-authlib
# apt-get build-dep courier-authlib
# cd courier-authlib-0.58/debian
# vim control
Package: courier-authlib-vchkpw 
Architecture: any 
Depends: ${shlibs:Depends}, courier-authlib (>= ${RELUP}) 
Description: External authentication support for Vpopmail. 
  This package contains vpopmail support for courier-authlib.
# echo "/usr/lib/courier-authlib/libauthvchkpw.so*" > courier-authlib-vchkpw.files
# vim rules change 
--without-authvchkpw to --with-authvchkpw
# cd ..
# dpkg -i courier-authlib_0.58-4_i386.deb
# dpkg -i courier-authlib-vchkpw_0.58-4_i386.deb
# apt-get install courier-imap
# vim /etc/courier/authdaemonrc change 
authmodulelist="authpam" to authmodulelist="authvchkpw" and 
authmodulelistorig="authuserdb authpam authpgsql authldap authmysql authcustom authvchkpw authpipe"
 to 
authmodulelist="authvchkpw"
# /etc/init.d/courier-imap stop
# /etc/init.d/courier-authdaemon stop
# /etc/init.d/courier-authdaemon start
# /ect/init.d/courier-imap start
# telnet localhost 143
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
* OK [CAPABILITY IMAP4rev1 UIDPLUS CHILDREN NAMESPACE THREAD=ORDEREDSUBJECT THREAD=REFERENCES SORT QUOTA IDLE ACL ACL2=UNION] Courier-IMAP ready. Copyright 1998-2005 Double Precision, Inc.  See COPYING for distribution information.
0 login postmaster@yourdomain.com your_password
0 OK LOGIN Ok.
0 logout

Squirrelmail
# apt-get install squirrelmail
# ln -s /usr/share/squirrelmail/ /var/www/mail

now try to access http://yourdmain/mail, and try to login with postmaster@yourdomain.com. I hope is no problem there, because i haven't.  Now we will to install squirrelmail change password plugin, you can download this plugin in here and 

# tar zxvf change_pass-2.7a-1.4.x.tar.gz -C /usr/share/squirrelmail/plugins/
# cd /usr/share/squirrelmail/
# config/conf.pl

konfigure your plugin
# apt-get install courierpassd -> you will need this for change password via squirrelmail
# vim /etc/inetd.conf add this line
poppassd        stream  tcp     nowait  root    /usr/sbin/courierpassd  poppassd
#  ps ax|grep -i inetd
 2258 ?        Ss     0:00 /usr/sbin/inetd
13338 pts/0    R+     0:00 grep -i inetd
# kill -HUP 2258
# netstat -an |grep LISTEN |grep 106
tcp        0      0 0.0.0.0:106             0.0.0.0:*               LISTEN

and try again to change your password via squirrelmail, now should be ok. For testing, logout from squirrelmail and login with your password.

thx 

Thursday, September 4, 2008

Qmail behind Postfix on debian etch #2

This day i will continue installing software for support qmail work more powerfull, begin with ezmlm and ezmlm-idx, continue with qmail autoresponder, Vpopmail, Vqadmin, maildrop and close with installing qmailadmin. Sure in here i will supporting qmailadmin quota user.

ezmlm and ezmlm-idx
# cd /root/qmailrocks
# tar zxvf ezmlm-0.53-idx-0.41.tar.gz
# cd ezmlm-0.53-idx-0.41
# make && make setup

qmail autoresponder
# cd /root/qmailrocks
# tar zxvf autorespond-2.0.5.tar.gz
# cd autorespond-2.0.5

vpopmail
# mkdir -p ~vpopmail/etc
# chown vpopmail:vchkpw ~vpopmail/etc
# echo "localhost|0|vpopmailuser|password|vpopmail" > ~vpopmail/etc/vpopmail.mysql
# chown vpopmail:vchkpw ~vpopmail/etc/vpopmail.mysql
# chmod 640 ~vpopmail/etc/vpopmail.mysql
# mysql -u root -p 
GRANT ALL PRIVILEGES ON vpopmail.* TO vpopmailuser@localhost IDENTIFIED BY 'your_vpopmailuser_mysql_password';
FLUSH PRIVILEGES;
# cd /root/qmailrocks
# tar zxvf vpopmail-5.4.13.tar.gz
# cd vpopmail-5.4.13
# ./configure --enable-logging=p --enable-auth-module=mysql --disable-passwd --enable-clear-passwd --disable-many-domains --enable-auth-logging --enable-sql-logging --enable-valias --disable-mysql-limits
# make && make install-strip
# chown -R vpopmail.vchkpw /home/vpopmail

Vqadmin
# cd /root/qmailrocks
# tar zxvf vqadmin-2.3.6.tar.gz
# cd vqadmin-2.3.6
# ./configure --enable-cgibindir=/var/www/cgi-bin --enable-htmldir=/var/www
# make && make install-strip
configure apache webserver 
# vim /etc/apache2/sites-enabled/000-default 
put this syntax
         ScriptAlias /cgi-bin/ /var/www/cgi-bin/
        <Directory "/var/www/cgi-bin/vqadmin">
                deny from all
                Options ExecCGI
                AllowOverride AuthConfig
                Order deny,allow
        </Directory$gt;

        <Directory "/var/www/cgi-bin">
             AllowOverride AuthConfig
             Options ExecCGI -MultiViews +SymLinksIfOwnerMatch
             Order deny,allow
             Deny from all
             Allow from all
        </Directory>

# cd /var/www/cgi-bin/vqadmin/
# vim .htaccess
put this text
AuthType Basic 
AuthUserFile /usr/local/apache/conf/vqadmin.passwd 
AuthName admin 
require valid-user 
satisfy any
# chown -R www-data .htaccess
# htpasswd -bc /etc/apache2/vqadmin.passwd admin [your_vqadmin_password]
# chmod 644 /etc/apache2/vqadmin.passwd
# apache2ctl stop; apache2ctl start
now test with accessing http://yourdomain/cgi-bin/vqadmin.cgi and you will get prompt that need input a username and password, after authentication u will get page vqadmin administration.

maildir for qmail quota
# cd /root/qmailrocks
# tar zxvf maildrop-1.6.3.tar.gz
# cd maildrop-1.6.3
# ./configure --prefix=/usr/local --exec-prefix=/usr/local --enable-maildrop-uid=root --enable-maildrop-gid=vchkpw --enable-maildirquota
# make && make install-strip && make install-man

qmailadmin
# cd /root/qmailrocks
# tar zxvf qmailadmin-1.2.9.tar.gz
# cd qmailadmin-1.2.9
# ./configure --enable-cgibindir=/var/www/cgi-bin --enable-htmldir=/var/www/cgi-bin --enable-modify-quota
# make && make install-strip

until this, everything what we need to make your mail server backend work.

thx

Wednesday, September 3, 2008

Google Chrome browser

Hi all, 
  2 hours ago i seen interesting article at andrisetiawan blog, it's about Google Chrome browser. So i go to Google chrome site and download and try it. After finishing install and run it, 'WOW' just that i can say for this Google Chrome, it's verry slightly, simple, haven't button except for Backward, Forward, Refresh Bookmark, Configuration current site and Configuration Chrome button. 
From Blogs

Google Chrome use the same engine with Firefox, this i saw when test it to open my phpinfo page from there we can detect the engine.  Both use Gecko engine.

From Blogs

From Blogs

Sure this browser still need repair and plugin for make it more Fantastic, i found some problem when using Google Chrome:
  • No WebDeveloper Tool (like firebug on Firefox)
  • No Status bar when we want click a link
  • Problem when access Engenius wireless Access Point
I hope in future, they will supporting what i need and i suggest you to surf the site http:\\www.google.com\chrome for get more info

thx

Tuesday, September 2, 2008

Qmail behind Postfix on debian etch #1

I have been build mail server using qmail but i got a problem for filtering message, so i put Postfix to protect this mail server. Some article where i found just use qmail and postfix stand for different machine/pc, but here i will try explain to use in the same machine/pc, FYI: i use debian distribution and use qmailrocks for install qmail. In my system i use some partition for maintenance:
  • / --> 2 GB
  • Swap --> 1 GB
  • /var --> 4 GB
  • /home --> 66.2 GB
u can use another partition compisition. I install some other package where needed by qmail (i download it from kambing package repro), this is my step by step:
# apt-get install apache2
# apt-get install mysql-server-5.0
# apt-get install php5
# vim /etc/php5/apache2/php.ini
;extension=mysql.so to extension=mysql.so
# echo "" > /var/www/apache2-default/info.php
# apache2ctl stop; apache2ctl start

Now we can test this apache2-php5-mysql_server5 work well in our system using access info.php file from browser (http://you-server-ip-address/apache2-default/info.php), if in here you see something that mean php5 supporting to mysql, so the server is work well. We still need another package:
# apt-get install perl
# apt-get install gcc
# apt-get install openssl
# apt-get install libssl-dev
# apt-get install patchutils
# apt-get install make
# apt-get install libmysqlclient15-dev
# apt-get install g++

After this we are ready to install qmail, first we must download qmailrocks source from here.
# wget http://www.qmailrocks.org/downloads/qmailrocks.tar.gz
# tar zxvf qmailrocks.tar.gz
# pwd
/root
# vim qmailrocks/scripts/install/qmr_install_linux-s1.script and replace
/downloads/ with /root/
# qmailrocks/scripts/install/qmr_install_linux-s1.script
#vim qmailrocks/scripts/util/qmail_big_patches.script and replace
/downloads/ with /root/
# qmailrocks/scripts/util/qmail_big_patches.script
# cd /usr/src/qmail/qmail-1.03/
# make man && make setup check
# ./config-fast fqdn_hostname (exp: mail.domain.com)
# make cert and follow the instruction
# chown -R vpopmail:qmail /var/qmail/control/clientcert.pem /var/qmail/control/servercert.pem
# cd /usr/src/qmail/ucspi-tcp-0.88/
# patch < /root/qmailrocks/patches/ucspi-tcp-0.88.errno.patch
# make && make setup check
# cd /package/admin/daemontools-0.76
# cd src/
# patch < /root/qmailrocks/patches/daemontools-0.76.errno.patch
# cd ..
# package/install
# ps aux for see qmail service running well.

Qmail installation is done, next we will some supporting software for qmail

thx

Monday, September 1, 2008

courierpassd on debian

This my little experience when want to install squirrelmail ch_pass plugin in debian with qmail mail server.
After following installation instruction qmail on debian distribution we got some problem for changing password email from user web interface, that time we use squirrelmail interface. Passes until 2 hours to found out which change password plugin match with our system, but no one is exactly nice fot us, so we pick a one plugin and do more reading.... :D (we pick ch_pass plugin)
Downloading ch_pass plugin from here and extract this plugin at /var/www/squirrelmail/plugins ditectory (in my debian system) and now
#/var/www/squirrelmail/config/conf.pl
and activate the ch_pass plugin. Now we need installing courierpassd package for supporting ch_pass plugin:
#apt-get install courierpassd
# vim /etc/inetd.conf inserting this line
courierpassd stream tcp nowait root /usr/sbin/tcpd /usr/sbin/courierpassd -s imap
#vim /etc/services change line
poppassd 106/tcp # Eudora
poppassd 106/udp
to
courierpassd 106/tcp # Eudora
courierpassd 106/udp

# ps ax |grep -i inetd| grep '?'
32548 ? Ss 0:00 /usr/sbin/inetd
# kill -9 32548; /usr/sbin/inetd


And all done, now we can try it
# telnet localhost 106
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
200 courierpassd v1.1.2 hello, who are you?
user username@domain.com
200 Your password please.
pass youroldpassword
200 Your new password please.
newpass yournewpassword
200 Password changed, thank-you.
quit
200 Bye.
Connection closed by foreign host.


This show us if our courierpassd insatallation is ok.

thx

Kohanaphp first touch

After a year using CodeIgniter php framework, two weak ago i found the other swift and lightweight framework kohanaphp. This framework was born from CodeIgniter forum with name bluefame before change the name to kohanaphp, CodeIgniter user would be familiar too with this framework concept, except the code it use php5 strict.
This is my little experiment using kohanaphp, so what we need to using this framework absolutely Webserver support Php5 (ex: Apache). Fisrt i want to use this framework just for one location, this is my step by step (FYI i use WAMP server) :
  1. download kohanaphp from http://kohanaphp.com
  2. extract kohanaphp to your web server directory (C:\wamp\www\ so become C:\wamp\www\kohanaphp)
  3. edit C:\wamp\www\kohanaphp\application\config\config.php
    $config['site_domain'] = '/kohanaphp/';
    to
    $config['site_domain'] = 'localhost/kohanaphp/';
  4. browse to address http://localhost/kohanaphp/
From here you must get the Welcome page from kohanaphp, it's done. Now we will try to use one kohanaphp system for more than 3 site (i will use location directory for kohanaphp1, kohanaphp2, kohanaphp3). This my step by step:
  1. extract kohanaphp to your directory (c:\wamp\www\ so become c:\wamp\www\kohanaphp)
  2. move c:\wamp\www\kohanaphp\system to c:\kohana\system
  3. copy c:\wamp\www\kohanaphp to c:\wamp\www\kohanaphp1
  4. copy c:\wamp\www\kohanaphp to c:\wamp\www\kohanaphp2
  5. copy c:\wamp\www\kohanaphp to c:\wamp\www\kohanaphp3
  6. edit c:\wamp\www\kohanaphp\index.php, c:\wamp\www\kohanaphp1\index.php, c:\wamp\www\kohanaphp2\index.php, c:\wamp\www\kohanaphp3\index.php
    $kohana_system = 'system'
    to
    $kohana_system = 'c:\kohana\system'
  7. edit file c:\wamp\www\kohanaphpx\application\config\config.php, x can be '', 1, 2, 3
    $config['site_domain'] = '/kohana/';
    to
    $config['site_domain'] = 'localhost/kohanax/';
  8. now browse your link http://localhost/kohanaphpx, and it's done
  9. now we have 4 kohanaphp apllication using 1 kohanaphp system
thx