ispCP - Board - Support
Installation on a new debian Server - Printable Version

+- ispCP - Board - Support (http://www.isp-control.net/forum)
+-- Forum: ispCP Omega Support Area (/forum-30.html)
+--- Forum: System Setup & Installation (/forum-32.html)
+--- Thread: Installation on a new debian Server (/thread-2837.html)

Pages: 1 2


RE: Installation on a new debian Server - janthedoc81 - 03-26-2008 12:20 AM

I'm running rootservers since 8 years with Plesk, Confixx and Webmin.

But the problem is, when you have installed a server the system runs about 2 years or more without big problems.

And when you install a new server after one year or more you start at the beginning again...

Search howto's for spamassassin clamav etc... new versions of
linux, new virusscans new spamfilter...

You know? Smile

Thanks for your help...


RE: Installation on a new debian Server - gOOvER - 03-26-2008 12:22 AM

Search about Amavis-new Smile


RE: Installation on a new debian Server - BeNe - 03-26-2008 12:58 AM

Maia
--> http://www.isp-control.net/documentation/howto/mail/install_maia_mailguard_1.0.2a_on_ispcp_omega_rc3

Greez BeNe


RE: Installation on a new debian Server - janthedoc81 - 03-26-2008 05:54 AM

Thanks for the Link Wink


RE: Installation on a new debian Server - janthedoc81 - 03-27-2008 07:27 PM

Hello,

i have question about MAIA.

What should i do with this config?

It's 7. in the howto:

7.) The Spamassasin config

