personal spam folder

Gunnar Wrobel wrobel at pardus.de
Fri Dec 7 12:45:59 CET 2007


Krzysztof Matusik <kyf at arterm.pl> writes:

> Dnia czwartek 22 listopad 2007, Alain Spineux napisał:
>
>> > I'd like to setup kolab (amavis, postfix or cyrus or anything suitable)
>> > to transfer emails marked as spam by filters to personal folders in each
>> > users account independently.
>> > How can I do it? Is there a simple way (I couldn't find such googling) ?
>> > Do I need to setup sieve or something? How can I make "spam" folder for
>> > each account easy/automatically?
>> > How can I set up a rule to clean all spam emails in such folders if older
>> > than period of time?
>> >
>> > Has anyone such mechanism implemented and willing to share please.
>>
>> I'm surprised their is nothing about this in the kolab wiki.
>>
>> Here is an idea
>>
>> set "addr_extension_spam" in amavisd.conf (be carrefull to edit the
>> template and run kolabconf)
>> to the name of the folder you want (I will call it 'spam' ) . This
>> will 'rewrite' the recipient address from
>> user at domain to user+spam at domain.
>>
>> Then each user must create a so named folder in its INBOX and give the
>> 'p' right to 'anyone' to
>> authorize plus addressing.
>> If the user don't do that, SPAM will continue to be delivered into the
>> INBOX.
>>
>> Unsig cyradm you can setup the 'expire' attribute of these subfolder
>> 'spam'  to 15 days
>> and cyr_expir that is ran one a day will automaticaly any mail older
>> than 15 days.
>>
>> If you dont want to use 'expire' attribute, you can use ipurge command
>> to delete mails to oold or too big in  some mailboxes.
>>
>> You can automate the use of cyradm using scripting, like in
>>
>> for user in user1 user2 ; do
>>     echo createmailbox user/$user/spam at example.com
>>     echo sam user/$user/spam at example.com anyone p
>>     echo mboxcfg user/$user/spam at example.com
>> done | cyradm -u manager --password ***** localhost
>>
>> Hope this help
>>
>> Please report any success or comment about this procedure.
>
> Hi
> I've tested it a bit and it seems to work perfectly.
> I'd like to mention that I'm using debian/lenny prepackaged kolab and amavis. 
> Amavis' config is not modified by kolabd templates here. Other things should 
> be irrevelant.
>
> Here's what I've actually done.
> -additional config file /etc/amavis/conf.d/55-kolab to override default debian 
> settings, with lines:
>
> $final_spam_destiny       = D_PASS;
> $addr_extension_spam = 'spam';
> $recipient_delimiter = '+';
>
> and shell script file consisting of:
>
> #! /bin/sh
> for user in $2 ; do
> echo "createmailbox user/$user/spam@$1"
> echo "sam user/$user/spam@$1 anyone p"
> echo "mboxcfg user/$user/spam@$1 expire 28"
> done | /usr/bin/cyradm -u manager --password SECRET localhost
>
> to pass domain as first arg and user/(users in a list) as second arg.
>
> This seems to be flawless but I'm concerned about security issues 
> regarding 'spam' folder ACL. I'm not IMAP specialist- what are the threats if 
> the kolab server is 'somehow public'. I'm thinking now about a thing I 
> haven't tested yet- can I somehow give write permision to user 'amavis'  
> (amavis process uid) or maybe I should use 'postfix' and expect better 
> security?

The folders you mark with "anyone p" are not "public" in the sense you
assume here. All you do when setting them to "p" is to allow direct
posts in the form of user+folder at example.com. Nothing more.

To make such an IMAP folder really public you'd have to assign at
least listing rights ("l") for the folder. Otherwise it is not seen
from the outside.

Cheers,

Gunnar

-- 
______ http://kdab.com _______________ http://kolab-konsortium.com _

p at rdus Kolab work is funded in part by KDAB and the Kolab Konsortium

____ http://www.pardus.de _________________ http://gunnarwrobel.de _
E-mail : p at rdus.de                                 Dr. Gunnar Wrobel
Tel.   : +49 40 432 72335                           Bundesstrasse 29
Fax    : +49 40 432 70855                            D-20146 Hamburg
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   >> Mail at ease - Rent a kolab groupware server at p at rdus <<                 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~




More information about the users mailing list