<linux under the Extmail service construction >

Source: Internet
Author: User
Tags rrdtool syslog install perl vmail

Download 2 packages: extmail-1.1.0.tar.gz extman-1.1.tar.gz

: http://www.cpan.org/

Create a Extsuite directory

Mkdir/var/www/extsuite

Unzip these 2 packages into this directory:

Tar zxf extman-1.1.tar.gz-c/var/www/extsuite

Tar zxf extmail-1.1.0.tar.gz-c/var/www/extsuite

Change a short name.

MV extmail-1.1.0 extmail MV extman-1.1 Extman

To switch to the background directory:

/var/www/extsuite/extman/docs

CP three file alias domain mailbox configuration file

CP mysql_virtual_alias_maps.cf MYSQL_VIRTUAL_DOMAINS_MAPS.CF mysql_virtual_mailbox_maps.cf/etc/postfix/

Installing the MySQL database yum isnatll mysql-server.x86_64-y

Add a password to MySQL: mysql_secure_installation

Switch to the secondary directory:/var/www/extsuite/extman/docs

See 2 files: Extmail.sql init.sql Mysql-pwestos < Extmail.sql

Vim Init.sql Change the password entry to clear text:

Mysql-pwestos < Init.sql Mysql-uextmail-pextmail

Drop the following parameter into the postfix master configuration file:

Useradd-u Vmail

postconf-d | grep virtual

Postconf-e virtual_uid_maps=static:800

Postconf-e virtual_gid_maps=static:800

Postconf-e virtual_mailbox_base=/home/vmail/

Postconf-e VIRTUAL_ALIAS_MAPS=MYSQL:/ETC/POSTFIXMYSQL_VIRTUAL_ALIAS_MAPS.CF

Postconf-e VIRTUAL_MAILBOX_DOMAINS=MYSQL:/ETC/POSTFIX/MYSQL_VIRTUAL_DOMAINS_MAPS.CF

Postconf-e VIRTUAL_MAILBOX_DOMAINS=MYSQL:/ETC/POSTFIX/MYSQL_VIRTUAL_DOMAINS_MAPS.CF

Check if OK separately

Postmap-q "[email protected]" mysql:/etc/postfix/mysql_virtual_alias_maps.cf

Postmap-q "[email protected]" mysql:/etc/postfix/mysql_virtual_mailbox_maps.cf

Postmap-q "extmail.org" mysql:/etc/postfix/mysql_virtual_domains_maps.cf

cd/var/www/extsuite/extmail/

Less INSTALL

Locate the following line to write to HTTP.

Namevirtualhost *:80

<virtualhost *:80>

ServerName mail.extmail.org

documentroot/var/www/extsuite/extmail/html/

scriptalias/extmail/cgi/var/www/extsuite/extmail/cgi

Alias/extmail/var/www/extsuite/extmail/html

Suexecusergroup Vmail Vmail

</VirtualHost>

CD Cgi/chown Vmail.vmail. -R

If you are testing the Apache service on a real machine, note the configuration resolution:

Vim/etc/hosts

/ETC/INIT.D/HTTPD restart/etc/init.d/mysqld restart/etc/init.d/postfix Restart

Browser input:[email protected]

Below to enter the solution of the error:

Extmail Error:

Can ' t locate cgi.pm in @INC (@INC contains:/var/www/extsuite/extmail/libs/usr/local/lib64/perl5/usr/local/share/ PERL5/USR/LIB64/PERL5/VENDOR_PERL/USR/SHARE/PERL5/VENDOR_PERL/USR/LIB64/PERL5/USR/SHARE/PERL5) at/var/www/ EXTSUITE/EXTMAIL/LIBS/EXT/CGI.PM Line 20. BEGIN failed--compilation aborted at/var/www/extsuite/extmail/libs/ext/cgi.pm line 20. Compilation failed in require AT/VAR/WWW/EXTSUITE/EXTMAIL/LIBS/EXT/APP.PM line 23. BEGIN failed--compilation aborted at/var/www/extsuite/extmail/libs/ext/app.pm line 23. Compilation failed in require AT/VAR/WWW/EXTSUITE/EXTMAIL/LIBS/EXT/APP/LOGIN.PM line 16. BEGIN failed--compilation aborted at/var/www/extsuite/extmail/libs/ext/app/login.pm line 16. Compilation failed in require for index.cgi line 20.

Solution: Yum Install perl-cgi

Error: Can ' t locate/var/www/cgi-bin/extmail//lang//en_us in @INC (@INC contains:/var/www/extsuite/extmail/libs/usr/ local/lib64/perl5/usr/local/share/perl5/usr/lib64/perl5/vendor_perl/usr/share/perl5/vendor_perl/usr/lib64/ PERL5/USR/SHARE/PERL5) at/var/www/extsuite/extmail/libs/ext/lang.pm Line 65.

FIX: No master file

[email protected] extmail]# CP Webmail.cf.default WEBMAIL.CF

[Email protected] extmail]# Pwd/var/www/extsuite/extmail

Error:

Unix::syslog not found, please install it first! (in cleanup) Undefined subroutine &ext::logger::d O_closelog called at/var/www/extsuite/extmail/libs/ext/logger.pm Line 86.

Solution:

