Re: Message remains in spool after expunge

2017-08-22 Thread Arnaldo Viegas de Lima
Thank you to all that quickly answered (Patrick/Merlin/Sebastian).

I really missed this one. Maybe because I migrated from 2.4 direct to 3.0.3 in 
2.5. Indeed one of my comments about the migration is that a list of “behavior” 
changes could go a long way  into helping the whole process.

Now comes an interesting challenge: I do like the delayed expunge. It’s nice an 
ingenious and for our installation a nice feature, so I really want to keep it.

But my script needs to process the files in the directory. Up to now the files 
where listed (filesystem) and a search was used to identify it on Cyrus. With 
leftover (delayed) files, is there a way to list the messages on the mailbox in 
Cyrus and obtain the actual filename?

Thanks again,

Arnaldo.


> On Aug 22, 2017, at 9:57 AM, Patrick Boutilier <bouti...@ednet.ns.ca> wrote:
> 
> On 08/22/2017 09:48 AM, Arnaldo Viegas de Lima wrote:
>> Hi,
>> We have just migrated from 2.4.17 to 3.0.3 and we are having a problem with 
>> one of our scripts that perform actions on a SPAM folder for retraining 
>> purposes.
>> All files placed by the user there are used for retaining. At the end Cyrus 
>> is called to remove the files: we mark all files for deletion and then 
>> expunge the mailbox. We have been using this script since 2007, flawlessly.
>> I’ve set Cyrus chatty mode on and I can see the commands being sent to the 
>> server and there is a confirmation log message for the expunge, with the  
>> correct number of files.
>> Checking the SPAM mailbox with Cyrus (or any IMAP client), show it as empty. 
>> But looking at the mailbox directory in the filesystem, the actual files are 
>> still there.
>> Am I missing something on 3.0.3 that may be the cause for this problem?
>> Thanks in advance.
> 
> expunge_mode: delayed is the default since 2.5
> 
> https://www.cyrusimap.org/imap/concepts/features/delayed-expunge.html
> 
> You would want expunge_mode: immediate to use the default behaviour in 2.4.17
> 
> 
> 
> 
> 
>> Arnaldo.
>> 
>> Cyrus Home Page: http://www.cyrusimap.org/
>> List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
>> To Unsubscribe:
>> 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.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.cmu.edu/mailman/listinfo/info-cyrus

Re: Message remains in spool after expunge

2017-08-22 Thread Arnaldo Viegas de Lima
Answering my own question: UIDs match the filename, so pretty easy to fix the 
script. Nice!

So far, 3.0.3 is working really nice.

> On Aug 22, 2017, at 3:36 PM, Arnaldo Viegas de Lima 
> <arna...@viegasdelima.com> wrote:
> 
> Thank you to all that quickly answered (Patrick/Merlin/Sebastian).
> 
> I really missed this one. Maybe because I migrated from 2.4 direct to 3.0.3 
> in 2.5. Indeed one of my comments about the migration is that a list of 
> “behavior” changes could go a long way  into helping the whole process.
> 
> Now comes an interesting challenge: I do like the delayed expunge. It’s nice 
> an ingenious and for our installation a nice feature, so I really want to 
> keep it.
> 
> But my script needs to process the files in the directory. Up to now the 
> files where listed (filesystem) and a search was used to identify it on 
> Cyrus. With leftover (delayed) files, is there a way to list the messages on 
> the mailbox in Cyrus and obtain the actual filename?
> 
> Thanks again,
> 
> Arnaldo.


Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
To Unsubscribe:
https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus

Cyrus 3.0.3 XAPPEPUSH

2017-08-22 Thread Arnaldo Viegas de Lima
If anyone is interested (and have a proper push certificate) I have written a 
small external script to be called from notifyd to handle all aspects of Apple 
push notification, with device registration being handle by a MySQL database 
(with cleanup). I think I’ve covered most of the cenários: registration, 
cleanup, new message, delete and move. Works great!

We have a very small shop here (a boutique consulting firm) so approach 
(external program, not a daemon) suits our needs. I will be glad to share it.

Arnaldo.

Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
To Unsubscribe:
https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus

Cyrus 3.0.3 XAPPLEPUSH

2017-08-23 Thread Arnaldo Viegas de Lima
Hi Sebastian,

A few notes:

- You need a valid push certificate. You can get one from macOS Server, but I 
do not know the limitations on the usage. My shop is really small, so I think 
it’s not a problem. 

