alois.mahdal.1-ndm...@zxcvb.cz wrote: > Thanks everybody for answers. > > I wonder: is it possible to do the fetchmail/procmail > solution without actually *storing* the mail where the > daemon runs? I mean, just talk to the remote IMAP server > and tell him "move it to that folder there"? > > I would like to avoid the massive duplication. The VPS > has quite a small disk, while on the mailbox side, the > storage is free (i.e. claimed "unlimited" for certain > price). They just don't help with the sorting/filtering.
> Also: > > On 2013-01-22 19:56, Joel Roth wrote: > >[...] > >I'll clean up and post the script if anyone is interested. > > > >Joel > > Thanks, Joel, would you be so kind? I'd really like to see > your script. Hi, Okay, here it is, with all its warts and weaknesses. https://github.com/bolangi/imapget For your application (don't download messages, only sort among folders on server) you might do better writing from scratch using this code, or using the man page synopsis code as a guide. https://metacpan.org/module/Net::IMAP::Client Basically, you would download the message summaries, then decide what to do based on the header fields. Or use a better-maintained IMAP client library, such as: https://metacpan.org/module/Mail::IMAPTalk or https://metacpan.org/module/PLOBBES/Mail-IMAPClient-3.32/lib/Mail/IMAPClient.pod The review sound good, but I don't understand the IMAP protocol well enough to be able to use them. :-( I took over maintaining Net::IMAP::Client on CPAN a couple years ago. I was able to fix a couple bugs, but it gets stuck trying to tag a couple thousand messages to move or delete, and may have trouble connecting to Gmail. For anyone else wanting to use the imapget script a few other caveats: + the code for caching Message-ID to avoid duplicate messages doesn't work + due to not sufficiently understanding Unicode, I simply filter out non-ASCII characters from the From: and Subject: headers + the code to move the messages to the trash folder and then delete them later doesn't work. For details of Net::IMAP::Client's bugs, see https://rt.cpan.org/Public/Dist/Display.html?Name=Net-IMAP-Client Cheers, and happy scripting! Joel > aL. > -- > > > -- > To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a > subject of "unsubscribe". Trouble? Contact > listmas...@lists.debian.org > Archive: http://lists.debian.org/c16d3cd48c3eec5dd4c4912ce3899...@zxcvb.cz > -- Joel Roth -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/20130130063329.GA26748@sprite