[ale] Fetchmail IMAP backup

Steve Litt slitt at troubleshooters.com
Tue Jan 3 12:50:40 EST 2017


On Tue, 3 Jan 2017 10:14:53 -0500 (EST)
Chris Fowler <cfowler at outpostsentinel.com> wrote:

> I'm a bit confused on what I can do with fetchmail with IMAP.


 
> 
> I want to connect to a remote IMAP server, fetch email, but not
> delete them (keep). I want to do this all the time so that I can use
> procmail on where fetchmail is running to search these emails, sort
> them based on criteria. 

poll mail.bagelpatunias.com protocol IMAP:
        user 'slitt at bagelpatunias.com' there is 'slitt' here
        pass 'wouldnt_you_like_to_know'
        limit 50000000
        warnings 3200
        expunge 60
        mda "/usr/bin/procmail -d %T"
        fetchall
        ssl;

To leave the mail on the IMAP server, eliminate the expunge command
(try it to make sure, I've been wrong before).

> 
> You can't use fetchall and keep in daemon mode

My experience is that fetchmail keeps running til you stop it.


>  and I can't figure out
> how fetchmail knows what it has fetched in the past. 

I don't know either, but my guess would be that it marks the downloaded
messages as "read". Which is a disadvantageous side effect.

> The mailbox
> belongs to a user who needs his email and we need to automatically
> sort incoming email that is sent to him. 

Huh? Sort? Sort how? To what end? Are you saying you want to move
messages to various folders on the IMAP directory? Eeeuuuuu!

Is this user so unreasonably stuck in his work procedures of the past
that he's willing to make you jump through these kinds of hoops? Is
this guy paying you?

> 
> My idea is to use fetchmail on a computer to attach to his IMAP as an
> IMPA client, download, and process via procmail. 

HIS IMAP? Wait a minute. Does he have HIS OWN IMAP, under your control?
Is his IMAP constructed with Dovecot? If so, I think I've already solved
this problem. I thought you meant his IMAP was on Google Mail or
something.

> I'll look for some
> criteria and then I'll send it to a perl program that will even
> search XLS files that are attached for criteria. 

I'm not exactly sure what benefit you're trying to give your user, but
I'm almost positive there's a better way to do it.
 
SteveT

Steve Litt 
December 2016 featured book: Rapid Learning for the 21st Century
http://www.troubleshooters.com/rl21


More information about the Ale mailing list