Aug 08

What is openssl php extension ?

Php module that  uses the functions of » OpenSSL for generation and verification of signatures and for sealing (encrypting) and opening (decrypting) data.

System requirement

  • – Apache2
  • – Php
  • – OpenSSL

Setup

In this tutorial i have already installed Apache2 and Php 5.2.5 . I just need to add OpenSSL module on my php i also decided to upgrade my php from 5.2.5 to 5.2.9. First you need to download the Php (http://us.php.net/downloads.php) and Openssl sourcode (http://www.openssl.org/source/)

#wget http://www.openssl.org/source/openssl-0.9.8k.tar.gz
#wget http://us.php.net/distributions/php-5.2.9.tar.gz

Extract and compile the openssl

#cd /root
#tar -zxvf openssl-0.9.8k.tar.gz
#cd openssl-0.9.8k
#./config && make && make install

Extract, configure and installed the php

Before you configure the php sourcecode you must remember the previous php configuration right ? if not you can use php -i |grep configure to see the previous configuration

# php -i |grep configure
Configure Command =>  ‘./configure’  ‘–with-apxs2=/usr/local/apache2/bin/apxs’ ‘–with-mysql=/usr/local/mysql’ ‘–with-gd=/usr/local’ ‘–with-jpeg-dir=/usr/local/lib’ ‘–with-zlib-dir=/usr/local’ ‘–with-ftp’ ‘–with-gif’ ‘–enable-ftp’ ‘–with-png-dir=/usr/local/lib’ ‘–with-freetype-dir=/usr/local’ ‘–with-curl=/usr/local’

Now you have the config list, start the php installation

#cd /root
#tar -zxvf php-5.2.9.tar.gz
#cd php-5.2.9
./configure –with-openssl=/usr/local/ssl  –with-apxs2=/usr/local/apache2/bin/apxs –with-mysql=/usr/local/mysql –with-gd=/usr/local –with-jpeg-dir=/usr/local/lib –with-zlib-dir=/usr/local –with-ftp –with-gif –enable-ftp –with-png-dir=/usr/local/lib –with-freetype-dir=/usr/local –with-curl=/usr/local

#make
#make install

And the last thing don’t forget to restart your apache2

#/usr/local/apache2/bin/apachectl stop

#/usr/local/apache2/bin/apachectl start

Now check your openssl module

# php -m | grep openssl
openssl
if you see openssl it means you did it

Aug 07

I have an old qmail vpopmail system at my office and here is how to installed it you can refer to http://sylvestre.ledru.info/howto/howto_qmail_vpopmail.php. Okay the problem is i want to create many subscriber to the qmailadmin. You can manually create an subscriber by go to your qmailadmin -> Mailing Lists -> Show Subscribers. How about if we want to add many subscriber let’s say 500 or 100o email address ? here is the step. I want to start the step how to create mailing list on qmailadmin.

1. Go to your qmail admin, it usually http://localhost/cgi-bin/qmailadmin/ and click New Mailing List

ezmlm

2. Enter the t Mailing List Name , List owner email address and set the other option on the below. ANd after you finish click Add button

ezmlm1

3. Your Mailing list suppose to be addes succesfully, and if youw ant to add an subscriber you must add them by clicking Ass Subscriber button and add them one by one.

ezmlm2

ezmlm3

4. Waste of time and energy if you added them one by one right ? how about if we have to add 100/ 200 email ? :(. Here is how to add many subscriber on the qmail vpopmail(ezmlm).

Go to your mailing list name

# cd /home/vpopmail/domains/example.net/sample-list/

in my case i am going to /home/vpopmail/domains/test.org/test

# cd /home/vpopmail/domains/test.org/test

I have create the mailing list on list.txt and i create then under /home/vpopmail/domains/test.org/test

# vi list.txt
test@test.com
test@another.com
testing@gmail.com

Now we need to run ezmlm-sub command just run

# /path/to/ezmlm-sub `pwd` < /path/to/file/full/of/addresses

in my case

# /usr/local/bin/ezmlm/ezmlm-sub `pwd`< /home/vpopmail/domains/test.org/test/list.txt

then, confirm the subscription:

# /path/to/ezmlm-list `pwd`

in my case

# /usr/local/bin/ezmlm/ezmlm-list `pwd`
testing@gmail.com
test@another.com
test@test.com

by the way, the default ezmlm path is /usr/local/bin/ezmlm

5. You should see the email on the subscriber
ezmlm4

now how to add a bunch of moderator to the ezmlm mailing list?

Same as adding subscriber we need to go to your mailing list name

# cd /home/vpopmail/domains/example.net/sample-list/

in my case i am going to /home/vpopmail/domains/test.org/test

# cd /home/vpopmail/domains/test.org/test

And you ned to go to your moderator subdirectory

# cd /home/vpopmail/domains/example.net/sample-list/mod

in my case i am going to /home/vpopmail/domains/test.org/test/mod

# cd /home/vpopmail/domains/test.org/test/mod

I have create the moderator email on modlist.txt and i create then under /home/vpopmail/domains/test.org/test/mod

# vi modlist.txt
moderatortest@test.com
moderator2@another.com
moderator3@gmail.com

Please remember that the modlist.txt files has root permission you need to change it into vpopmail :vchkpw, if did not changes the ownership you cannot delete the moderator email address from your qmailadmin

# chown vpopmail.vchkpw modlist.txt

Now we need to run ezmlm-sub command on /home/vpopmail/domains/test.org/test/mod  just run

# /path/to/ezmlm-sub `pwd` < /path/to/file/full/of/addresses

in my case

# /usr/local/bin/ezmlm/ezmlm-sub `pwd`< /home/vpopmail/domains/test.org/test/mod/modlist.txt

then, confirm the subscription:

# /path/to/ezmlm-list `pwd`

in my case

# /usr/local/bin/ezmlm/ezmlm-list `pwd`
moderator3@gmail.com
moderator2@another.com
moderatortest@test.com

now you can see it on your qmailadmin -> Mailing Lists  -> Your mailing list name -> Show Moderators

ezmlm5