Kolab 2.2 addressbook export as spamassassin whitelist
Stefan Bambach
sbambach at gmx.net
Tue Oct 21 20:30:14 CEST 2008
Hi,
> As the address book is stored in an imap folder, maybe you can:
>
> 1. Use inotify to be notified about changes.
> 2. Login with cyrus' master password.
> 3. For every user (or maybe only you), get the last emails with vcards
> 4. Parse them and add everything into spamassassin.
>
> I've done 2. and something like 3 with perl's Imap::Admin. I'm sure there
> should be something similar for your preferred language.
nice idea with inotify... adapted my shell script for inotify support
(grep/awk)...
solved with something like (snippet):
inotifywait -e modify -e delete -e create --format '%w %e %f' <DIR>
grep -h smtp-address <DIR>/* | awk -F">" '{print $2}' | awk -F"</" '{print
$1}' | sort | uniq > whitelist_sender
and:
read_hash(\%whitelist_sender, '/kolab/var/amavisd/whitelist_sender');
activated in amavisd.conf.
If I'll have more spare time, I will replace my simple shell script with a
more accurate scripting language with imap admin methods (I don't know perl;
I think the only well known language I do not know :-( I should really get in
touch with it. There are really many tools and libs out there, that would
help me in such cases. And this would be a small project to play with it)
thx to all.
ciao. Stefan
>
> Just my 2 cents
> -- Diego.
>
> >>> If its just for you I'd just export the addresses once in a while and
> >>
> >> run it through a scripted converter to get the addresses whitelisted.
> >
> > Would be no problem. But No. I know that I will forget to do that ;-)
> >
> > What about adapting a java,python,groovy,C, ... client, that can connect
> > to
> > kolab and export the data? perhaps one of the connectors for other
> > groupwares ?
> >
> > Perhaps an simple imap client, that extract the attachments and than
> > parse the
> > xml?
>
> _______________________________________________
> Kolab-users mailing list
> Kolab-users at kolab.org
> https://kolab.org/mailman/listinfo/kolab-users
More information about the users
mailing list