![]() |
|
Spamassassin hack - Printable Version +- ZenphotoCMS Forum (https://forum.zenphoto.org) +-- Forum: Support (https://forum.zenphoto.org/forum-1.html) +--- Forum: General support (https://forum.zenphoto.org/forum-4.html) +--- Thread: Spamassassin hack (/thread-1452.html) |
Spamassassin hack - TheBLIONCorp - 2007-05-27 Hello, I tried to install Akismet on my zenphoto album. The installation was successfull, but spam did not decrease... ==> removed! As I am filtering mails with spamassassin, I was wondering if it would be possible to filter my Zenphoto comments with it :-) I found "Bad behaviour"... I downloaded it... I did understand nothing... ===> removed! So... I did the work :-) The hack adds one file and modifies 2 files:
How it works is quite easy:
You can find the result of my work here: http://www.hebergement-pro.org/zenphoto/spamassassin/ TODO: socket implementation... As I didn't find any spamassassin socket on my box, I didn't try to use it :-) What do you think about this piece of code? Spamassassin hack - TheBLIONCorp - 2007-05-29 Here is a sample of what my logs look like May 29 10:28:11 serveur spamd[18625]: spamd: checking message for daemon:1 ==> It works fine now :-) Spamassassin hack - TheBLIONCorp - 2007-06-08 Jun 8 17:36:05 serveur spamd[31873]: spamd: connection from serveur [127.0.0.1] at port 37068 ==> Perfect Spamassassin hack - Boon - 2007-06-19 Man, this sounds totally cool! I will try it out on my ZP gallery tonight Spamassassin hack - lasse - 2007-06-20 hi.. Spamassassin hack - TheBLIONCorp - 2007-06-21 lasse : in the folder, you have 3 files : zp-config.php ==> include this near the end of your zp-config file... It should have included all the stuff needed to include spamassassin... Spamassassin hack - TheBLIONCorp - 2007-07-21 Hello, I updated functions-spam.php to fix some things:
I was a little bit confused by one thing: when the comment is approved, a mail is sent to the administrator... and this mail contains some errors... (most of them should be easy to fix, as it's about conversion and MIME format) Spamassassin hack - TheBLIONCorp - 2007-09-03 I updated functions-spam.phps (http://www.hebergement-pro.org/zenphoto/spamassassin/functions-spam.phps). When building the "Received: " header, I have to match the following rules:
I have absolutely no idea of the way it will behave with IPv6 IP... With these changes, I have the following result: As you can see, it works with the latest stable version of spamassassin. Spamassassin hack - TheBLIONCorp - 2007-11-03 Hello all :-) I wrote the Spamassassin plugin for the latest zenphoto version... You can find the result of my work here: http://www.hebergement-pro.org/zenphoto/spamassassin/ With 1.0.x versions of zenphoto, you have to modify class-image.php... In both cases, you have to modify the zp-config.php file in order to add some specific variables. In the future, I think I will modify this plugin to store every setting in the database instead of the config file. So, now... Let's play with it Spamassassin hack - TheBLIONCorp - 2007-11-03 Be careful: I opened this ticket to fix a small issue: http://www.zenphoto.org/trac/ticket/269 Spamassassin hack - sbillard - 2007-11-04 TheBLIONCorp: You can add parameters fairly easily by adding calls to setOptionDefault() in you plugin. This creates them as plugin options. (I tried to download your work, but apparently your zenphoto thinks I am trying to browse to an image!) Spamassassin hack - TheBLIONCorp - 2007-11-04 Hi, Strange... On several computers, I tested and I have the good listing... I use setOptionDefault and getOption to fetch values I need for moderation, for example. I rewrote the module this afternoon, I will think about it during the next days. I'm a little bit disappointed... Nobody seems to use this plugin except me Spamassassin hack - sbillard - 2007-11-04 The link worked fine this time. Thanks. Spamassassin hack - sbillard - 2007-11-05 I've updated this to work with the pending 1.1.1 release of Zenphoto. I have also moved the configuration information from zp-config to database options. Do you have any objections for adding this into the release? You might get some support requests. I don't think my server has SpamAssassin, anyway, I have not tested the actual filtering of messages. Spamassassin hack - TheBLIONCorp - 2007-11-06 Hello, Sure, you can add it to the next release, I opened this thread to share my work. Just for information, what will change in 1.1.1? Spamassassin hack - sbillard - 2007-11-06 The zp_conf() function has been removed. Version 1.1 added in the getOption() function, but it took a while to fix all the places so that only the database user/password/prefix are set in zp-config.php. Spamassassin hack - TheBLIONCorp - 2007-11-06 OK ! So there is a good reason to use the database now :-D Spamassassin hack - TheBLIONCorp - 2007-11-07 Updated the 1.1 version. This one will be ready for 1.1.1. Major changes:
Thanks to sbillard for the help and the integration in the next release. If you want to update this plugin, take care of the options you will have to fill in the admin panel ;-) |