May 19

Step by step installation
1.Install postfix
# yast2 -i postfix

2. install Courier-Authlib, Cyrus-SASL

# yast2 -i courier-authlib cyrus-sasl cyrus-sasl-crammd5 cyrus-sasl-digestmd5 cyrus-sasl-gssapi cyrus-sasl-otp cyrus-sasl-plain cyrus-sasl-saslauthd

3. Install vm-pop3d
#wget http://www.ibiblio.org/pub/Linux/system/mail/pop/vm-pop3d-1.1.6.tar.gz
#tar -zxvf vm-pop3d-1.1.6.tar.gz
#cd vm-pop3d-1.1.6
#./configure && make && make install

4. Create user using yast

5. Set Config postfix main.cf

inet_protocols = all
biff = no
soft_bounce = no
queue_directory = /var/spool/postfix
command_directory = /usr/sbin
daemon_directory = /usr/lib/postfix
mail_owner = postfix
default_privs = nobody
inet_interfaces = all
unknown_local_recipient_reject_code = 450
debug_peer_level = 2
debugger_command =
PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
xxgdb $daemon_directory/$process_name $process_id & sleep 5
sendmail_path = /usr/sbin/sendmail
newaliases_path = /usr/bin/newaliases
mailq_path = /usr/bin/mailq
setgid_group = maildrop
manpage_directory = /usr/share/man
sample_directory = /usr/share/doc/packages/postfix/samples
readme_directory = /usr/share/doc/packages/postfix/README_FILES
mail_spool_directory = /var/mail
canonical_maps = hash:/etc/postfix/canonical
virtual_maps = hash:/etc/postfix/virtual
relocated_maps = hash:/etc/postfix/relocated
transport_maps = hash:/etc/postfix/transport
sender_canonical_maps = hash:/etc/postfix/sender_canonical
masquerade_exceptions = root
masquerade_classes = envelope_sender, header_sender, header_recipient
program_directory = /usr/lib/postfix
masquerade_domains =
mydestination = $myhostname, localhost.$mydomain
defer_transports =
disable_dns_lookups = no
relayhost =
content_filter =
mailbox_command =
mailbox_transport =
smtpd_sender_restrictions = hash:/etc/postfix/access
smtpd_client_restrictions =
smtpd_helo_required = no
smtpd_helo_restrictions =
strict_rfc821_envelopes = no
mynetworks_style = subnet
smtpd_recipient_restrictions =
permit_mynetworks,permit_sasl_authenticated,reject_unauth_destination
smtp_sasl_auth_enable = no
smtpd_sasl_auth_enable = yes
smtpd_use_tls = no
smtp_use_tls = no
alias_maps = hash:/etc/aliases
mailbox_size_limit = 0
message_size_limit = 10240000
#myhostname = linux.local
#change below information as needed
myhostname = mail.test.com
mynetworks = 11.11.11.11, 127.0.0.1

6. Configure virtual in /etc/postfix
# cd /etc/postfix/virtual
# vim virtual
test.com           virtual
admin@test.com     admin

# postfix start
# postmap virtual
# postfix reload

7. Start it all
#postfix stop
#postfix start
#/usr/sbin/saslauthd -a shadow
#/usr/local/sbin/vm-pop3d -d

ERROR
============
1.
Got this error when trying to retrieve pop3
May 18 15:07:25 linux vm-pop3d[20211]: pam_unix(vm-pop3d:auth):
authentication

failure; logname= uid=0 euid=0 tty= ruser= rhost=  user=help

and when trying to access vm-pop3d

# telnet mail.test.com 110
Escape character is ‘^]’.
+OK POP3 Welcome to vm-pop3d 1.1.6
user admin
pass test123
-ERR Bad login

solution
create vm-pop3d files on /etc/pam.d and add the needed library
#cd /etc/pam.d
#vim vm-pop3d
add this

#%PAM-1.0
auth required /lib64/security/pam_unix.so shadow
account required /lib64/security/pam_unix.so

Mar 26

PHP and perl are two very popular Web programming languages. They both have many libraries and extensions that can simplify the process of development, but often you can find a perl library you want, and not the corresponding library in PHP. (Perl is older then PHP, so naturally it has a larger selection of libraries and extensions.) This was the main reason that the perl extension for PHP was written.

Installation

download the php perl  extention

# cd /root

# wget http://pecl.php.net/get/perl-1.0.0.tgz

# tar -xvf perl-1.0.0.tgz

# cd perl-1.0.0

you can read the README for detail installation on /root/perl-1.0.0

======================================================================================

Requirements

============

PHP 5.0.0RC2 or later

Perl 5.8.0 or later
Quick install

=============
Step 1. Compile this extension. PHP_PREFIX and PERL_PREFIX mast point to

real

PHP and Perl instalation prefixes.
export PHP_PREFIX="/usr"

export PERL_PREFIX="/usr"

$PHP_PREFIX/bin/phpize

./configure --with-perl=$PERL_PREFIX

--with-php-config=$PHP_PREFIX/bin/php-config

make
Step 2. Install the extension (this step can require root privileges)
make install
Step 3. Add perl extension into your php.ini (this step can require root

privileges)
extension=perl.so

======================================================================================
I assume you have installed the php and perl, youc an use yast / zypper to do that

# php -v
PHP 5.3.1 (cli)

#rpm -qa | grep perl
perl-5.10.0-72.5.i586

you can search php  prefix path by using whereis

# whereis php
php: /usr//local/bin/php /usr/share/man/man1/php.1.gz

# export PHP_PREFIX=”/usr/local”
# export PERL_PREFIX=”/usr”
# $PHP_PREFIX/bin/phpize
# ./configure –with-perl=$PERL_PREFIX
–with-php-config=$PHP_PREFIX/bin/php-config
# make

you will find this error :

/root/perl-1.0.0/php_perl.c:172: warning: initialization from
incompatible pointer type
/root/perl-1.0.0/php_perl.c:173: warning: initialization from
incompatible pointer type
/root/perl-1.0.0/php_perl.c:199: warning: initialization from
incompatible pointer type
/root/perl-1.0.0/php_perl.c:200: warning: initialization from
incompatible pointer type
/root/perl-1.0.0/php_perl.c: In function âphp_perl_zval_to_sv_refâ:
/root/perl-1.0.0/php_perl.c:343: error: ‘zval’ has no member named ‘is_ref’

/root/perl-1.0.0/php_perl.c:1779: warning: assignment from incompatible
pointer type
make: *** [php_perl.lo] Error 1

Solution :

– it turns out the php_perl wasn’t compatible with the php 5.3

–  you need to go to http://svn.php.net/viewvc/pecl/perl/trunk/ -> click php_perl.c -> then click download (http://svn.php.net/viewvc/pecl/perl/trunk/php_perl.c?revision=289243&view=co)

– just wget http://svn.php.net/viewvc/pecl/perl/trunk/php_perl.c?revision=289243&view=co

– you will get php_perl.c\?revision\=289243 just rename it to php_perl.c then paste it to /root/perl-1.0.0/ then

#cd /root/perl-1.0.0
#/usr/local/bin/phpize
#./configure –with-perl=/usr/bin/perl –with-php-config=/usr/local/bin/php-config
#make
#make install

– Edit php.ini
#vim /usr/local/lib/php.ini
– add this line

extension=perl.so

– Restart the apache
#/usr/local/apache2/bin/apachectl stop
#/usr/local/apache2/bin/apachectl start

– Check your phpinfo
http:/localhost/phpinfo.php

perl