- There is close to nothing documenting how this work, so much of it is based 
on looking at the source code (Cyrus), from info on a similar Dovecot plugin 
and on the actual Apple source code (based on Dovecot). Also a lot of debugging 
and trial and error.

- Contrary to the existing (and minimal) reference in the docs, there is no 
“—enable-apple-push-service” configure flag. The code in imapd is so simple and 
harmless that it’s always compiled.

- XAPPLEPUSH requires TLS, so if TLS is not configured it will not be 
advertised.

- XAPPLEPUSH is only advertised with the proper notifications settings (see 
bellow).

- I used MySQL because it’s already running on the same server as Cyrus and I 
have a nice set of functions to make scripts like this a breeze. For the same 
reasons, it’s in PHP.


This is what needs to be added to imapd.conf:

# Apple Push Service Events
event_notifier: external
event_groups: applepushservice message flags
event_extra_params: timestamp vnd.cmu.unseenMessages 
notify_external: /usr/local/bin/notifyd_apns
aps_topic: com.apple.mail.XServer.xxx

aps_topic is the common name take from the certificate. It’s sent to the mobile 
device so that it will match the source of the push notification when it 
arrives.


The MySQL database configuration is also attached.

For the certificate you need to enable mail services and export the 
“mobilemail” certificate and key (as pkcs12) from the keychain. Then use 
openssl to remove key and certificate as well as to unencrypt the key. Combine 
both in a single PEM file.

Enjoy!



notifyd_apns
Description: Binary data


apns_mobilemail.sql
Description: Binary data







Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
To Unsubscribe:
https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus

Re: Cyrus 3.0.3 XAPPEPUSH

2017-08-23 Thread Arnaldo Viegas de Lima
I’ve sent Sebastian the script with some comments (I don’t think a list is the 
proper way to share code). If anyone else wants a peek, let me know.


> On Aug 23, 2017, at 7:15 AM, Sebastian Hagedorn <haged...@uni-koeln.de> wrote:
> 
> Hi,
> 
> I doubt that we could actually use such a solution, but I'm definitely 
> curious about it! Please share the script :-)
> 
> --On 22. August 2017 um 18:21:44 -0300 Arnaldo Viegas de Lima 
> <arna...@viegasdelima.com> wrote:
> 
>> If anyone is interested (and have a proper push certificate) I have
>> written a small external script to be called from notifyd to handle all
>> aspects of Apple push notification, with device registration being handle
>> by a MySQL database (with cleanup). I think I’ve covered most of the
>> cenários: registration, cleanup, new message, delete and move. Works
>> great!
>> 
>> We have a very small shop here (a boutique consulting firm) so approach
>> (external program, not a daemon) suits our needs. I will be glad to share
>> it.
> 
> 
> Mit freundlichen Grüßen
> 
> Sebastian Hagedorn
> -- 
>   .:.Sebastian Hagedorn - Weyertal 121 (Gebäude 133), Zimmer 2.02.:.
>.:.Regionales Rechenzentrum (RRZK).:.
>  .:.Universität zu Köln / Cologne University - ✆ +49-221-470-89578.:.


Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
To Unsubscribe:
https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus

Re: Cyrus 3.0.3 XAPPEPUSH

2017-08-23 Thread Arnaldo Viegas de Lima
Forgot to remove the list from the email, so it was also sent to the list. My 
sincere apologies.


> On Aug 23, 2017, at 8:28 AM, Arnaldo Viegas de Lima 
> <arna...@viegasdelima.com> wrote:
> 
> I’ve sent Sebastian the script with some comments (I don’t think a list is 
> the proper way to share code). If anyone else wants a peek, let me know.
> 

Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
To Unsubscribe:
https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus

Re: Thunderbird and "Login to server failed".

2017-10-04 Thread Arnaldo Viegas de Lima
TCP wrapper?

> On Oct 4, 2017, at 11:09 AM, Eugene M. Zheganin  wrote:
> 
> Hi,
> 
> On 04.10.2017 18:26, Simon Matter wrote:
>> Interesting, I've never seen this problem over the years.
>> 
>> Are there firewall rules active on the cyrus-imapd host? Probably limiting
>> connection rate?
>> 
> Yeah, but this happens even when I'm in the same LAN as the server is, and no 
> filtering between my machine and server happens at all. Furthermore, I'm 
> administering this server packet filter and I can tell that there's no 
> connection-limiting rules at all. Plus, I've had this reproduced right now 
> and made sure that the firewall logged no blocked packets, so whatever the 
> cause is, it's not a firewall.
> 
> 
> Thanks.
> 
> Eugene.
> 
> 
> Cyrus Home Page: http://www.cyrusimap.org/
> List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
> To Unsubscribe:
> 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.cmu.edu/mailman/listinfo/info-cyrus


