Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
installing [2012-06-07 09:31] – created randerson | installing [2013-12-06 08:47] (current) – Fix formatting rspencer | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | * Set up your database | + | ====== Installing ====== |
- | | + | |
- | | + | Set up your database. |
+ | |||
+ | In database/ run the following: | ||
+ | |||
+ | <code bash> | ||
+ | for i in core.tsql access_control.tsql quotas.tsql amavis.tsql checkhelo.tsql checkspf.tsql greylisting.tsql accounting.tsql | ||
do | do | ||
./ | ./ | ||
- | done > policyd.sql</ | + | done > policyd.sql |
- | | + | </ |
- | | + | |
- | | + | This will build policyd.mysql, |
+ | |||
+ | Load policyd.mysql into your database, in this case MySQL: | ||
+ | |||
+ | <code bash> | ||
+ | mysql -u root -p policyd < policyd.mysql | ||
+ | </ | ||
+ | |||
+ | Move cluebringer.conf to your /etc directory and edit your database details in cluebringer.conf. | ||
+ | |||
+ | Copy the cbp/ & awitpt/ directories into / | ||
+ | |||
+ | <code bash> | ||
+ | mkdir / | ||
+ | cp -r cbp / | ||
+ | cp -r awitpt/ | ||
+ | </ | ||
+ | |||
+ | Copy cbpolicyd and cbpadmin into / | ||
+ | |||
+ | <code bash> | ||
+ | cp cbpadmin / | ||
+ | cp cbpolicyd / | ||
+ | </ | ||
+ | |||
+ | Setup system directories: | ||
+ | |||
+ | <code bash> | ||
+ | mkdir / | ||
+ | mkdir / | ||
+ | </ | ||
+ | |||
+ | If you are running cbpolicyd as an unprivileged user, then: | ||
+ | |||
+ | <code bash> | ||
+ | chown cbpolicyd.cbpolicyd / | ||
+ | </ | ||
+ | |||
+ | Install the webui/ | ||
+ | |||
+ | Setup Postfix to use cbpolicyd. | ||
- | | + | Add the following Postfix config setting in **BOTH** smtpd_recipient_restrictions |
- | * Copy the cbp/ & awitpt/ directories into / | + | < |
- | * < | + | check_policy_service inet: |
- | cp -r cbp / | + | </ |
- | cp -r awitpt/ | + | |
- | * Copy cbpolicyd and cbpadmin into / | + | It's recommended to add these parameters first, i.e.: |
- | * <code bash>cp cbpadmin / | + | |
- | cp cbpolicyd / | + | |
- | * Setup system directories | + | < |
- | * < | + | smtpd_recipient_restrictions = check_policy_service inet: |
- | mkdir / | + | </ |
- | * If you are running cbpolicyd as an unprivileged user, then | + | ===== Optional Amavisd Support ===== |
- | * <code bash> | + | |
- | * Install the webui/ | + | Copy your amavisd from /usr/ |
- | * Setup Postfix to use cbpolicyd | + | < |
- | * Add the following Postfix config setting in /BOTH/ smtpd_recipient_restrictions and smtpd_end_of_data_restrictions | + | patch < contrib/ |
- | * < | + | </ |
- | __Optional Amavisd Support__ | + | Change your initscripts to start the patched amavisd. |
- | * Copy your amavisd from / | + | Copy amavisd-policyd.pm where you see fit, and add this configuration line to amavisd.conf: |
- | * <code bash> | + | |
- | * Change your initscripts | + | <code perl> |
+ | include_config_files('/ | ||
+ | </ | ||
- | * Copy amavisd-policyd.pm | + | Edit the top of amavisd-policyd.pm and change: |
- | * <code perl> | + | |
- | * Edit the top of amavisd-policyd.pm and change: | + | <code perl> |
- | * <code perl>use lib('/ | + | use lib('/ |
- | my $DB_dsn = " | + | my $DB_dsn = " |
+ | </ | ||
- | * Fire everything up and browse to the web gui to set up policyd | + | Fire everything up and browse to the web gui to set up policyd. |