Re: Cyrus - Rspamd - Sieve

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



El 31/1/21 a les 13:47, David Faller ha escrit:
Think without some help I can't reach this,
We also only want it for learning spam and ham, so badly you can't share your script.

But could you share a little how to if you can't share your scripts ? Don't like to spam only a question.
So we need to bring up notification events for move from spam to elsewhere.
And elsewhere to spam. This should trigger a copy script to specific ham / spam training folder right?

The shared link to cyrus documentation looks user specific.

MessageMove
Important The MessageMove event is an event type not documented in an RFC.

{
     "event": "vnd.cmu.MessageMove",
     "messages": 2,
     "modseq": 5,
     "oldMailboxID": "imap://john@xxxxxxxxxxx@imap.example.org/INBOX;UIDVALIDITY=1424683682",

This is the source folder, if it is (e.g.) INBOX.spam, map the uri to the file (combining it with the "uidset" field, which can be a list, so you'll have to iterate over all messages) and pass it to "sa_learn --ham" (since the user is moving it out of the spam folder).


     "pid": 7685,
     "service": "imap",
     "timestamp": "2015-02-23T14:52:41.676+01:00",
     "uidnext": 4,
     "uidset": "3",
     "uri": "imap://john@xxxxxxxxxxx@imap.example.org/Archive;UIDVALIDITY=1424683684",

And this is the destination folder. Again, if it is INBOX.spam, map the uri+uidset to the file(s) and pass it to "sa_learn --spam" (since the user is moving it into the spam folder).

     "user": "john@xxxxxxxxxxx",
     "vnd.cmu.midset": [
         "<4d9618acd0aea6b33683766358351459@xxxxxxxxxxx>"
     ],
     "vnd.cmu.oldUidset": "3",
     "vnd.cmu.sessionId": "imap.example.org-7685-1424699561-1-7444588115769591371",
     "vnd.cmu.unseenMessages": 0
}

Bye


--
Luca Olivetti
Wetron Automation Technology http://www.wetron.es/
Tel. +34 93 5883004 (Ext.3010)  Fax +34 93 5883007

------------------------------------------
Cyrus: Info
Permalink: https://cyrus.topicbox.com/groups/info/T4a9f972d95fd358f-Mec9c48f60460b73477860b39
Delivery options: https://cyrus.topicbox.com/groups/info/subscription




[Index of Archives]     [Cyrus SASL]     [Squirrel Mail]     [Asterisk PBX]     [Video For Linux]     [Photo]     [Yosemite News]     [gtk]     [KDE]     [Gimp on Windows]     [Steve's Art]

  Powered by Linux