Re: Leaving on POP server & selectively deleting

Peter Davis <[email protected]> Thu, 29 May 2003 08:21:30 -0400
Newsgroups gmane.mail.sylpheed.claws.windows
Organization PFD Studio
Message-ID <[email protected]>
On Thu, 29 May 2003 09:34:38 +0200
Thorsten Maerz <[email protected]> wrote:

> 
> Hi Peter,
> 
> On Wed, 28 May 2003 14:56:06 -0400 Peter Davis <[email protected]> wrote:
> 
> > >On Wed, 21 May 2003 11:55:16 -0400 Peter Davis <[email protected]> wrote:
> > >
> > >>I'd like to be able to do something like this with Sylpheed-Claws.  Is
> > >>there any way to access the server and UIDL info when messages are
> > >>downloaded, so I can store that somewhere?  
> > >>    
> > >No.
> > 
> > Thanks, Thorsten.  I've thought of writing a Perl script to purge 
> > messages from the server based on Message-ID, rather than UIDL.  I would 
> > run the script on all the messages in the trash folder prior to emptying 
> > the trash.  However, getting the Message-ID from a POP3 server is more 
> > work than getting the UIDL, and not all messages have Message-IDs.
> 
> An external incorporation seems the simplest solution to me:
> I cannot see any reference from the downloaded messages to
> their uidl: Sylpheeds philosophy is not to change the original
> message that came from the network socket (and as I will
> strictly follow Hiroyukis decisions, it doesn't make sense
> to discuss this behaviour with me).
> A disadvantage of this is that you cannot store any additional
> info (e.g. the read flags are stored in a separate .sylpheed_mark
> file for this reason. But that file gets written at a different
> time&place, there is no reference to uidl anymore).
> 
> The only (ugly) way I can see would be patching Sylpheed to
> insert that info as a new header before existing data in
> pop.c:pop3_retr_recv() and pass this to pop3_write_msg_to_file().
> But this would require you to compile Sylpheed on your own, as
> I doubt any of the developers will accept the breaking of the
> "dont-munge-messages" rule.

Thanks, Thorsten.  This is just what my Perl script does.  It adds X-POP-Server and X-POP-UIDL headers to each message.  It has worked flawlessly with mutt for a while.  So I may try using this with Sylpheed-Claws.  I guess I'd have to:

1) Set all my accounts to "don't check"

2) Set the 'inc' procedure to call my script, and

3) Set Sylpheed-Claws to look for new messages after each mail check.

Then I can run my other script on the Trash folder to collect all the UIDLs and mark them for server purge on the next go round.

Thanks,

-pd


-- 
--------
                             Peter Davis
               Funny stuff at http://www.pfdstudio.com
    List of resources for children's writers and illustrators at:
                  http://www.pfdstudio.com/cwrl.html


-------------------------------------------------------
This SF.net email is sponsored by: eBay
Get office equipment for less on eBay!
http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5