Hi all, my name is Giovanni Giorgi, and I am a java software architect, and a big python fan. I have a big problem: I am moving all my emails from a provider to another, and I have a very old procmailrc to migrate (target is Linux in either way, but I have little control on the new hosting). I do not like procmailrc, but I was able to build a set of rules to automatically create folders for new mailing list and so on. The rules are magical because they extract the mailing list name and then push the email on that folder. There is a way to build in python a replacement of procmailrc? I know lamson is an entire SMTP, but I need only the last part of the routing. I have played with the python's IMAP library and it rocks, but I'd like to know if there is something already done. Thank you! -- Senior Consultant http://gioorgi.com
"Giovanni Giorgi" <jj@gioorgi.com> writes: [...] > There is a way to build in python a replacement of procmailrc? > I know lamson is an entire SMTP, but I need only the last part of the > routing. Lamson doesn't sound like it fits the bill completely. Like you said, it's more complex than just the routing. I can think of way to fit them together though. fetchmail when it fetches mail can deliver it to an SMTP listener using a normal SMTP transaction. You can rig this up and then put your routing rules inside the lamson app. Any changes to the rules will require a restart. To prevent this, you can catch all with a general rule and then read out filter definitions from a file and do filtering but you'll have to implement the filtering mechanism yourself. Most modern email clients have filtering inbuilt so I think the amount of work being done on pure mail filter apps (like procmail) is limited. I'd like to be proved wrong though. -- ~noufal http://nibrahim.net.in The good oxymoron, to define it by a self-illustration, must be a planned inadvertency. -Wilson Follett
On Mon, July 25, 2011 9:54 am, Noufal Ibrahim wrote: > "Giovanni Giorgi" <jj@gioorgi.com> writes: > > > [...] > > Most modern email clients have filtering inbuilt so I think the amount > of work being done on pure mail filter apps (like procmail) is > limited. I'd like to be proved wrong though. You are right, I have no luck googl-ing for some python library which solve my problem. Anyway I think a pure python module filtering on an IMAP server would be userful, right? If I decide to digg into it, I will be able to make it compatible also with GMail IMAP client and it will be a little more success. Lamson project could be interested in a pure-imap filter done in this way? In short: the filter will connect via imap to the server, scan for emails, and move them on the right folder. It will be a post-delivered process, to run on demand or via cron. The rule configuration will be done in a pythonic way, of course. -- Senior Consultant http://gioorgi.com