<html><body><div style="font-family: arial, helvetica, sans-serif; font-size: 12pt; color: #000000"><div><br></div><div><br></div><hr id="zwchr" data-marker="__DIVIDER__"><div data-marker="__HEADERS__"><blockquote style="border-left: 2px solid #1010FF; margin-left: 5px; padding-left: 5px; color: #000; font-weight: normal; font-style: normal; text-decoration: none; font-family: Helvetica,Arial,sans-serif; font-size: 12pt;" data-mce-style="border-left: 2px solid #1010FF; margin-left: 5px; padding-left: 5px; color: #000; font-weight: normal; font-style: normal; text-decoration: none; font-family: Helvetica,Arial,sans-serif; font-size: 12pt;"><b>From: </b>"Steve Litt" &lt;slitt@troubleshooters.com&gt;<br><b>To: </b>ale@ale.org<br><b>Sent: </b>Tuesday, January 3, 2017 12:50:40 PM<br><b>Subject: </b>Re: [ale] Fetchmail IMAP backup<br></blockquote></div><div data-marker="__QUOTED_TEXT__"><blockquote style="border-left: 2px solid #1010FF; margin-left: 5px; padding-left: 5px; color: #000; font-weight: normal; font-style: normal; text-decoration: none; font-family: Helvetica,Arial,sans-serif; font-size: 12pt;" data-mce-style="border-left: 2px solid #1010FF; margin-left: 5px; padding-left: 5px; color: #000; font-weight: normal; font-style: normal; text-decoration: none; font-family: Helvetica,Arial,sans-serif; font-size: 12pt;">On Tue, 3 Jan 2017 10:14:53 -0500 (EST)<br>Chris Fowler &lt;cfowler@outpostsentinel.com&gt; wrote:<br><br>&gt; I'm a bit confused on what I can do with fetchmail with IMAP.<br><br><br><br>&gt; <br>&gt; I want to connect to a remote IMAP server, fetch email, but not<br>&gt; delete them (keep). I want to do this all the time so that I can use<br>&gt; procmail on where fetchmail is running to search these emails, sort<br>&gt; them based on criteria. <br><br>poll mail.bagelpatunias.com protocol IMAP:<br>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;user 'slitt@bagelpatunias.com' there is 'slitt' here<br>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;pass 'wouldnt_you_like_to_know'<br>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;limit 50000000<br>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;warnings 3200<br>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;expunge 60<br>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;mda "/usr/bin/procmail -d %T"<br>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;fetchall<br>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;ssl;<br><br>To leave the mail on the IMAP server, eliminate the expunge command<br>(try it to make sure, I've been wrong before).<br></blockquote><div><br></div><div>I think I found a combo that work.</div><div><br data-mce-bogus="1"></div><div>I need to use POP3 instead of IMAP. &nbsp;This is allowed over VPN. &nbsp;Blocked on the Internet side. &nbsp;No problem. &nbsp;I use -U (uidl) option with fetchmail. I use keep with fetchmail. &nbsp;Dovecot support UUIDs. &nbsp;</div><div><br data-mce-bogus="1"></div><div>Fetchmail updates a file with UUIDs seen. &nbsp;</div><div><br data-mce-bogus="1"></div><div>I can do this processing in cron instead of a daemon. &nbsp;If no ~/.fetchids exists I create it, give it the correct perms, and do a fetchall. &nbsp;Each execute of fetchmail will only retrieve the new ones.</div><div><br data-mce-bogus="1"></div><div>when fetchmail craps out this time I should just be able to pick up.</div><div><br data-mce-bogus="1"></div><div>--fetchall may not be related to UIDL in the client. &nbsp;Fetchall tells fetchmail to retrieve all emails, even the ones marked by the server as seen. &nbsp;UIDL tracking is done&nbsp;by the client using a file. &nbsp;If I'm guessing right then this should do exactly what I need it to do. &nbsp;Now continuing this typing I noticed I was wrong. &nbsp;</div><div><br data-mce-bogus="1"></div><div>This is correct:</div><div>1. Remove option fetchall from .fetchmailrc</div><div>2. In wrapper calling fetchmail look for ~/.fetchids. &nbsp;If not there create it and use -a (fetchall)</div><div>3. If there do not use -a fetchmail will do the right thing.</div><div><br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div>I've added flock to the bash wrapper to make sure only one at a time from cron. &nbsp;I'll run this from cron every 30 minutes or so. &nbsp;It will do what it needs to do.</div><div><br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div></div></div></body></html>