Can we return to this, please? There's still something not right. Here are the instructions from Policyd to make this work:
* Optional Amavisd Supprt ***
8. Copy your amavisd from /usr/sbin/amavisd and patch it with contrib/amavisd-new-2.5.3_policyd-200802070918.patch like this...
$ patch < contrib/amavisd-new-2.5.3_policyd-200802070918.patch
After this change your initscripts to start the patched amavisd.
9. Copy amavisd-policyd.pm where you see fit, and add this configuration line to your amavisd.conf file...
10. Edit the top of amavisd-policyd.pm and change ...
use lib('/root/cluebringer-trunk'); # to point to the directory which contains cbp/
my $DB_dsn = "DBI:mysql:database=policyd;host=localhost"; # to point to your MySQL DB
Originally, I thought I only needed to do step 8, which I did as I described in my earlier post #5. Later, I realized that I needed to do steps 9 and 10 as well.
Step 9 left me a little confused at first -- where is this amavisd-policyd.pm file, I wondered? Then I realized that I needed to download it from http://devlabs.linuxassist.net/projects … olicyd.pm.
Not really being sure what "where you see fit" ought to be, I searched for the locations of other .pm files related to Cluebringer. On Debian 7, these are located in /usr/lib/postfix-cluebringer/cbp/. So I placed the file here.
However, step 9 is still confusing -- on Debian, there is no single amavisd.conf file. Instead, there are several files located in /usr/amavis/conf.d. It would appear that iRedMail creates the file 50-user. However, there's a warning at the top that says "Do not modify anything below this line."
How do I finish step 9 properly?
The first requirement in step 10 is reasonably self-explanatory. Because the only cbp/ on the system is /usr/lib/postfix-cluebringer/cbp/, the line I added is:
The second requirement in step 10 assumes the system is running MySQL. I'm using PostgreSQL. Therefore, I added the following line:
my $DB_dsn = "DBI:Pg:host=127.0.0.1;database=cluebringer;user=cluebringer;password=...";
I am still not seeing my custom spam rules in effect. It's probably because I can't figure out how to complete step 9 properly, and because I'm uncertain whether my DB_dsn in step 10 is correct (I have included the password; is that necessary?).
Some additional advice would be much appreciated. Thanks.