Re: Cyrus 3.0.3 XAPPEPUSH

2017-08-23 Thread Arnaldo Viegas de Lima
The easy part is a merit of the Cyrus architecture (mostly the notification 
support) and the way Apple Push was added (thanks to whoever did it - my guess 
the folks at FastMail).
It’s really ingenious: just added the response to the XAPPLEPUSH extension 
command and pass all of it’s processing (registration) to a new notification. 
The rest is business as usual with notifications.

And Cyrus plays really nice in this scenario: you can push on new mail, 
trashing, move, read/unread. Any action that will cause the subscribed  (for 
push) mailboxes to change. And it works beautifully. 

It’s really nice to see the nudge whenever a new mail comes, and not only at 
fixed intervals. Also, properly handling  notifications (other than NewMessage) 
allows for it play nice when the user reads mail on a desktop and on a mobile 
device. I personally hate to have the phone tell me I have 4 new mails to 
realize they where those 4 mails I read/trashed 10 minutes ago on the desktop - 
it’s weird to open a mailbox expecting something and find it empty. Cool to see 
the badge incrementing and decrementing.

I just hope it stays on the upstream Cyrus as it is a really nice feature, if 
you can use it (push certificate/key issue).

Arnaldo. 

> On Aug 23, 2017, at 6:37 PM, David Lang  wrote:
> 
> on the contrary, thanks for sending it to the list, besides others who may 
> want to do the exact same thing, it also helps others who may not have 
> realized that such things could be done easily.
> 
> at 28k, it's not like it was a massive e-mail
> 
> David Lang
> 
> 


Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
To Unsubscribe:
https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus

Re: Cyrus 3.0.3 XAPPLEPUSH

2017-08-24 Thread Arnaldo Viegas de Lima
 than one push per 
connection (in case the user+mailbox maps to multiple devices). Drop me a line 
to get a new copy.

 



> On Aug 24, 2017, at 9:25 AM, Sebastian Hagedorn <haged...@uni-koeln.de> wrote:
> 
> Hi Arnaldo,
> 
> thank you very much! This has been very enlightening. I think I understand 
> most of it and have already set up a testing environment with a certificate 
> from our OS X Server. What I have not yet understood completely is how you 
> populate the database. Where do I find the "APNS Account Id" and the "APNS 
> Device Token" for the devices table, and what do I put in the mailboxes table?
> 
> Thanks,
> Sebastian
> 
> --On 23. August 2017 um 08:27:04 -0300 Arnaldo Viegas de Lima 
> <arna...@viegasdelima.com> wrote:
> 
>> A few notes:
>> 
>> - You need a valid push certificate. You can get one from macOS Server,
>> but I do not know the limitations on the usage. My shop is really small,
>> so I think it’s not a problem.
>> 
>> - There is close to nothing documenting how this work, so much of it is
>> based on looking at the source code (Cyrus), from info on a similar
>> Dovecot plugin and on the actual Apple source code (based on Dovecot).
>> Also a lot of debugging and trial and error.
>> 
>> - Contrary to the existing (and minimal) reference in the docs, there is
>> no “—enable-apple-push-service” configure flag. The code in imapd
>> is so simple and harmless that it’s always compiled.
>> 
>> - XAPPLEPUSH requires TLS, so if TLS is not configured it will not be
>> advertised.
>> 
>> - XAPPLEPUSH is only advertised with the proper notifications settings
>> (see bellow).
>> 
>> - I used MySQL because it’s already running on the same server as Cyrus
>> and I have a nice set of functions to make scripts like this a breeze.
>> For the same reasons, it’s in PHP.
>> 
>> 
>> This is what needs to be added to imapd.conf:
>> 
>> # Apple Push Service Events
>> event_notifier: external
>> event_groups: applepushservice message flags
>> event_extra_params: timestamp vnd.cmu.unseenMessages
>> notify_external: /usr/local/bin/notifyd_apns
>> aps_topic: com.apple.mail.XServer.xxx
>> 
>> aps_topic is the common name take from the certificate. It’s sent to
>> the mobile device so that it will match the source of the push
>> notification when it arrives.
>> 
>> 
>> The MySQL database configuration is also attached.
>> 
>> For the certificate you need to enable mail services and export the
>> “mobilemail” certificate and key (as pkcs12) from the keychain. Then
>> use openssl to remove key and certificate as well as to unencrypt the
>> key. Combine both in a single PEM file.
>> 
>> Enjoy!


Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
To Unsubscribe:
https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus

