|
View:
New views
14 Messages
—
Rating Filter:
Alert me
|
|
|
Triggering a server action on a specific eventHi,
I would like to launch a specific command [1] on a mail server whenever a message is moved from one folder into another folder. For example, a Thunderbird user moves a message from folder A to Folder B. I'd like to catch this move and launch a specific script on the server. Is it possible ? I don't know if I need to search an answer at the qmail level or at the imap server level. I'm using qmail with courier-imap. Thanks, [1] bash or python script, ... Regards, -- Olivier Developer OpenERP - Tiny sprl Chaussée de Namur, 40 B-1367 Gérompont Tel: +32.81.81.37.00 Web: http://tiny.be |
|
|
Re: Triggering a server action on a specific eventOlivier Laurent wrote:
> Hi, > > I would like to launch a specific command [1] on a mail server > whenever a message is moved from one folder into another folder. > > For example, a Thunderbird user moves a message from folder A to > Folder B. I'd like to catch this move and launch a specific script on > the server. > > Is it possible ? > > I don't know if I need to search an answer at the qmail level or at > the imap server level. > > I'm using qmail with courier-imap. > > Thanks, > > [1] bash or python script, ... > > Regards, > Hello Olivier, That would be an IMAP server specific question. In any case, the only imap server that i have knowlege it can do such things is dovecot. Very nice server in terms of security and performance too. * http://dovecot.org Regards, Hugo Monteiro. -- ci.fct.unl.pt:~# cat .signature Hugo Monteiro Email : hugo.monteiro@... Telefone : +351 212948300 Ext.15307 Web : http://hmonteiro.net Centro de Informática Faculdade de Ciências e Tecnologia da Universidade Nova de Lisboa Quinta da Torre 2829-516 Caparica Portugal Telefone: +351 212948596 Fax: +351 212948548 www.ci.fct.unl.pt apoio@... ci.fct.unl.pt:~# _ |
|
|
|
|
|
|
|
|
Re: Triggering a server action on a specific eventOlivier Laurent wrote:
> No. I'm creating a bayesian email filter that need to learn on the > message. It's supposed to be very general, not just for spam. The first > level folder is the category. If a message is moved from folder A to > folder B. It has to uncategorize the message as being from category A. > And it has to categorize the message as being from category B. I thikn spamassassin solved this by remembering which message it already saw. So if you have a cron like job that looks into a 'Junk' folder or so it should be possible to learn the new junk every 10 minutes or so. Okay, it's not event driven but it will get the job done. Another option is to take the incoming messages from the Junk folder (in new/) learn them and move them to cur/ that should do the trick as well. However, I don't know how you will teach your bayesian filter if there are no positive marked messages. So aside from Junk you probably also need something like NotSoVeryMuchJunk and IWishThisWasJunk :-) Anyway, good luck with it, -- Dr. Werner Van Belle http://werner.yellowcouch.org/ |
|
|
Re: Triggering a server action on a specific eventWerner Van Belle wrote:
> Olivier Laurent wrote: >> No. I'm creating a bayesian email filter that need to learn on the >> message. It's supposed to be very general, not just for spam. The first >> level folder is the category. If a message is moved from folder A to >> folder B. It has to uncategorize the message as being from category A. >> And it has to categorize the message as being from category B. > I thikn spamassassin solved this by remembering which message it already > saw. So if you have a cron like job that looks into a 'Junk' folder or > so it should be possible to learn the new junk every 10 minutes or so. > Okay, it's not event driven but it will get the job done. Another > option is to take the incoming messages from the Junk folder (in new/) > learn them and move them to cur/ that should do the trick as well. > > However, I don't know how you will teach your bayesian filter if there > are no positive marked messages. So aside from Junk you probably also > need something like NotSoVeryMuchJunk and IWishThisWasJunk :-) > > Anyway, good luck with it, Thank you. On another mailing list, someone pointed me that I should use inotify [1] It seems to be the solution I should use. It also have the advantage of being a general solution and not qmail specific. So I'll use pyinotify, the python interface. [1] http://en.wikipedia.org/wiki/Inotify Regards, -- Olivier Developer OpenERP - Tiny sprl Chaussée de Namur, 40 B-1367 Gérompont Tel: +32.81.81.37.00 Web: http://tiny.be |
|
|
Re: Triggering a server action on a specific eventOn Mon, Sep 28, 2009 at 5:40 PM, Olivier Laurent <olt@...> wrote:
No. I'm creating a bayesian email filter that need to learn on the This looks like a very original idea to automatically categorize a message and maybe later automatically decide which folder the message should belong to ? I have taken a look at the courier-imap code. It looks like you will have to modify imapd.c where the IMAP COPY command is implemented and more specifically modify the do_msgset() function. The courier-imap mailing list will be a better place to have your query answered and maybe if it is interesting for others, some could implement a configurable callback function |
|
|
Re: Triggering a server action on a specific eventManvendra Bhangui wrote:
> On Mon, Sep 28, 2009 at 5:40 PM, Olivier Laurent <olt@... > <mailto:olt@...>> wrote: > > No. I'm creating a bayesian email filter that need to learn on the > message. It's supposed to be very general, not just for spam. The first > level folder is the category. If a message is moved from folder A to > folder B. It has to uncategorize the message as being from category A. > And it has to categorize the message as being from category B. > > > This looks like a very original idea to automatically categorize a > message and maybe later automatically decide which folder the message > should belong to ? > > I have taken a look at the courier-imap code. It looks like you will > have to modify imapd.c where the IMAP COPY command is implemented and > more specifically modify the do_msgset() function. The courier-imap > mailing list will be a better place to have your query answered and > maybe if it is interesting for others, some could implement a > configurable callback function Thank you. C is not exactly my cup of tea. I'm going to use pyinotify which just listen to changes in directory. I just need to filter all the changes to just the changes I need like 'move out', 'move in'. Regards, -- Olivier Developer OpenERP - Tiny sprl Chaussée de Namur, 40 B-1367 Gérompont Tel: +32.81.81.37.00 Web: http://tiny.be |
|
|
Re: Triggering a server action on a specific eventHello!
On Mon, Sep 28, 2009 at 02:10:49PM +0200, Olivier Laurent wrote: > I'm creating a bayesian email filter that need to learn on the > message. It's supposed to be very general, not just for spam. The first > level folder is the category. If a message is moved from folder A to > folder B. It has to uncategorize the message as being from category A. > And it has to categorize the message as being from category B. Interesting! Are you writing the whole system from scratch, or has such an automatic, fuzzy categorizing system already been implemented before? Please keep us (or at least me) informed about how this works out. Regards, Thomas |
|
|
Re: Triggering a server action on a specific eventThomas Schwinge wrote:
> Hello! > > On Mon, Sep 28, 2009 at 02:10:49PM +0200, Olivier Laurent wrote: >> I'm creating a bayesian email filter that need to learn on the >> message. It's supposed to be very general, not just for spam. The first >> level folder is the category. If a message is moved from folder A to >> folder B. It has to uncategorize the message as being from category A. >> And it has to categorize the message as being from category B. > > Interesting! Are you writing the whole system from scratch, or has such > an automatic, fuzzy categorizing system already been implemented before? I'm writing it from scratch using pyinotify [1] and Reverend [2], a Bayesian classifier. For the moment, I'm using 2 processes. One is a daemon that read a named pipe (for performance) where every new mail is piped from qmail. It classifies new messages into categories (folders). Messages that don't fall into a category are saved in the default user folder (INBOX). The second process is launched from cron every x minutes. It learns messages already categorized by users. The current solution is somewhat complicated. It needs editing qmail configuration and restarting the mail server and is somewhat qmail specific. But the inotify solution will be more general, won't need editing mail specific configuration and won't require a mail server restart. Normally only one process will live. If this process falls, normal email processing will continue. > Please keep us (or at least me) informed about how this works out. I don't know exactly about licensing at the moment. Our company is normally developping an open source ERP but this software does not fall under our normal product and I don't know exactly what our manager will license this software. If someone is interested by this software, (s)he can contact me at olt at tinyerp dot com. I'll try to keep him or her informed. PS: I tryied using popfile [3] but it was not a 100% complete solution for our customer. That's why I started it from scratch. [1] http://trac.dbzteam.org/pyinotify [2] http://www.divmod.org/trac/wiki/DivmodReverend [3] http://en.wikipedia.org/wiki/POPFile Regards, -- Olivier Developer OpenERP - Tiny sprl Chaussée de Namur, 40 B-1367 Gérompont Tel: +32.81.81.37.00 Web: http://tiny.be |
|
|
Re: Triggering a server action on a specific eventOlivier Laurent wrote:
> Thomas Schwinge wrote: >> Hello! >> >> On Mon, Sep 28, 2009 at 02:10:49PM +0200, Olivier Laurent wrote: >>> I'm creating a bayesian email filter that need to learn on the >>> message. It's supposed to be very general, not just for spam. The first >>> level folder is the category. If a message is moved from folder A to >>> folder B. It has to uncategorize the message as being from category A. >>> And it has to categorize the message as being from category B. >> >> Interesting! Are you writing the whole system from scratch, or has such >> an automatic, fuzzy categorizing system already been implemented before? > > I'm writing it from scratch using pyinotify [1] and Reverend [2], a > Bayesian classifier. > > For the moment, I'm using 2 processes. > > One is a daemon that read a named pipe (for performance) where every > new mail is piped from qmail. It classifies new messages into > categories (folders). Messages that don't fall into a category are > saved in the default user folder (INBOX). > > The second process is launched from cron every x minutes. It learns > messages already categorized by users. > > The current solution is somewhat complicated. It needs editing qmail > configuration and restarting the mail server and is somewhat qmail > specific. > > But the inotify solution will be more general, won't need editing mail > specific configuration and won't require a mail server restart. > > Normally only one process will live. If this process falls, normal > email processing will continue. > >> Please keep us (or at least me) informed about how this works out. > > I don't know exactly about licensing at the moment. Our company is > normally developping an open source ERP but this software does not > fall under our normal product and I don't know exactly what our > manager will license this software. > > If someone is interested by this software, (s)he can contact me at olt > at tinyerp dot com. I'll try to keep him or her informed. > > PS: I tryied using popfile [3] but it was not a 100% complete solution > for our customer. That's why I started it from scratch. > > [1] http://trac.dbzteam.org/pyinotify > [2] http://www.divmod.org/trac/wiki/DivmodReverend > [3] http://en.wikipedia.org/wiki/POPFile > > Regards, > Hello Olivier, I have not used it myself, but you might want to take a look at CRM114. * http://crm114.sourceforge.net Regards, Hugo Monteiro. -- ci.fct.unl.pt:~# cat .signature Hugo Monteiro Email : hugo.monteiro@... Telefone : +351 212948300 Ext.15307 Web : http://hmonteiro.net Centro de Informática Faculdade de Ciências e Tecnologia da Universidade Nova de Lisboa Quinta da Torre 2829-516 Caparica Portugal Telefone: +351 212948596 Fax: +351 212948548 www.ci.fct.unl.pt apoio@... ci.fct.unl.pt:~# _ |
|
|
Re: Triggering a server action on a specific eventHugo Monteiro wrote:
> I have not used it myself, but you might want to take a look at CRM114. > > * http://crm114.sourceforge.net Thank you. I'll take a look at it. Regards, -- Olivier Developer OpenERP - Tiny sprl Chaussée de Namur, 40 B-1367 Gérompont Tel: +32.81.81.37.00 Web: http://tiny.be |
|
|
Re: Triggering a server action on a specific eventThomas Schwinge wrote:
> Interesting! Are you writing the whole system from scratch, or has such > an automatic, fuzzy categorizing system already been implemented before? > Yes 'Bow' does this quite well actually. The automatic categorization is done by either crossbow or bowtie (one of the two, I'm not sure why they uised such ridicoulous names anyway :-) http://www.cs.cmu.edu/~mccallum/bow/ Wkr, -- Dr. Werner Van Belle http://werner.yellowcouch.org/ |
|
|
Re: Triggering a server action on a specific eventWerner Van Belle wrote:
> Thomas Schwinge wrote: >> Interesting! Are you writing the whole system from scratch, or has such >> an automatic, fuzzy categorizing system already been implemented before? >> > Yes 'Bow' does this quite well actually. The automatic categorization is > done by either crossbow or bowtie (one of the two, I'm not sure why they > uised such ridicoulous names anyway :-) > > http://www.cs.cmu.edu/~mccallum/bow/ That seems interesting too. Thanks for the info. Regards, -- Olivier Developer OpenERP - Tiny sprl Chaussée de Namur, 40 B-1367 Gérompont Tel: +32.81.81.37.00 Web: http://tiny.be |
| Free embeddable forum powered by Nabble | Forum Help |