/docs/source/install_fedora.txt
Plain Text | 169 lines | 110 code | 59 blank | 0 comment | 0 complexity | 63c75732ae2ea0d8d94fa3185c5b7db3 MD5 | raw file
Possible License(s): GPL-2.0
1.. _installfedora: 2 3================ 4Baruwa on Fedora 5================ 6 7The Baruwa rpm that is provided only supports apache out of the 8box, if you are running a different web server, please install 9from source or rebuild the source rpm to support your web server. 10 11Baruwa rpm install 12================== 13 14Install the dojo rpm from http://topdog-software.com/oss/dojo/:: 15 16 # yum --nogpgcheck localinstall dojo-1.4.3-1.fc13.noarch.rpm 17 18Download the rpm from http://www.topdog-software.com/oss/baruwa/ 19 20Then proceed and install the rpm:: 21 22 # yum --nogpgcheck localinstall baruwa-<version>.noarch.rpm 23 24Create the database:: 25 26 # mysqladmin -u root -p create baruwa 27 28Create the database user:: 29 30 mysql> GRANT ALL ON baruwa.* TO baruwa@localhost IDENTIFIED BY '<password>'; 31 mysql> flush privileges; 32 33Configure MailScanner 34===================== 35 36It is assumed that you have a working MailScanner system already installed 37and configured, if you are installing from scratch please refer to their 38documentation on how to install and configure MailScanner. 39 40Edit /usr/lib/baruwa/BaruwaSQL.pm and set the variables:: 41 42 my ($db_name) = 'baruwa'; 43 my ($db_host) = 'localhost'; 44 my ($db_user) = 'baruwa'; 45 my ($db_pass) = '<password>'; 46 my ($sqlite_db) = "/var/spool/MailScanner/incoming/baruwa.db"; 47 48Next edit the MailScanner config file /etc/MailScanner/MailScanner.conf, 49you need to make sure that the following options are set:: 50 51 Quarantine User = exim (Or what ever your "Run As User" is set to) 52 Quarantine Group = apache (or your webserver user if not apache) 53 Quarantine Permissions = 0660 54 Quarantine Whole Message = yes 55 Quarantine Whole Message As Queue Files = no 56 Detailed Spam Report = yes 57 Include Scores In SpamAssassin Report = yes 58 Always Looked Up Last = &BaruwaSQL 59 60To actually quarantine and later process messages with in baruwa, set 61'store' as one of your keywords for the "Spam Actions" and 62"High Scoring Spam Actions" MailScanner options 63 64**Integrate SQL Blacklists/Whitelists** 65 66Edit /usr/lib/baruwa/BaruwaLists.pm and set the variables:: 67 68 my ($db_name) = 'baruwa'; 69 my ($db_host) = 'localhost'; 70 my ($db_user) = 'baruwa'; 71 my ($db_pass) = '<password>'; 72 73Next edit the MailScanner config file /etc/MailScanner/MailScanner.conf, and 74set the following options:: 75 76 Is Definitely Not Spam = &BaruwaWhitelist 77 Is Definitely Spam = &BaruwaBlacklist 78 79**Integrate per user settings** 80 81Edit /usr/lib/baruwa/BaruwaUserSettings.pm and set the variables:: 82 83 my ($db_name) = 'baruwa'; 84 my ($db_host) = 'localhost'; 85 my ($db_user) = 'baruwa'; 86 my ($db_pass) = '<password>'; 87 88Link the BaruwaUserSettings module:: 89 90 ln -s /usr/lib/baruwa/BaruwaUserSettings.pm /usr/lib/MailScanner/MailScanner/CustomFunctions/ 91 92Edit the MailScanner config file /etc/MailScanner/MailScanner.conf, and 93set the following options:: 94 95 Required SpamAssassin Score = &BaruwaLowScore 96 High SpamAssassin Score = &BaruwaHighScore 97 98If you want users to be able to turn off spam checks for their own profiles, 99set the following options:: 100 101 Spam Checks = &BaruwaShouldScan 102 103**Apply configuration changes** 104 105Restart up MailScanner:: 106 107 # /etc/init.d/MailScanner restart 108 109**Verify that is working** 110 111Check your log files you should see 112 113Baruwa SQL logger:: 114 115 Aug 9 18:58:27 localhost MailScanner[8470]: Logging message 1OiVg7-0003zS-9s to Baruwa SQL 116 Aug 9 18:58:27 localhost MailScanner[11052]: 1OiVg7-0003zS-9s: Logged to Baruwa SQL 117 118Baruwa Lists:: 119 120 Aug 9 18:32:42 localhost MailScanner[27260]: Starting Baruwa whitelists 121 Aug 9 18:32:42 localhost MailScanner[27260]: Read 6 whitelist items 122 Aug 9 18:32:42 localhost MailScanner[27260]: Ip blocks whitelisted 192.168.1.0/24 192.168.2.0/24 xxx.xx.xxx.0/26 123 124Baruwa User settings:: 125 126 Aug 9 15:00:03 localhost MailScanner[25708]: Baruwa - Populating spam score settings 127 Aug 9 15:00:03 localhost MailScanner[25708]: Read 1 spam score settings 128 Aug 9 14:59:53 localhost MailScanner[25668]: Baruwa - Populating high spam score settings 129 Aug 9 14:59:53 localhost MailScanner[25668]: Read 1 high spam score settings 130 131Configure Baruwa 132================ 133 134Edit the baruwa settings.py:: 135 136 # baruwa_path=$(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()") 137 # vi $baruwa_path/baruwa/settings.py 138 139And set the mysql database details:: 140 141 DATABASE_ENGINE = 'mysql' 142 DATABASE_NAME = 'baruwa' 143 DATABASE_USER = 'baruwa' 144 DATABASE_PASSWORD = '<baruwa_password>' 145 DATABASE_HOST = 'localhost' 146 147Create the baruwa admin user and populate the database:: 148 149 # $baruwa_path/baruwa/manage.py syncdb 150 151Edit the settings.py file and make configuration changes to suit your site.:: 152 153 # vi $baruwa_path/baruwa/settings.py 154 155**Setup Web server** 156 157Edit your apache configurations to enable virtual hosting if 158not enabled already. Then set the correct hostname in 159/etc/httpd/conf.d/baruwa.conf:: 160 161 # change to your hostname 162 ServerName baruwa-alpha.local 163 164Make sure mod_wsgi is enabled, uncomment the following line in 165/etc/httpd/conf.d/wsgi.conf:: 166 167 LoadModule wsgi_module modules/mod_wsgi.so 168 169Restart apache and point your browser to the hostname url.