Discussion:
sa-learn using event notifications
Luca Olivetti
2018-03-12 16:44:18 UTC
Permalink
I wrote a simple program that manages the vnd.cmu.MessageMove event to
run sa-learn when a message is moved into or out of the spam folder.
I'm processing it synchronously (i.e., the program starts spawned by
notifyd and doesn't terminate until sa-learn exits).
Given that sa-learn takes a few seconds to run, could it lead to
problems? Should I devise a different strategy (i.e. queue sa-learn to
run later/asynchronously)?
I don't have many users (around 100 active sessions).

Bye
--
Luca Olivetti
Wetron Automation Technology http://www.wetron.es/
Tel. +34 93 5883004 (Ext.3010) Fax +34 93 5883007
Arnaldo Viegas de Lima
2018-03-12 17:07:59 UTC
Permalink
I run a separate daemon that periodically checks the spam folder, perform the necessary “training” actions and then remove the message.
I wrote a simple program that manages the vnd.cmu.MessageMove event to run sa-learn when a message is moved into or out of the spam folder.
I'm processing it synchronously (i.e., the program starts spawned by notifyd and doesn't terminate until sa-learn exits).
Given that sa-learn takes a few seconds to run, could it lead to problems? Should I devise a different strategy (i.e. queue sa-learn to run later/asynchronously)?
I don't have many users (around 100 active sessions).
Bye
--
Luca Olivetti
Wetron Automation Technology http://www.wetron.es/
Tel. +34 93 5883004 (Ext.3010) Fax +34 93 5883007
----
Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus
----
Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
To Unsubscribe:
https://lists.andrew.
Luca Olivetti
2018-03-12 17:20:38 UTC
Permalink
Post by Arnaldo Viegas de Lima
I run a separate daemon that periodically checks the spam folder, perform the necessary “training” actions and then remove the message.
That's what I've been doing for many years (using a couple of shared
folder where users have to move messages that have been wrongly
classified) but I wanted to make it simpler, like the dovecot antispam
plugin, where it is enough to move a message in/out of the personal spam
folder to trigger a retrain.

Bye
--
Luca Olivetti
Wetron Automation Technology http://www.wetron.es/
Tel. +34 93 5883004 (Ext.3010) Fax +34 93 5883007
----
Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
To Unsubscribe:
https://lists.andrew.cmu.e
Arnaldo Viegas de Lima
2018-03-12 17:43:05 UTC
Permalink
Ah… we use different meaning for the “SPAM” folder! For me it’s where I place mail that was wrongly classified as HAM. Mail classified as SPAM go to the “quarantine” folder (that get’s purged by Cyrus after X days).

You are talking about moving files out of “quarantine” and using a notification to trigger the retraining. That’s indeed a nice idea!

I see a 2 ways to handle it:

- Enqueue for later processing
- Make notifyd pass the job to another process (like a daemon)

The problem with any of this methods (really with any solution based on notifications that is not completely handled in the notification processing) is that the use may further move the message.

One option is to make a copy of the message to another (reserved) folder. I may be wrong, but my guess is that Cyrus will just link the messages, so it can be quick. If not I guess it can be linked during the notification processing. Need to check.

Arnaldo.
Post by Arnaldo Viegas de Lima
I run a separate daemon that periodically checks the spam folder, perform the necessary “training” actions and then remove the message.
That's what I've been doing for many years (using a couple of shared folder where users have to move messages that have been wrongly classified) but I wanted to make it simpler, like the dovecot antispam plugin, where it is enough to move a message in/out of the personal spam folder to trigger a retrain.
Bye
--
Luca Olivetti
Wetron Automation Technology http://www.wetron.es/
Tel. +34 93 5883004 (Ext.3010) Fax +34 93 5883007
----
Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
To Unsubscribe:
http
Luca Olivetti
2018-03-12 17:49:27 UTC
Permalink
Post by Arnaldo Viegas de Lima
- Enqueue for later processing
- Make notifyd pass the job to another process (like a daemon)
Yes, I thought about those two options (well, only the first one
actually, since notifyd can only spawn an external program) and I asked
about it in my original message.
The question is, is it really necessary (with ~100 sessions and not
everybody constantly moving messages in/out of the spam folder)?

Bye
--
Luca Olivetti
Wetron Automation Technology http://www.wetron.es/
Tel. +34 93 5883004 (Ext.3010) Fax +34 93 5883007
Arnaldo Viegas de Lima
2018-03-12 17:53:40 UTC
Permalink
That will depend on the retraining process complexity as well as the size of the messages.
My guess is that without some real world testing it will be difficult to have a definitive answer.

Arnaldo.
Post by Arnaldo Viegas de Lima
- Enqueue for later processing
- Make notifyd pass the job to another process (like a daemon)
Yes, I thought about those two options (well, only the first one actually, since notifyd can only spawn an external program) and I asked about it in my original message.
The question is, is it really necessary (with ~100 sessions and not everybody constantly moving messages in/out of the spam folder)?
Bye
--
Luca Olivetti
Wetron Automation Technology http://www.wetron.es/
Tel. +34 93 5883004 (Ext.3010) Fax +34 93 5883007
Loading...