Re: Cyrus 3.0.3 XAPPLEPUSH

2017-08-24 Thread Arnaldo Viegas de Lima
There is not much that can be done for the error handling, as it’s a script 
called from a daemon. Stdout and stderr are not captured, so you need to resort 
to sending things to syslog.

I really haven’t worked with any other notification service, so I can’t comment 
on that note.

As for getting this to work on a larger scale there are basically 3 
considerations:

- Port the script code to a more efficient implementation (C or C++), mostly as 
a replacement to notifyd. Actually notifyd can be easily modified to play this 
role directly.
- Decide if MySQL is the way to go for your installation. Maybe using Cyrus 
twoskip? I used MySQL because it was available and simple to use.
- Sort out any issues with the certificate/key. I do not know how the licensing 
for using it work. My guess is that for a small shop they will not care if you 
extracted the certificate from macOS X, but running it for a few thousand users 
is another story. Having support for iOS Push Mail adds value to Apple’s 
products, so it may be simpler than I think and it’s just another push service: 
they have tons.

Arnaldo.

> On Aug 24, 2017, at 12:14 PM, Sebastian Hagedorn <haged...@uni-koeln.de> 
> wrote:
> 
> Hi Arnaldo,
> 
> OK, got it! I noticed that the error handling isn't really fleshed out ;-) I 
> could see that the script got the registration message, but the tables were 
> stil empty. Turns out I had to install php-mysql ... :-) Seems obvious in 
> hindsight, but there was no error message. I don't usually use PHP, as I'm 
> more of a Perl/Python guy, so I don't really know how to improve that part.
> 
> FWIW, I copied the handler for MessageNew to MessageAppend, because that's 
> the only way I can get messages on my test server right now, and it worked 
> perfectly.
> 
> What would it take to make this work on a larger scale? I haven't worked with 
> notifications at all until now, so I don't know how other mechanisms are 
> implemented.
> 
> Thanks, Sebastian
> 
> --On 24. August 2017 um 10:51:37 -0300 Arnaldo Viegas de Lima 
> <arna...@viegasdelima.com> wrote:
> 
>> You don’t need to do anything with the tables. The script will populate
>> the tables during the device registration event.
> 
> -- 
>   .:.Sebastian Hagedorn - Weyertal 121 (Gebäude 133), Zimmer 2.02.:.
>.:.Regionales Rechenzentrum (RRZK).:.
>  .:.Universität zu Köln / Cologne University - ✆ +49-221-470-89578.:.


Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
To Unsubscribe:
https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus

Message remains in spool after expunge

2017-08-22 Thread Arnaldo Viegas de Lima
Hi,

We have just migrated from 2.4.17 to 3.0.3 and we are having a problem with one 
of our scripts that perform actions on a SPAM folder for retraining purposes.
All files placed by the user there are used for retaining. At the end Cyrus is 
called to remove the files: we mark all files for deletion and then expunge the 
mailbox. We have been using this script since 2007, flawlessly. 

I’ve set Cyrus chatty mode on and I can see the commands being sent to the 
server and there is a confirmation log message for the expunge, with the  
correct number of files.
Checking the SPAM mailbox with Cyrus (or any IMAP client), show it as empty. 
But looking at the mailbox directory in the filesystem, the actual files are 
still there.

Am I missing something on 3.0.3 that may be the cause for this problem?

Thanks in advance.

Arnaldo. 

Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
To Unsubscribe:
https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus

Re: 2.4.12 vs 3.0.2 different protocol behaviour

2017-08-25 Thread Arnaldo Viegas de Lima
This is 3.0.3 on Centos 7:

