From: Reinaldo de Carvalho on
On Wed, May 12, 2010 at 6:51 PM, Take <take(a)nerd.fi> wrote:
> On 05/12/2010 06:55 PM, Dennis Guhl wrote:
>> I don't know if cyrus can do something similar, but I think you want
>> something like sieve_before in Dovecot:
>
> I wish it could, but it can't. I found this as well, but change to
> dovecot isn't something we'd like to do. So this doesn't help either.
>

You can use Korreio or sievelib (part of python-cyrus) to put/active a
sieve script for all (each) users. But sieve is the way.

--
Reinaldo de Carvalho
http://korreio.sf.net
http://python-cyrus.sf.net

"Don't try to adapt the software to the way you work, but rather
yourself to the way the software works" (myself)

From: mouss on
Take a �crit :
> Hello!
>
> I've been trying to figure out the best way to drop/sort spam with
> virtual users. All documentation I could find didn't fit to our virtual
> configuration and I'm a bit confused what's the best way to drop spam.
>
> Our setup is postfix+cyrus-imapd+spamassassin. Users have access to
> sieve via roundcube plugin and we'd like to keep sieve out of this anyways.
>
> The goal is to apply an filter based on SA's score, so that if the score
> is > 10 drop the mail and if it's less than 10 but still spam, deliver
> it to user/myser/INBOX.Junk. The latter is optional step, main priority
> is to drop "certain spam" (score over 10) so that user won't ever see it.
>

your best option is to use amavisd-new, which has all the necessary
functionality and more.

otherwise, if you are calling SA from a script, and then using the
sendmail command to resubmit mail after filtering, then you can

- add an smtpd listener, say on port 10125 as well as an associated
leanup service

- configure this cleanup service to use specific header_checks

- in these header checks, use something like:

/^X-Spam-Status: No, score=\d{2}/ HOLD

HOLD will put the mail on hold, and you can then review it, discard it,
inspect it, ... using postcat and postsuper.

PS. you could use DISCARD if you feel confident. if so, remember: it's
your mail, not mine. if you lose mail, I won't even feel sorry I could,
but I would be a liar) ;-p


> [snip]
>
> Besides the actual goal I'm interested about the efficiency with each
> method. I'd like to maintain lmtp-like delivery so that postfix doesn't
> have to spawn processes for each and every mail going trough.
>

with amavisd-new, you would have a daemon doing spamassassin (without
forking a spamc process) and doing more (configurable delivery options,
.... etc).

From: mouss on
mouss a �crit :
> Take a �crit :
>> Hello!
>>
>> I've been trying to figure out the best way to drop/sort spam with
>> virtual users. All documentation I could find didn't fit to our virtual
>> configuration and I'm a bit confused what's the best way to drop spam.
>>
>> Our setup is postfix+cyrus-imapd+spamassassin. Users have access to
>> sieve via roundcube plugin and we'd like to keep sieve out of this anyways.
>>
>> The goal is to apply an filter based on SA's score, so that if the score
>> is > 10 drop the mail and if it's less than 10 but still spam, deliver
>> it to user/myser/INBOX.Junk. The latter is optional step, main priority
>> is to drop "certain spam" (score over 10) so that user won't ever see it.
>>
>
> your best option is to use amavisd-new, which has all the necessary
> functionality and more.
>
> otherwise, if you are calling SA from a script, and then using the
> sendmail command to resubmit mail after filtering, then you can
>
> - add an smtpd listener, say on port 10125 as well as an associated
> leanup service
>
> - configure this cleanup service to use specific header_checks
>
> - in these header checks, use something like:
>
> /^X-Spam-Status: No, score=\d{2}/ HOLD
>

I forgot:

- the smtpd listener should have "-o content_filter=" (to avoid passing
the mail to content filter again)

- configure sendmail to use the smtpd as a content_filter. do this by
adding a -o content_filter to the "pickup" service in master.cf


> HOLD will put the mail on hold, and you can then review it, discard it,
> inspect it, ... using postcat and postsuper.
>
> PS. you could use DISCARD if you feel confident. if so, remember: it's
> your mail, not mine. if you lose mail, I won't even feel sorry I could,
> but I would be a liar) ;-p
>
>
>> [snip]
>>
>> Besides the actual goal I'm interested about the efficiency with each
>> method. I'd like to maintain lmtp-like delivery so that postfix doesn't
>> have to spawn processes for each and every mail going trough.
>>
>
> with amavisd-new, you would have a daemon doing spamassassin (without
> forking a spamc process) and doing more (configurable delivery options,
> ... etc).

From: mouss on
Kaleb Hosie a �crit :
>> [snip]
>>
>
> What we have done in our organization is started Using SpamAssassin
> Quarantine. It runs SA as well as scans it for viruses. If it's detected as
> possible spam, it holds it in quarantine.
>

I see (at least) two problems:
- this forkes a perl program for each message.
- it opens a connection to mysql for each message.

compare this with amavisd-new (or other daemons that do similar things).

> Each day the users get an email with a list of emails in quarantine and the
> ability to release it using a web link.
>
> It's pretty neat and our users love it. Here is the sourceforge link if your
> interested:
> http://sourceforge.net/projects/saq/
>
> If you need help installing it, feel free to contact me personally and I can
> help you.