Without this bag: unix-syslog-1.1.tar.gz

# Perl makefile.pl

Error in installing this package

Can ' t locate extutils/makemaker.pm in @INC (@INC contains:/usr/local/lib64/perl5/usr/local/share/perl5/usr/lib64/ Perl5/vendor_perl/usr/share/perl5/vendor_perl/usr/lib64/perl5/usr/share/perl5.) At makefile.pl Line 1. BEGIN failed--compilation aborted at makefile.pl Line 1.

Solve

Yum Install-y Perl-extutils-makemaker

# perl makefile.pl # make Install

Error

DBI Connect (' Database=extmail;host=localhost;mysql_socket=/var/lib/mysql/mysql.sock ', ' Db_user ',...) failed: Access denied for user ' db_user ' @ ' localhost ' (using Password:yes) at/var/www/extsuite/extmail/libs/ext/auth/mysql.pm Line 45

FIX: Failed to enter database, modify master configuration file. Sys_mysql_user = Extmail Sys_mysql_pass = Extmail

Error Can ' t chdir to/home/domains/extmail.org/postmaster/maildir/, No such file or directory

Solve:

Sys_maildir_base =/home/vmail

# mail [email protected] send an email to create a mail directory

Extmail configuration of the background

The same operation in the background

Namevirtualhost *:80 <virtualhost *:80> ServerName mail.example.com documentroot/path/to/your/document/root/ scriptalias/extman/cgi/var/www/extsuite/extman/cgi alias/extman/var/www/extsuite/extman/html SuexecUserGroup VUser Vgroup </VirtualHost>

Only need to insert the following 2 lines, mail in the foreground configuration scriptalias/extman/cgi/var/www/extsuite/extman/cgi alias/extman/var/www/extsuite/extman/html

Final Apache Write configuration:

<virtualhost *:80>

ServerName mail.extmail.org

documentroot/var/www/extsuite/extmail/html/

scriptalias/extmail/cgi/var/www/extsuite/extmail/cgi

Alias/extmail/var/www/extsuite/extmail/html

scriptalias/extman/cgi/var/www/extsuite/extman/cgi

Alias/extman/var/www/extsuite/extman/html

Suexecusergroup Vmail Vmail

</VirtualHost>

/var/www/extsuite/extman chown Vmail.vmail. -R

Verification Code

/var/www/extsuite/extman

CP Webman.cf.default WEBMAN.CF

Vim webman.cf sys_captcha_on = 1

Sys_captcha_len = 4

About the home page display:

Vim/etc/rc.local

/var/www/extsuite/extman/daemon/cmdserver &

Background Graphics monitoring error:

Can ' t locate rrds.pm in @INC (@INC contains:/var/www/extsuite/extman/libs/usr/local/lib64/perl5/usr/local/share/ Perl5/usr/lib64/perl5/vendor_perl/usr/share/perl5/vendor_perl/usr/lib64/perl5/usr/share/perl5.) AT/VAR/WWW/EXTSUITE/EXTMAN/LIBS/EXT/GRAPHLOG.PM Line 23. BEGIN failed--compilation aborted at/var/www/extsuite/extman/libs/ext/graphlog.pm line 23. Compilation failed in require AT/VAR/WWW/EXTSUITE/EXTMAN/LIBS/EXT/MGRAPP/VIEWLOG.PM line 22. BEGIN failed--compilation aborted at/var/www/extsuite/extman/libs/ext/mgrapp/viewlog.pm line 22. Compilation failed in require for viewlog.cgi line 18.

Workaround: Download the package: rrdtool-perl-1.3.8-6.el6.x86_64.rpm Yum localinstall rrdtool-perl-1.3.8-6.el6.x86_64.rpm

Although the monitor directory is displayed, the click does not reflect:

# CP mailgraph_ext//usr/local/-R Why want CP to/usr/local/?

/usr/local/mailgraph_ext Vim Mailgraph-init will find the path to execute the script: Basedir=/usr/local/mailgraph_ext

#/usr/local/mailgraph_ext/mailgraph-init Start

Error: Starting mail statistics grapher:mailgraph_ext Can ' t locate file/tail.pm in @INC (@INC contains:/usr/local/lib64/per L5/usr/local/share/perl5/usr/lib64/perl5/vendor_perl/usr/share/perl5/vendor_perl/usr/lib64/perl5/usr/share/ Perl5.) at/usr/local/mailgraph_ext/mailgraph_ext.pl Line 296. BEGIN failed--compilation aborted at/usr/local/mailgraph_ext/mailgraph_ext.pl line 296. Starting Queue Statistics Grapher:qmonitor

Download package: file-tail-0.99.3.tar.gz

TAR-ZXF file-tail-0.99.3.tar.gz # cd file-tail-0.99.3 # perl makefile.pl

Error: File::tail'll be installed without debugging information. This information isn ' t usefull unless you intend to tinker with the code. To install with debugging enabled, Use:perl makefile.pl LOGIT Checking If your kit are complete ... Looks Good warning:prerequisite time::hires 1.12 not found. Writing Makefile for File::tail

WORKAROUND: # Yum Install perl-time-hires-y # perl makefile.pl # make Install

#/usr/local/mailgraph_ext/mailgraph-init Start

After that, you'll see graphical monitoring.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.