* OK [CAPABILITY IMAP4rev1 LITERAL+ ID ENABLE XAPPLEPUSHSERVICE AUTH=DIGEST-MD5 
AUTH=CRAM-MD5 AUTH=PLAIN AUTH=LOGIN SASL-IR] xx.xx.x Cyrus IMAP 
3.0.3-Cyrus 3.0.3 server ready
. login x x
. OK [CAPABILITY IMAP4rev1 LITERAL+ ID ENABLE ACL RIGHTS=kxten QUOTA 
MAILBOX-REFERRALS NAMESPACE UIDPLUS NO_ATOMIC_RENAME UNSELECT CHILDREN 
MULTIAPPEND BINARY CATENATE CONDSTORE ESEARCH SEARCH=FUZZY SORT SORT=MODSEQ 
SORT=DISPLAY SORT=UID THREAD=ORDEREDSUBJECT THREAD=REFERENCES THREAD=REFS 
ANNOTATEMORE ANNOTATE-EXPERIMENT-1 METADATA LIST-EXTENDED LIST-STATUS 
LIST-MYRIGHTS LIST-METADATA WITHIN QRESYNC SCAN XLIST XMOVE MOVE SPECIAL-USE 
CREATE-SPECIAL-USE DIGEST=SHA1 X-REPLICATION URLAUTH URLAUTH=BINARY 
XAPPLEPUSHSERVICE LOGINDISABLED AUTH=DIGEST-MD5 AUTH=CRAM-MD5 AUTH=PLAIN 
AUTH=LOGIN COMPRESS=DEFLATE X-QUOTA=STORAGE X-QUOTA=MESSAGE 
X-QUOTA=X-ANNOTATION-STORAGE X-QUOTA=X-NUM-FOLDERS IDLE] User logged in 
SESSIONID=
. LIST "" "Other Users"
* LIST (\Noselect \HasChildren) "/" "Other Users"
. OK Completed (0.000 secs 10 calls)

Maybe you should consider giving 3.0.3 a try?

Arnaldo.
Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
To Unsubscribe:
https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus

Re: 2.4.12 vs 3.0.2 different protocol behaviour

2017-08-25 Thread Arnaldo Viegas de Lima
I just upgraded from 2.4.17 to 3.0..3. 

My only troubles were with default options that changed, like the hierarchy 
separator, the namespace and delayed expunge. They all forced me to update 
scripts all around. And the namespace change had a nasty side effect: users 
must delete and add their accounts again (when using some mail clients) to 
restore order to the caos. 

I could have kept the 2.4.x behavior, but I see the merit in the new defaults, 
so fixing scripts and having users refresh their account setup was worth it 
(not many users here).

Hope you have more luck with 3.0.3.




> On Aug 25, 2017, at 8:07 AM, Gabriele Bulfon  wrote:
> 
> I will.
> 
> Another note.
> 
> I tried restarting from scratch, replicated my entire 2.4.12 system, checked 
> that it worked as expected, updated packages to 3.0.2 and started cyrus as is 
> with no upgrade : the problem is there just after updating the binaries, even 
> before migrating the data to the new version.
> 
> I will absolutely try the 3.0.3, but I'm starting to feel unsafe 
> upgrading :(
> 


Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
To Unsubscribe:
https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus

Re: update to 3.0.3 even more problematic than 3.0.2

2017-08-25 Thread Arnaldo Viegas de Lima
Have you tried 3.0.3 (or 3.0.2) on a clean system just to be sure that your 
compile/install is working?

Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
To Unsubscribe:
https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus


Re: Backup methods

2018-05-10 Thread Arnaldo Viegas de Lima
One alternative, if you are running VMs (such as VMWare or Hyper-V)  is resort 
to a VM backup program that will uses native change tracking (VMWare CBT and 
Hyper-V RCT). This allows for a consistent and incremental backup of the VM’s. 
It’s quite fast and saves lots of space. The backup is incremental (based on 
disk clusters) and is performed on a temporary VM snapshot.

I use this approach, but my spool is no where close to a TB (or To for the 
francophones). Works fine and I’ve performed a few disaster recovery tests 
without problems. 

Arnaldo

Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
To Unsubscribe:
https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus

Re: sa-learn using event notifications

2018-03-12 Thread Arnaldo Viegas de Lima
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.

> On Mar 12, 2018, at 2:49 PM, Luca Olivetti <l...@wetron.es> wrote:
> 
> El 12/03/18 a les 18:43, Arnaldo Viegas de Lima ha escrit:
> 
>> I see a 2 ways to handle it:
>> - 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
> 


Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
To Unsubscribe:
https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus


Re: sa-learn using event notifications

2018-03-12 Thread Arnaldo Viegas de Lima
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.


 
> On Mar 12, 2018, at 2:20 PM, Luca Olivetti <l...@wetron.es> wrote:
> 
> El 12/03/18 a les 18:07, Arnaldo Viegas de Lima ha escrit:
>> 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.edu/mailman/listinfo/info-cyrus

Re: sa-learn using event notifications

2018-03-12 Thread 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.

> On Mar 12, 2018, at 1:44 PM, Luca Olivetti  wrote:
> 
> 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/
> To Unsubscribe:
> 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.cmu.edu/mailman/listinfo/info-cyrus