fetchmail-friends
[Top] [All Lists]

[fetchmail]Feature Idea/Request

2004-03-23 08:28:02
Hello,

I would like to use fetchmail in a somewhat unconventional way. I have
several users who are wedded to reading their mail with the UNIX mail
command, but simultaneously are interested in and possibly migrating to IMAP
based mail. We currently support IMAP for most of our users, but we still
support "conventional unix mail" for others.  

What I am interested in doing is using fetchmail to grab mail from the IMAP
server and dumping it into a standard unix mailbox file.

Right now I am using fetchmail combined with a perl script to accomplish
this. Here is an example.

fetchmail -s -a -k -p IMAP --ssl -m "./tombx %F" -u myusername
myimapserver.mydomain.edu

Here is the tombx perlscript:

#!/usr/bin/perl -w
use strict;
my @MessageContents ;
my $From ;
my $line ;
my $Field ;
my $date = localtime ;

$From = $ARGV[0] ;
@MessageContents = <STDIN> ;
open (MAILFILE, ">>mailfile") ;
print MAILFILE "From $From $date\n" ;
print MAILFILE join ("" ,@MessageContents) ;
close MAILFILE ;

What I would like to do is add the capability to fetchmail to simply append
the messages it downloads to a file in unix mailbox format.

In addition I would like to add the ability to download messages starting at
a specific message id. This is necessary in the case when someone would like
to grab messages and store them locally on more than one client. Ideally I
would like a file that would maintain the IMAP state locally for each folder
downloaded with the -r option. 

So now for the actual request. Being new to fetchmail myself: 1. Do these
additions seem reasonable?  2. Is someone who is much more familiar with
fetchmail's internals willing to code these, or willing to point me in the
right direction to add these features. I guess I could hike through the code,
but I was hoping someone familiar with the internals could help me out or
point me to the appropriate place.

Thanks

Bill


<Prev in Thread] Current Thread [Next in Thread>
  • [fetchmail]Feature Idea/Request, William Holmes <=