Please create a config with the generator [http://www.yrex.com/spam/spamconfig.php]\\ and save it under "/etc/spamassassin/local.cf" ====== 8.) Add user clamav to the amavis group ====== <cli> # usermod -G amavis clamav </cli> ====== 9.) MySQL must start before AMaVis ====== <cli> # update-rc.d -f mysql remove # update-rc.d mysql start 18 2 3 4 5 . stop 22 0 1 6 . </cli> ====== 10.) Restart the services ====== <cli> # /etc/init.d/amavis restart # /etc/init.d/clamav-daemon restart # /etc/init.d/postfix restart </cli> ====== 11.) Install Maia ====== We create a new directory and donwload the needed files.\\ You must change the second file (maia-lang-de.tar.gz) if German "de" is not your default language. Change it to your need. English is per default running. <cli> # mkdir /usr/src/maia # cd /usr/src/maia # wget http://www.maiamailguard.com/files/maia-1.0.2a.tar.gz # wget http://www.maiamailguard.com/files/maia-lang-de.tar.gz # wget http://ratsnet.org/vhcs/maia_vhcs_theme_v2.12.tar.bz2 </cli> ===== Decompress the files. ===== \\ (You must also change the name of the second file here if you use an other instead of German) <cli> # tar -xzf maia-1.0.2a.tar.gz # tar -xzf maia-lang-de.tar.gz # tar xjvf maia_vhcs_theme_v2.12.tar.bz2 </cli> ===== Create the Maia-DB ===== <cli> # cd /usr/src/maia # mysql -u root -p mysql> CREATE DATABASE maia; mysql> quit </cli> Give the user 'amavis' a Password <cli> # passwd amavis </cli> ===== Give the user 'amavis' no shell ===== <cli> # chsh -s /bin/false amavis </cli> ===== Create the DB structure and set the permissions ===== (change '_YOUR_AMaVIS_PASS_ to your Pass) <cli> # cd /usr/src/maia/maia-1.0.2 # mysql -u root -p maia < maia-mysql.sql # mysql -u root -p maia mysql> GRANT CREATE, DROP, ALTER, SELECT, INSERT, UPDATE, DELETE ON mysql> maia.* TO amavis@localhost IDENTIFIED BY '_YOUR_AMaVIS_PASS_'; mysql> quit </cli> ===== Create directories for Maia ===== <cli> # mkdir /var/lib/amavis/maia # mkdir /var/lib/amavis/maia/scripts # mkdir /var/lib/amavis/maia/templates </cli> ===== The Maia config ===== <cli> # cd /usr/src/maia/maia-1.0.2 # mv maia.conf.dist maia.conf # vi maia.conf </cli> Change $password to your AMaViS Password and $base_url to http://admin.yourserver.tld/tools/antispam And also correct the following file locations <cli> $script_dir = "/var/lib/amavis/maia/scripts"; $template_dir = "/var/lib/amavis/maia/templates"; $pid_file = "/var/run/amavis/.process-quarantine.pid"; </cli> ===== Copy the files ===== <cli> # cp /usr/src/maia/maia-1.0.2/maia.conf /etc/maia.conf # cp -R /usr/src/maia/maia-1.0.2/scripts/* /var/lib/amavis/maia/scripts # cp -R /usr/src/maia/maia-1.0.2/templates/* /var/lib/amavis/maia/templates </cli> ===== Set the right permissions ===== <cli> # chown -R amavis /var/lib/amavis/maia # chgrp -R amavis /var/lib/amavis/maia # chmod 640 /var/lib/amavis/maia/templates/*.tpl # chmod 750 /var/lib/amavis/maia/scripts/*.pl # chown amavis /etc/maia.conf # chgrp amavis /etc/maia.conf # chmod 640 /etc/maia.conf </cli> ===== Correct the directories in the scripts ===== <cli> # vi /var/lib/amavis/maia/scripts/process-quarantine.pl </cli> and change '/var/amavisd/maia/scripts' to '/var/lib/amavis/maia/scripts' <cli> # vi /var/lib/amavis/maia/scripts/send-quarantine-digests.pl </cli> change '/var/amavisd/maia/templates/' to '/var/lib/amavis/maia/templates/' ===== Then we can test the config ===== <cli> # cd /var/lib/amavis/maia/scripts # ./configtest.pl </cli> "NOT INSTALLED" is OK for some modules. ===== Import the Spamassassin rules ===== <cli> # cd /var/lib/amavis/maia/scripts # ./load-sa-rules.pl </cli> ===== Install the Webinterface ===== <cli> # mkdir /var/www/ispcp/gui/tools/antispam # cp -R /usr/src/maia/maia-1.0.2/php/* /var/www/ispcp/gui/tools/antispam </cli> ===== Copy the German locales ===== \\ Must be changed to your language if you do not use German. <cli> # mkdir /var/www/ispcp/gui/tools/antispam/locale/de # cp -R /usr/src/maia/de/* /var/www/ispcp/gui/tools/antispam/locale/de </cli> ===== Edit the config.php ===== <cli> # cd /var/www/ispcp/gui/tools/antispam # mv config.php.dist config.php # vi config.php </cli> ===== Change the default settings ===== (change '_YOUR_AMaVIS_PASS_ to your Pass) <cli> $default_display_language = "de"; $maia_sql_dsn = "mysql://amavis:_YOUR_AMaVis_PASSd@tcp(localhost:3306)/maia"; $address_rewriting_type = 4; $auth_method = "pop3"; </cli> ====== 12.) Install the SMARTY TEMPLATE ENGINE ====== <cli> # cd /usr/src/maia/ # wget http://smarty.php.net/do_download.php?download_file=Smarty-2.6.18.tar.gz # tar -xzf Smarty-2.6.18.tar.gz # cd Smarty-2.6.18/libs # mkdir /var/www/ispcp/gui/tools/antispam/libs/Smarty # cp -R ./* /var/www/ispcp/gui/tools/antispam/libs/Smarty </cli> Or ''alternatively'' on Debian ... <cli> apt-get install smarty </cli> and edit the following file <cli> # vi /var/www/ispcp/gui/tools/antispam/config.php </cli> uncomment the following line <cli> $smarty_path = "/var/www/ispcp/gui/tools/antispam/libs/Smarty"; </cli> ====== 13.) Install the modern_blue Theme ====== <cli> # mkdir /var/www/ispcp/gui/tools/antispam/themes/modern_blue # cp -R /usr/src/maia/modern_blue/* /var/www/ispcp/gui/tools/antispam/themes/modern_blue </cli> ===== Set the Permissions ===== <cli> # chown -R vu2000:www-data /var/www/ispcp/gui/tools/antispam # chmod -R 555 /var/www/ispcp/gui/tools/antispam # chmod -R 755 /var/www/ispcp/gui/tools/antispam/themes </cli> ====== 14.) Apache meets Maia ====== <cli> # cd /etc/apache2/sites-available/ # vi 00_master.conf </cli> After this: <cli> Alias /ftp /var/www/ispcp/gui/tools/filemanger/ </cli> add this line: <cli> Alias /antispam /var/www/ispcp/gui/tools/antispam/ </cli> ===== Restart Apache ===== <cli> # /etc/init.d/apache2 restart </cli> ====== 15.) Test the GUI ====== \\ Open this URL on your Server: http://admin.yourserver.tld/tools/antispam/admin/configtest.php Here should everything looks 'OK'. If not install the needed modules with <cli> pear install modulname </cli> There is an error in PEAR::Image_Graph 0.7.2 that would be fixed in 0.7.3.\\ Up to then use this Patch ->[http://www.maiamailguard.org/maia/ticket/326]\\ Or you can download a patched Version: <cli> cd /usr/share/php/Image/Graph/Plot/ mv Pie.php Pie.php.orig wget http://www200.pair.com/mecham/Pie.php.txt mv Pie.php.txt Pie.php </cli> Does not need a OK: <cli> PostgreSQL Support PEAR::Net_IMAP IMAP library LDAP library MCrypt library </cli> ====== 16.) Maia-AMaVis ====== \\ Maia need its own AMaVis, it´s a part of the package. <cli> # mv /usr/sbin/amavisd-new /usr/sbin/amavisd-bak # cp /usr/src/maia/maia-1.0.2/amavisd-maia /usr/sbin/amavisd-new # chown root /usr/sbin/amavisd-new # chmod 755 /usr/sbin/amavisd-new </cli> ====== 17.) Edit the Spamassassin config ====== <cli> # vi /etc/spamassassin/local.cf </cli> Add these lines on the end of the file and set your PW <cli> # Bayes database configuration use_bayes 1 bayes_store_module Mail::SpamAssassin::BayesStore::SQL bayes_sql_dsn DBI:mysql:maia bayes_sql_username amavis bayes_sql_password _YOUR_AMaViS_PASS_ # < change '_YOUR_AMaViS_PASS_ to your Pass bayes_sql_override_username amavis bayes_auto_learn 1 bayes_auto_learn_threshold_nonspam 0.1 bayes_auto_learn_threshold_spam 10.0 bayes_use_hapaxes 1 bayes_use_chi2_combining 1 bayes_ignore_header ReSent-Date bayes_ignore_header ReSent-From bayes_ignore_header ReSent-Message-ID bayes_ignore_header ReSent-Subject bayes_ignore_header ReSent-To bayes_ignore_header Resent-Date bayes_ignore_header Resent-From bayes_ignore_header Resent-Message-ID bayes_ignore_header Resent-Subject bayes_ignore_header Resent-To bayes_ignore_header X-Received-From-IP bayes_ignore_header X-Virus-Scanned bayes_ignore_header X-Spam-Status bayes_ignore_header X-Spam-Level bayes_ignore_header X-Sender bayes_ignore_header X-Mailer # Auto-Whitelist configuration auto_whitelist_factory Mail::SpamAssassin::SQLBasedAddrList user_awl_dsn DBI:mysql:maia user_awl_sql_username amavis user_awl_sql_password _YOUR_AMaViS_ # ←- change '_YOUR_AMaVis_PASS_ to your Pass </cli>

Thank you for your help...


RE: Installation on a new debian Server - janthedoc81 - 03-27-2008 07:43 PM

...and I have another problem.

I can send emails but i can't get emails in my inbox.

What can i do to test, where the problem is?

Jan


RE: Installation on a new debian Server - janthedoc81 - 03-27-2008 07:47 PM

...when i'm looking in the ispcp admin, the service spamassassin is not active...

Might be a reason, that i can't get emails??


RE: Installation on a new debian Server - BeNe - 03-27-2008 08:05 PM

I corrected the HowTo, so you can go on!

Please no double post --> http://www.isp-control.net/forum/emails-kommen-nicht-an-t-2859.html

Greez BeNe


RE: Installation on a new debian Server - janthedoc81 - 03-27-2008 11:33 PM

Ok, no problem...

I have after the changes in the howto the problem that when i'm opening the url for the configtest i get these failures:

Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(/usr/share/pear/Smarty/Smarty.class.php) is not within the allowed path(s): (/var/www/ispcp/gui/:/etc/ispcp/:/var/run/ispcp.lock:/proc/:/bin/df:/bin/mount:/var/log/rkhunter.log:/var/log/chkrootkit.log:/usr/share/php/) in /var/www/ispcp/gui/tools/antispam/admin/configtest.php on line 88
Smarty Template Engine OK: Found Smarty in ../libs//Smarty/Smarty.class.php
WDDX Support OK: WDDX support available
MySQL Support OK: MySQL support available
PostgreSQL Support SKIPPED: PostgreSQL support not available
Database Support OK: Database support is ok

Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(/usr/share/php) is not within the allowed path(s): (/var/www/ispcp/gui/:/etc/ispcp/:/var/run/ispcp.lock:/proc/:/bin/df:/bin/mount:/var/log/rkhunter.log:/var/log/chkrootkit.log:/usr/share/php/) in /usr/share/php/PEAR/Config.php on line 87

Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(/.pearrc) is not within the allowed path(s): (/var/www/ispcp/gui/:/etc/ispcp/:/var/run/ispcp.lock:/proc/:/bin/df:/bin/mount:/var/log/rkhunter.log:/var/log/chkrootkit.log:/usr/share/php/) in /usr/share/php/PEAR/Config.php on line 616

Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(/usr/etc/pear.conf) is not within the allowed path(s): (/var/www/ispcp/gui/:/etc/ispcp/:/var/run/ispcp.lock:/proc/:/bin/df:/bin/mount:/var/log/rkhunter.log:/var/log/chkrootkit.log:/usr/share/php/) in /usr/share/php/PEAR/Config.php on line 625

Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(/usr/etc/pear.conf) is not within the allowed path(s): (/var/www/ispcp/gui/:/etc/ispcp/:/var/run/ispcp.lock:/proc/:/bin/df:/bin/mount:/var/log/rkhunter.log:/var/log/chkrootkit.log:/usr/share/php/) in /usr/share/php/PEAR/Config.php on line 625

...and i can't receive any email.

What can i do???

Jan