{"id":182,"date":"2012-01-12T16:46:41","date_gmt":"2012-01-12T18:46:41","guid":{"rendered":"http:\/\/linuxrs.com.br\/?p=182"},"modified":"2012-01-12T16:46:41","modified_gmt":"2012-01-12T18:46:41","slug":"instalando-maia-mail","status":"publish","type":"post","link":"https:\/\/blog.clusterweb.com.br\/?p=182","title":{"rendered":"Instalando Maia Mail"},"content":{"rendered":"<h1><a id=\"conditions\" name=\"conditions\"><\/a>0.) Conditions<\/h1>\n<div>\nYou need Debian Squeeze 6.0 and a running ispCP Omega on your System<\/p>\n<\/div>\n<h1><a id=\"stop_postfix\" name=\"stop_postfix\"><\/a>1.) Stop postfix<\/h1>\n<div>\n<pre># \/etc\/init.d\/postfix stop<\/pre>\n<\/div>\n<h1><a id=\"update_your_packages_and_install_some_new_one\" name=\"update_your_packages_and_install_some_new_one\"><\/a>2.) Update your packages and install some new one<\/h1>\n<div>\n<pre># apt-get update &amp;&amp; apt-get upgrade\r\n# apt-get install libdbd-mysql-perl libdbi-perl libphp-jpgraph libossp-uuid-perl php-pear<\/pre>\n<\/div>\n<h1><a id=\"recommended_pear-modules\" name=\"recommended_pear-modules\"><\/a>3.) Recommended pear-modules<\/h1>\n<div>\n<pre># pear upgrade-all                         #Errors could be ignored \r\n# pear install Log Mail_Mime Mail_mimeDecode File Date DB DB_Pager Net_Sieve Net_Pop3\r\n# pear -d preferred_state=alpha install Image_Color Image_Canvas Image_Graph Numbers_Roman Numbers_Words\r\n# pear install Pager Net_SMTP Auth_SASL<\/pre>\n<\/div>\n<h1><a id=\"install_amavis\" name=\"install_amavis\"><\/a>4.) Install AMaVis<\/h1>\n<div>\n<pre># apt-get install amavisd-new spamassassin clamav clamav-daemon<\/pre>\n<p>On installation of cclamAV, i got an Error: <em>This version of the ClamAV engine is outdated.<\/em>. There is an Advice at the clamAV-Page, that all Versions earlyer than 0.95 are not supportet anymore. For Debian Lenny do the following to install the newest Version: <a title=\"http:\/\/lists.debian.org\/debian-volatile-announce\/2009\/msg00010.html\" href=\"http:\/\/lists.debian.org\/debian-volatile-announce\/2009\/msg00010.html\" rel=\"nofollow\">http:\/\/lists.debian.org\/debian-volatile-announce\/2009\/msg00010.html<\/a><\/p>\n<p>Attention: Please make a backup of every single config that you modify<\/p>\n<\/div>\n<h1><a id=\"modifiy_the_postfix_config\" name=\"modifiy_the_postfix_config\"><\/a>5.) Modifiy the Postfix Config<\/h1>\n<div>\n<p>Open the main.cf and activate AMaViS<\/p>\n<pre># vi \/etc\/postfix\/main.cf<\/pre>\n<p>Search for this Part and remove the \u201d#\u201d before the line, that it looks like this:<\/p>\n<pre>#\r\n# AMaViS parameters; activate, if avaible\/used\r\n#\r\n\r\ncontent_filter = amavis:[127.0.0.1]:10024<\/pre>\n<p>Add the following line to the config. This prevents spamassassin to score authenticated users basend on their IP:<\/p>\n<pre>smtpd_sasl_authenticated_header = yes\r\nreceive_override_options = no_address_mappings<\/pre>\n<p>If you use \u201cdomain mail\u201d and \u201cmail forward\u201d for the same emailadress you must edit this! Otherwise the email forwarder will receive the email two times. open master.cf<\/p>\n<pre># vi \/etc\/postfix\/master.cf<\/pre>\n<p>Search for this Part<\/p>\n<pre>localhost:10025 inet  n -       n       -      -        smtpd\r\n   -o content_filter=\r\n   -o local_recipient_maps=\r\n   -o relay_recipient_maps=\r\n   -o smtpd_restriction_classes=\r\n   -o smtpd_client_restrictions=\r\n   -o smtpd_helo_restrictions=\r\n   -o smtpd_sender_restrictions=\r\n   -o smtpd_recipient_restrictions=permit_mynetworks,reject\r\n   -o smtpd_override_options=no_address_mappings\r\n   -o mynetworks=127.0.0.0\/8\r\n   -o strict_rfc821_envelopes=yes<\/pre>\n<p>Add this line after<\/p>\n<pre>-o receive_override_options=no_header_body_checks,no_unknown_recipient_checks<\/pre>\n<\/div>\n<h1><a id=\"modify_the_amavis_config\" name=\"modify_the_amavis_config\"><\/a>6.) Modify the AMaViS config<\/h1>\n<div>\n<p>&nbsp;<\/p>\n<p>Out to compatibility-base we must use an extern configuration file<\/p>\n<pre># cd \/etc\/amavis\r\n# wget http:\/\/www200.pair.com\/mecham\/amavisd.conf.maia\r\n# mv amavisd.conf.maia amavisd.conf<\/pre>\n<p>Open the config<\/p>\n<pre># vi \/etc\/amavis\/amavisd.conf<\/pre>\n<p>First, change &#8216;$mydomain&#8217; and &#8216;$myhostname&#8217; to yours. Then search for these entries:<\/p>\n<pre>$final_virus_destiny = D_DISCARD;\r\n$final_spam_destiny = D_DISCARD;\r\n$final_banned_destiny = D_DISCARD;\r\n$final_bad_header_destiny = D_DISCARD;<\/pre>\n<p>and add this text block after it:<\/p>\n<pre>$warnvirussender = 1;\r\n$warnspamsender = 0;\r\n$warnbannedsender = 1;\r\n$warnvirusrecip = 1;\r\n$warnbannedrecip = 1;<\/pre>\n<p>search for this line and enter a new AMaVis password<\/p>\n<pre>lookup_sql_dsn = ( ['DBI:mysql:maia:localhost', 'amavis', '_YOUR_PASS_'] );<\/pre>\n<p>and after<\/p>\n<pre>$X_HEADER_TAG = 'X-Virus-Scanned';\r\n$X_HEADER_LINE = \"Maia Mailguard 1.0.2\";<\/pre>\n<p>copy these lines<\/p>\n<pre>use DBI;\r\nmy $db = \"ispcp\";\r\nmy $user=\"root\";           # Type here your ispCP MySQL User \r\n\t\t\t   # (is the same you typed during the setup)\r\nmy $host=\"localhost\";\r\nmy $password=\"_YOUR_PASS\"; # Type here your ispCP MySQL Password \r\n\t\t\t   #(is the same you typed during the setup)\r\n\r\nmy $dbh = DBI-&gt;connect(\"DBI:mysql:database=$db;host=$host\", $user, $password, {RaiseError =&gt; 1});\r\nmy $arr = $dbh-&gt;selectcol_arrayref('SELECT domain_name, 1 FROM domain', {Columns=&gt;[1,2]});\r\nmy $arre = $dbh-&gt;selectcol_arrayref('SELECT alias_name, 1 FROM domain_aliasses', {Columns=&gt;[1,2]});\r\n\r\nmy $lis = ($arre,$arr);\r\n%local_domains = (@$arr,@$arre);<\/pre>\n<\/div>\n<h1><a id=\"the_spamassassin_config\" name=\"the_spamassassin_config\"><\/a>7.) The Spamassassin config<\/h1>\n<div>\n<p>Please create a config with the generator at <a title=\"http:\/\/www.yrex.com\/spam\/spamconfig.php\" href=\"http:\/\/www.yrex.com\/spam\/spamconfig.php\" rel=\"nofollow\">http:\/\/www.yrex.com\/spam\/spamconfig.php<\/a> and save it under \u201d\/etc\/spamassassin\/local.cf\u201d<\/p>\n<\/div>\n<h1><a id=\"add_user_clamav_to_the_amavis_group\" name=\"add_user_clamav_to_the_amavis_group\"><\/a>8.) Add user clamav to the amavis group<\/h1>\n<div>\n<pre># usermod -G amavis clamav<\/pre>\n<\/div>\n<h1><a id=\"mysql_must_start_before_amavis\" name=\"mysql_must_start_before_amavis\"><\/a>9.) MySQL must start before AMaVis<\/h1>\n<div>\n<pre># update-rc.d -f mysql remove\r\n# update-rc.d mysql start 18 2 3 4 5 . stop 22 0 1 6 .<\/pre>\n<\/div>\n<h1><a id=\"restart_the_services\" name=\"restart_the_services\"><\/a>10.) Restart the services<\/h1>\n<div>\n<pre># \/etc\/init.d\/amavis restart\r\n# \/etc\/init.d\/clamav-daemon restart\r\n# \/etc\/init.d\/postfix restart<\/pre>\n<\/div>\n<h1><a id=\"install_maia\" name=\"install_maia\"><\/a>11.) Install Maia<\/h1>\n<div>\n<p>We create a new directory and donwload the needed files.<br \/>\nYou must change the second file (maia-lang-de.tar.gz) if German \u201cde\u201d is not your default language. Change it to your need. English is per default running.<\/p>\n<pre># mkdir \/usr\/src\/maia\r\n# cd \/usr\/src\/maia\r\n# wget http:\/\/www.maiamailguard.com\/files\/maia-1.0.2a.tar.gz\r\n# wget http:\/\/www.maiamailguard.com\/files\/maia-lang-de.tar.gz\r\n# wget http:\/\/ratsnet.org\/vhcs\/maia_vhcs_theme_v2.12.tar.bz2<\/pre>\n<\/div>\n<h2><a id=\"decompress_the_files\" name=\"decompress_the_files\"><\/a>Decompress the files.<\/h2>\n<div>\n(You must also change the name of the second file here if you use an other instead of German)<\/p>\n<pre># tar -xzf maia-1.0.2a.tar.gz\r\n# tar -xzf maia-lang-de.tar.gz\r\n# tar xjvf maia_vhcs_theme_v2.12.tar.bz2<\/pre>\n<\/div>\n<h2><a id=\"create_the_maia-db\" name=\"create_the_maia-db\"><\/a>Create the Maia-DB<\/h2>\n<div>\n<pre># cd \/usr\/src\/maia\r\n# mysql -u root -p\r\nmysql&gt; CREATE DATABASE maia;\r\nmysql&gt; quit<\/pre>\n<p>Give the user &#8216;amavis&#8217; a Password<\/p>\n<pre># passwd amavis<\/pre>\n<\/div>\n<h2><a id=\"give_the_user_amavis_no_shell\" name=\"give_the_user_amavis_no_shell\"><\/a>Give the user &#8216;amavis&#8217; no shell<\/h2>\n<div>\n<pre># chsh -s \/bin\/false amavis<\/pre>\n<\/div>\n<h2><a id=\"create_the_db_structure_and_set_the_permissions\" name=\"create_the_db_structure_and_set_the_permissions\"><\/a>Create the DB structure and set the permissions<\/h2>\n<div>\n<p>(change &#8216;_YOUR_AMaVIS_PASS_&#8217; to your Pass)<\/p>\n<pre># cd \/usr\/src\/maia\/maia-1.0.2\r\n# mysql -u root -p maia &lt; maia-mysql.sql\r\n# mysql -u root -p maia\r\nmysql&gt; GRANT CREATE, DROP, ALTER, SELECT, INSERT, UPDATE, DELETE ON\r\nmysql&gt; maia.* TO amavis@localhost IDENTIFIED BY '_YOUR_AMaVIS_PASS_';\r\nmysql&gt; quit<\/pre>\n<\/div>\n<h2><a id=\"create_directories_for_maia\" name=\"create_directories_for_maia\"><\/a>Create directories for Maia<\/h2>\n<div>\n<pre># mkdir \/var\/lib\/amavis\/maia\r\n# mkdir \/var\/lib\/amavis\/maia\/scripts\r\n# mkdir \/var\/lib\/amavis\/maia\/templates<\/pre>\n<\/div>\n<h2><a id=\"the_maia_config\" name=\"the_maia_config\"><\/a>The Maia config<\/h2>\n<div>\n<pre># cd \/usr\/src\/maia\/maia-1.0.2\r\n# mv maia.conf.dist maia.conf\r\n# vi maia.conf<\/pre>\n<p>Change $password to your AMaViS Password and $base_url to <a title=\"http:\/\/admin.yourserver.tld\/tools\/antispam\" href=\"http:\/\/admin.yourserver.tld\/tools\/antispam\" rel=\"nofollow\">http:\/\/admin.yourserver.tld\/tools\/antispam<\/a><\/p>\n<p>And also correct the following file locations<\/p>\n<pre>$script_dir = \"\/var\/lib\/amavis\/maia\/scripts\";\r\n$template_dir = \"\/var\/lib\/amavis\/maia\/templates\";\r\n$pid_file = \"\/var\/run\/amavis\/.process-quarantine.pid\";<\/pre>\n<\/div>\n<h2><a id=\"copy_the_files\" name=\"copy_the_files\"><\/a>Copy the files<\/h2>\n<div>\n<pre># cp \/usr\/src\/maia\/maia-1.0.2\/maia.conf \/etc\/maia.conf\r\n# cp -R \/usr\/src\/maia\/maia-1.0.2\/scripts\/* \/var\/lib\/amavis\/maia\/scripts\r\n# cp -R \/usr\/src\/maia\/maia-1.0.2\/templates\/* \/var\/lib\/amavis\/maia\/templates<\/pre>\n<\/div>\n<h2><a id=\"set_the_right_permissions\" name=\"set_the_right_permissions\"><\/a>Set the right permissions<\/h2>\n<div>\n<pre># chown -R amavis \/var\/lib\/amavis\/maia\r\n# chgrp -R amavis \/var\/lib\/amavis\/maia\r\n# chmod 640 \/var\/lib\/amavis\/maia\/templates\/*.tpl\r\n# chmod 750 \/var\/lib\/amavis\/maia\/scripts\/*.pl\r\n# chown amavis \/etc\/maia.conf\r\n# chgrp amavis \/etc\/maia.conf\r\n# chmod 640 \/etc\/maia.conf<\/pre>\n<\/div>\n<h2><a id=\"correct_the_directories_in_the_scripts\" name=\"correct_the_directories_in_the_scripts\"><\/a>Correct the directories in the scripts<\/h2>\n<div>\n<pre># vi \/var\/lib\/amavis\/maia\/scripts\/process-quarantine.pl<\/pre>\n<p>change &#8216;\/var\/amavisd\/maia\/scripts&#8217; to &#8216;\/var\/lib\/amavis\/maia\/scripts&#8217; and also change &#8216;\/var\/amavisd\/.process-quarantine.pid&#8217; to &#8216;\/var\/run\/amavis\/.process-quarantine.pid&#8217;<\/p>\n<pre># vi \/var\/lib\/amavis\/maia\/scripts\/send-quarantine-digests.pl<\/pre>\n<p>change &#8216;\/var\/amavisd\/maia\/templates\/&#8217; to &#8216;\/var\/lib\/amavis\/maia\/templates\/&#8217; and change the $base_url with used before<\/p>\n<\/div>\n<h2><a id=\"then_we_can_test_the_config\" name=\"then_we_can_test_the_config\"><\/a>Then we can test the config<\/h2>\n<div>\n<pre># cd \/var\/lib\/amavis\/maia\/scripts\r\n# .\/configtest.pl<\/pre>\n<p>\u201cNOT INSTALLED\u201d is OK for some modules.<\/p>\n<\/div>\n<h2><a id=\"import_the_spamassassin_rules\" name=\"import_the_spamassassin_rules\"><\/a>Import the Spamassassin rules<\/h2>\n<div>\n<pre># cd \/var\/lib\/amavis\/maia\/scripts\r\n# .\/load-sa-rules.pl<\/pre>\n<\/div>\n<div>\n<p>Install the Webinterface<\/p>\n<\/div>\n<div>\n<pre># mkdir \/home\/viaza132\/www\/ispcp\/gui\/tools\/antispam\r\n# cp -R \/usr\/src\/maia\/maia-1.0.2\/php\/* \/home\/viaza132\/www\/ispcp\/gui\/tools\/antispam<\/pre>\n<\/div>\n<h2><a id=\"copy_the_german_locales\" name=\"copy_the_german_locales\"><\/a>Copy the German locales<\/h2>\n<div>\nMust be changed to your language if you do not use German.<\/p>\n<pre># mkdir \/home\/viaza132\/www\/ispcp\/gui\/tools\/antispam\/locale\/de\r\n# cp -R \/usr\/src\/maia\/de\/* \/home\/viaza132\/www\/ispcp\/gui\/tools\/antispam\/locale\/de<\/pre>\n<\/div>\n<h2><a id=\"edit_the_configphp\" name=\"edit_the_configphp\"><\/a>Edit the config.php<\/h2>\n<div>\n<pre># cd \/home\/viaza132\/www\/ispcp\/gui\/tools\/antispam\r\n# mv config.php.dist config.php\r\n# vi config.php<\/pre>\n<\/div>\n<h2><a id=\"change_the_default_settings\" name=\"change_the_default_settings\"><\/a>Change the default settings<\/h2>\n<div>\n<p>(change &#8216;_YOUR_AMaVIS_PASS_ to your Pass)<\/p>\n<pre>$default_display_language = \"de\";\r\n$maia_sql_dsn = \"mysql:\/\/amavis:_YOUR_AMaVis_PASSd@tcp(localhost:3306)\/maia\";\r\n$address_rewriting_type = 4;\r\n$auth_method = \"pop3\";<\/pre>\n<\/div>\n<h1><a id=\"install_the_smarty_template_engine\" name=\"install_the_smarty_template_engine\"><\/a>12.) Install the SMARTY TEMPLATE ENGINE<\/h1>\n<div>\n<pre># cd \/usr\/src\/maia\/\r\n# wget http:\/\/www.smarty.net\/do_download.php?download_file=Smarty-2.6.20.tar.gz\r\n# tar -xzf Smarty-2.6.20.tar.gz\r\n# cd Smarty-2.6.20\/libs\r\n# mkdir \/home\/viaza132\/www\/ispcp\/gui\/tools\/antispam\/libs\/Smarty\r\n# cp -R .\/* \/home\/viaza132\/www\/ispcp\/gui\/tools\/antispam\/libs\/Smarty<\/pre>\n<p>Or <code>alternatively<\/code> on Debian \u2026<\/p>\n<pre>apt-get install smarty<\/pre>\n<p>and edit the following file<\/p>\n<pre># vi \/home\/viaza132\/www\/ispcp\/gui\/tools\/antispam\/config.php<\/pre>\n<p>uncomment the following line<\/p>\n<pre>$smarty_path = \"\/home\/viaza132\/www\/ispcp\/gui\/tools\/antispam\/libs\/Smarty\";<\/pre>\n<\/div>\n<h1><a id=\"install_the_modern_blue_theme\" name=\"install_the_modern_blue_theme\"><\/a>13.) Install the modern_blue Theme<\/h1>\n<div>\n<pre># mkdir \/home\/viaza132\/www\/ispcp\/gui\/tools\/antispam\/themes\/modern_blue\r\n# cp -R \/usr\/src\/maia\/modern_blue\/* \/home\/viaza132\/www\/ispcp\/gui\/tools\/antispam\/themes\/modern_blue<\/pre>\n<p>Then, if you loged in, into Maia Admin Panel, go to Themes (Key Icon), and add the modern_blue Theme from the below to the above Table. Than go to Settings and choose it as Theme<\/p>\n<\/div>\n<h2><a id=\"set_the_permissions\" name=\"set_the_permissions\"><\/a>Set the Permissions<\/h2>\n<div>\n<pre># chown -R vu2000:www-data \/home\/viaza132\/www\/ispcp\/gui\/tools\/antispam\r\n# chmod -R 555 \/home\/viaza132\/www\/ispcp\/gui\/tools\/antispam\r\n# chmod -R 755 \/home\/viaza132\/www\/ispcp\/gui\/tools\/antispam\/themes<\/pre>\n<\/div>\n<h1><a id=\"apache_meets_maia\" name=\"apache_meets_maia\"><\/a>14.) Apache meets Maia<\/h1>\n<div>\n<pre># cd \/etc\/apache2\/sites-available\/\r\n# vi 00_master.conf<\/pre>\n<p>After this:<\/p>\n<pre>Alias \/ftp    \/home\/viaza132\/www\/ispcp\/gui\/tools\/filemanger\/<\/pre>\n<p>add this line:<\/p>\n<pre>Alias \/antispam     \/home\/viaza132\/www\/ispcp\/gui\/tools\/antispam\/<\/pre>\n<\/div>\n<h2><a id=\"restart_apache\" name=\"restart_apache\"><\/a>Restart Apache<\/h2>\n<div>\n<pre># \/etc\/init.d\/apache2 restart<\/pre>\n<\/div>\n<h1><a id=\"test_the_gui\" name=\"test_the_gui\"><\/a>15.) Test the GUI<\/h1>\n<div>\nOpen this <acronym title=\"Uniform Resource Locator\">URL<\/acronym> on your Server: <a title=\"http:\/\/admin.yourserver.tld\/tools\/antispam\/admin\/configtest.php\" href=\"http:\/\/admin.yourserver.tld\/tools\/antispam\/admin\/configtest.php\" rel=\"nofollow\">http:\/\/admin.yourserver.tld\/tools\/antispam\/admin\/configtest.php<\/a><\/p>\n<p>Here should everything looks &#8216;OK&#8217;. If not install the needed modules with<\/p>\n<pre>pear install modulname<\/pre>\n<p>There is an error in PEAR::Image_Graph 0.7.2 that would be fixed in 0.7.3.<br \/>\nUp to then use this Patch \u2192[<a title=\"http:\/\/www.maiamailguard.org\/maia\/ticket\/326\" href=\"http:\/\/www.maiamailguard.org\/maia\/ticket\/326\" rel=\"nofollow\">http:\/\/www.maiamailguard.org\/maia\/ticket\/326<\/a>]<\/p>\n<p>Or you can download a patched Version:<\/p>\n<pre>cd \/usr\/share\/php\/Image\/Graph\/Plot\/\r\nmv Pie.php Pie.php.orig\r\nwget http:\/\/www200.pair.com\/mecham\/Pie.php.txt\r\nmv Pie.php.txt Pie.php<\/pre>\n<p>Does not need a OK:<\/p>\n<pre>PostgreSQL Support\r\nPEAR::Net_IMAP\r\nIMAP library\r\nLDAP library\r\nMCrypt library<\/pre>\n<\/div>\n<h1><a id=\"maia-amavis\" name=\"maia-amavis\"><\/a>16.) Maia-AMaVis<\/h1>\n<div>\nMaia need its own AMaVis, it\u00b4s a part of the package.<\/p>\n<pre># mv \/usr\/sbin\/amavisd-new \/usr\/sbin\/amavisd-bak\r\n# cp \/usr\/src\/maia\/maia-1.0.2\/amavisd-maia \/usr\/sbin\/amavisd-new\r\n# chown root \/usr\/sbin\/amavisd-new\r\n# chmod 755 \/usr\/sbin\/amavisd-new<\/pre>\n<\/div>\n<h1><a id=\"edit_the_spamassassin_config\" name=\"edit_the_spamassassin_config\"><\/a>17.) Edit the Spamassassin config<\/h1>\n<div>\n<pre># vi \/etc\/spamassassin\/local.cf<\/pre>\n<p>Add these lines on the end of the file and set your PW<\/p>\n<pre># Bayes database configuration\r\nuse_bayes 1\r\nbayes_store_module Mail::SpamAssassin::BayesStore::SQL\r\nbayes_sql_dsn DBI:mysql:maia\r\nbayes_sql_username amavis\r\nbayes_sql_password _YOUR_AMaViS_PASS_ # &lt;-- change '_YOUR_AMaViS_PASS_ to your Pass\r\nbayes_sql_override_username amavis\r\nbayes_auto_learn 1\r\nbayes_auto_learn_threshold_nonspam 0.1\r\nbayes_auto_learn_threshold_spam 10.0\r\nbayes_use_hapaxes 1\r\n#bayes_use_chi2_combining 1          # in newer versions unknown\r\nbayes_ignore_header ReSent-Date\r\nbayes_ignore_header ReSent-From\r\nbayes_ignore_header ReSent-Message-ID\r\nbayes_ignore_header ReSent-Subject\r\nbayes_ignore_header ReSent-To\r\nbayes_ignore_header Resent-Date\r\nbayes_ignore_header Resent-From\r\nbayes_ignore_header Resent-Message-ID\r\nbayes_ignore_header Resent-Subject\r\nbayes_ignore_header Resent-To\r\nbayes_ignore_header X-Received-From-IP\r\nbayes_ignore_header X-Virus-Scanned\r\nbayes_ignore_header X-Spam-Status\r\nbayes_ignore_header X-Spam-Level\r\nbayes_ignore_header X-Sender\r\nbayes_ignore_header X-Mailer\r\n# Auto-Whitelist configuration\r\nauto_whitelist_factory Mail::SpamAssassin::SQLBasedAddrList\r\nuser_awl_dsn DBI:mysql:maia\r\nuser_awl_sql_username amavis\r\nuser_awl_sql_password _YOUR_AMaViS_ # &lt;-- change '_YOUR_AMaVis_PASS_ to your Pass<\/pre>\n<\/div>\n<h2><a id=\"create_a_symlink_to_the_amavis_config\" name=\"create_a_symlink_to_the_amavis_config\"><\/a>Create a symlink to the AMaViS config<\/h2>\n<div>\n<pre># ln -s \/etc\/amavis\/amavisd.conf \/etc\/amavisd.conf<\/pre>\n<\/div>\n<h2><a id=\"restart_amavis\" name=\"restart_amavis\"><\/a>Restart AMaVis<\/h2>\n<div>\n<pre># \/etc\/init.d\/amavis restart<\/pre>\n<\/div>\n<h1><a id=\"register_as_maia-admin\" name=\"register_as_maia-admin\"><\/a>18.) Register as Maia-Admin<\/h1>\n<div>\nGo the the <acronym title=\"Uniform Resource Locator\">URL<\/acronym>:<br \/>\n<a title=\"http:\/\/admin.yourserver.tld\/tools\/antispam\/login.php?super=register\" href=\"http:\/\/admin.yourserver.tld\/tools\/antispam\/login.php?super=register\" rel=\"nofollow\">http:\/\/admin.yourserver.tld\/tools\/antispam\/login.php?super=register<\/a><\/p>\n<p>You have to register an existing Mailbox on your Server like admin@domain.tld or yourname@domain.tld. With this Login you are later the Maia-Admin and can control all.<\/p>\n<\/div>\n<h1><a id=\"maintenance_scripts\" name=\"maintenance_scripts\"><\/a>19.) Maintenance Scripts<\/h1>\n<div>\nMaia can learn and become fat.<br \/>\nSo we need some maintenance scripts in the cron<\/p>\n<pre>crontab \u2013u amavis -e<\/pre>\n<\/div>\n<h2><a id=\"insert_the_scripts\" name=\"insert_the_scripts\"><\/a>Insert the scripts<\/h2>\n<div>\n<pre>55 * * * * \/var\/lib\/amavis\/maia\/scripts\/process-quarantine.pl --learn --report\r\n1 * * * * \/var\/lib\/amavis\/maia\/scripts\/stats-snapshot.pl\r\n5 1 * * * \/var\/lib\/amavis\/maia\/scripts\/expire-quarantine-cache.pl\r\n@weekly \/var\/lib\/amavis\/maia\/scripts\/send-quarantine-reminders.pl\r\n15 1 * * * \/var\/lib\/amavis\/maia\/scripts\/send-quarantine-digests.pl<\/pre>\n<\/div>\n<h1><a id=\"the_utf-8_patch_optional\" name=\"the_utf-8_patch_optional\"><\/a>20.) The UTF-8 Patch (optional)<\/h1>\n<div>\nEdit: \/usr\/local\/share\/perl\/5.8.8\/Net\/Cmd.pm (5.8.8 can be any other <acronym title=\"Practical Extraction and Report Language\">Perl<\/acronym> version) and comment the following lines (389-393):<\/p>\n<pre>if ($doUTF8) {\r\n    # encode to individual utf8 bytes if\r\n    # $line is a string (in internal UTF-8)\r\n    utf8::encode($line) if utf8::is_utf8($line);\r\n  }<\/pre>\n<p>This problem occurs on <code><acronym title=\"Simple Mail Transfer Protocol\">SMTP<\/acronym> 2.20<\/code> and <code>above<\/code> and will rewrite all your mails in UTF-8. (Not good if send e.g. in <acronym title=\"International Organization for Standardization\">ISO<\/acronym>-8859-1).<\/p>\n<p>&#8211; Done<\/p>\n<\/div>\n<h1><a id=\"test_your_system\" name=\"test_your_system\"><\/a>21.) Test your System<\/h1>\n<div>\nYou can test your AnitSpam and AntiVirus system with these two lines.<\/p>\n<\/div>\n<h2><a id=\"the_gtube\" name=\"the_gtube\"><\/a>The GTUBE<\/h2>\n<div>\n<p>(Generic Test for Unsolicited Bulk Email)<br \/>\nSend this line per E-Mail to a User of your System.<br \/>\nShould recognize as SPAM with 1000 points in Spamassassian.<\/p>\n<pre>XJS*C4JDBQADN1.NSBN3*2IDNEN*GTUBE-STANDARD-ANTI-UBE-TEST-EMAIL*C.34X<\/pre>\n<\/div>\n<h2><a id=\"the_eicar_test-file\" name=\"the_eicar_test-file\"><\/a>The EICAR TEST-FILE<\/h2>\n<div>\nSend this line per E-Mail to a User of your System.<br \/>\nClamAV should recognize it as a Virus.<\/p>\n<pre>X5O!P%@AP[4\\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*<\/pre>\n<\/div>\n<h1><a id=\"delete_the_admin_subdirectory\" name=\"delete_the_admin_subdirectory\"><\/a>22. Delete the admin subdirectory<\/h1>\n<div>\n<p>The <acronym title=\"Hypertext Preprocessor\">PHP<\/acronym> scripts installed earlier included a number of administration scripts in the admin subdirectory. Once you&#8217;ve got Maia Mailguard up and running properly, you no longer need these scripts, and should delete that subdirectory and its contents as a security precaution, so that web visitors cannot access those scripts.<\/p>\n<p>Useful Links<br \/>\n<a title=\"http:\/\/www.maiamailguard.com\/maia\/wiki\/Install\" href=\"http:\/\/www.maiamailguard.com\/maia\/wiki\/Install\" rel=\"nofollow\">http:\/\/www.maiamailguard.com\/maia\/wiki\/Install<\/a><br \/>\n<a title=\"http:\/\/www.bluevisiontec.com\/Maia_Mailguard.pdf\" href=\"http:\/\/www.bluevisiontec.com\/Maia_Mailguard.pdf\" rel=\"nofollow\">http:\/\/www.bluevisiontec.com\/Maia_Mailguard.pdf<\/a> \u2013&gt; The original Document in German<\/p>\n<p>To do:<br \/>\n&#8211; HowTo patch 1.0.2 \u2192 1.0.2a <a title=\"http:\/\/www.maiamailguard.org\/maia\/ticket\/479\" href=\"http:\/\/www.maiamailguard.org\/maia\/ticket\/479\" rel=\"nofollow\">http:\/\/www.maiamailguard.org\/maia\/ticket\/479<\/a><br \/>\n&#8211; Upgrade HowTo <a title=\"http:\/\/www.maiamailguard.com\/maia\/wiki\/UpgradeFrom1-0-x\" href=\"http:\/\/www.maiamailguard.com\/maia\/wiki\/UpgradeFrom1-0-x\" rel=\"nofollow\">http:\/\/www.maiamailguard.com\/maia\/wiki\/UpgradeFrom1-0-x<\/a><br \/>\n&#8211; Add RulesDuJour Script<br \/>\n&#8211; Add Digest <acronym title=\"Structured Query Language\">SQL<\/acronym> Script<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>0.) Conditions You need Debian Squeeze 6.0 and a running ispCP Omega on your System 1.) Stop postfix # \/etc\/init.d\/postfix stop 2.) Update your packages and install some new one # apt-get update &amp;&amp; apt-get upgrade # apt-get install libdbd-mysql-perl libdbi-perl libphp-jpgraph libossp-uuid-perl php-pear 3.) Recommended pear-modules # pear upgrade-all #Errors could be ignored # [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[74],"tags":[40,76,78,75,77,72],"class_list":["post-182","post","type-post","status-publish","format-standard","hentry","category-servidor-de-e-mail","tag-configuracao","tag-e-mail","tag-maia","tag-mail","tag-mx","tag-servidor"],"_links":{"self":[{"href":"https:\/\/blog.clusterweb.com.br\/index.php?rest_route=\/wp\/v2\/posts\/182","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.clusterweb.com.br\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.clusterweb.com.br\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.clusterweb.com.br\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.clusterweb.com.br\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=182"}],"version-history":[{"count":1,"href":"https:\/\/blog.clusterweb.com.br\/index.php?rest_route=\/wp\/v2\/posts\/182\/revisions"}],"predecessor-version":[{"id":183,"href":"https:\/\/blog.clusterweb.com.br\/index.php?rest_route=\/wp\/v2\/posts\/182\/revisions\/183"}],"wp:attachment":[{"href":"https:\/\/blog.clusterweb.com.br\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=182"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.clusterweb.com.br\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=182"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.clusterweb.com.br\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=182"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}