You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Gino Semseo <sp...@semseoymas.org> on 2014/01/09 17:33:24 UTC

Re: Spamassassin Child is just dying without advise...

Hello Martin:

THANKS SO MUCH!!!

I have had modified your code, so being useful at my platform with 
MySQL... also adding some code for wildcards, as *@domain.tld.

..... needed to cpan install and use Email::Address
.....
my ($mailaddr) = Email::Address->parse($aa);
my $dominio = $mailaddr->host;
$pms->{SENTwhitelist_senders} .= ' OR ' if 
($pms->{SENTwhitelist_senders});
$pms->{SENTwhitelist_senders} .= "email = '$aa' OR email = 
'*@".$dominio."'";

I will share the code and post it somehow or via answering this email..

At the moment, it is running perfectly!!! Thanks!

:)


---
--

Gino
semseoymas

El 2013-12-02 19:47, Martin Gregorie escribió:
> On Mon, 2013-12-02 at 14:34 +0100, Gino Semseo wrote:
> 
>> PD: Martin, I am not an experienced programmer, and all I do is bash
>> scripting to get success about the whitelist_from file... I am sure 
>> you
>> are true about programming a module doing this, but I cannot do it 
>> right
>> now. ;)
>> 
> My plugin was written by modifying one I found on the 'net: its
> reasonably documented and should be easy enough to modify. Its a Perl
> module that uses an SQL query to query a view in my mail archive, which
> is implemented as a PostgreSQL database. It looks up the message's
> sender to see if we've previously sent them any e-mails. If we have, 
> the
> message gets whitelisted by the associated SA rule. The view makes the
> sender details appear like a single table to the plugin, so it should
> need minimal changes to work with your whitelist. Off the top of my 
> head
> you'd need to do something like this:
> 
> - rename all three files, plugin and rules to something meaningful
>   for your installation
> 
> - change the name of the table and the fields in it to match your
>   database.
> 
> - double check that the database has indexes that support
>   this query or it may run very slowly. Copy the SQL query and
>   run it by hand in an interactive SQL session to test that it works
>   and that its fast enough.
> 
>   This is an important step due to differences between Postgres
>   and mysql: Postgres speaks one of the most standards-compliant SQL
>   dialects while mysql speaks one of the most non-standard dialects
>   around. Hopefully this won't be a problem with such a simple query.
> 
> - change the user/password/database name etc to match your
>   installation
> 
> Anybody with some knowledge of Perl and SQL should be able to help you
> get the plugin up and running.
> 
> The files can be found here:
> http://www.libelle-systems.com/downloads/maplugin
> 
> 
> Martin