Jump to content

Automated Processing Of Pq Emails


SnoWake

Recommended Posts

As a result of the hard work and great efforts of many others, I have slowly migrated my caching "processes" from manual, paper-intensive ones to a simple, efficient eCaching system. Thanks to Jeremy and everyone at GC.COM (Pocket Queries), Clyde and Robert Lipe (GSAK and GPSBabel, respectively), Brian Smith (CacheMate) and Jeff Boulter (Express Logger and other useful tools), I never print cache pages, manually enter coordinates, or even write notes on paper in the field - it's all electronic, integrated, and free of data-entry errors/ommisions/etc.

 

Now that I've got a process/workflow all designed and functioning - it's time to AUTOMATE, right? Thanks to GSAK's macro capabilities, I'm able to automate the processing of GPX files, applying filters, and then output to HTML, CacheMate, Streets and Trips, and even the GPSr, complete with customized icons by cache type. All very cool.

 

The only part that's still fairly manual-intensive is the processing of the daily PQ emails. Since everything else is running on Windows, it's easiest for me to fire up a mail client (Mozilla Thunderbird), log in to my mail server (which is in the other room, here on my home network), navigate to the folder I route them to, and then, one at a time, select them, save the attachment off, and then delete.

 

Once this is complete,I'm off and running. Now, if I could just automate this email attachment extraction, I would be golden - and could probably have the entire process run on a schedule (either via cron, or some Windows scheduler). Ideally, the whole solution could run on a Linux server - but so far I've had no luck getting GSAK to run under WINE.

 

My mail is sitting on a Linux server, and it SEEMS like between Procmail and Perl modules, there should be a fairly straightforward way to accomplish this. I think I may have even had a couple of leads awhile back, based on a previous posting here, but they're long gone.

 

I've already got procmail filtering the incoming messages, and sorting them into a folder. I'm just looking for a "recipe" that pipes it to a script which extracts the attachment (and could then simply discard the message). In a perfect world, I'd even like to replace the PQ# (numeric) filename with the friendlier Pocket Query name (present in the email Subject header). This is a step in my manual process today. Alternatively, the mail is also exposed (on my internal network only) via IMAP - so I would certainly consider any Windows-based solutions as well (perhaps I should crack the Thunderbird manual B) )

 

Is anyone doing this, or does everyone process PQ emails manually? I get 3-5 per day, so that's a lot of "Select Message->Right Click on Attachment->Save As->Navigate to target location" that I'm doing each day... over, and over, and OVER. A prime target for automation - now I just need to find the right tool(s)!

 

Thanks much for any ideas, suggestions, or links to relevant packages, other threads, ??

 

Have a great day,

Billy

(aka SnoWake)

Link to comment

While I don't process nearly as many e-mails as you do, I have automated a little bit. Here is my two cents worth. I too manually extract the pocket queries to a single folder. Once that is done, I have a command script that will convert the file to a PDB format using CMConvert from Smittyware using the command line version of that. The script then moves the file into my PDA installation directory for the next hot synch. The script code is quite simple once you get the CMConvert arguments figured out. Here is a copy of my script that runs under Windows XP.

 

"D:\Program Files\Geocaching\cmconvertCmdLine\cmconvert.exe" -o "D:\My Documents\Geocaching\Pocket Queries\Local.pdb" -B -C -d -D -N 5 -O -s -S -t -a "14194.gpx"

 

"C:\Program Files\Sony Handheld\Instapp.exe" "D:\My Documents\Geocaching\Pocket Queries\Local.pdb"

 

Your drives and app locations may/will be different. This script converts my local pocket query (14194.gps) into the Palm file Local.pdb, then sets it up for the next hotsynch. A couple of things that I would like the Instapp function to do is to install it directly to the card instead of setting it to the main memory, and to also not display the installation window. Anyone know the commands for that?

 

This is a little differnt approach to what you are doing and may not fit in with what you are doing. Maybe someone will find it helpful though.

Link to comment
The only part that's still fairly manual-intensive is the processing of the daily PQ emails.  Since everything else is running on Windows, it's easiest for me to fire up a mail client (Mozilla Thunderbird), log in to my mail server (which is in the other room, here on my home network), navigate to the folder I route them to, and then, one at a time, select them, save the attachment off, and then delete.

 

Once this is complete,I'm off and running.  Now, if I could just automate this email attachment extraction, I would be golden - and could probably have the entire process run on a schedule (either via cron, or some Windows scheduler).  Ideally, the whole solution could run on a Linux server - but so far I've had no luck getting GSAK to run under WINE.

<snip>

 

Is anyone doing this, or does everyone process PQ emails manually?  I get 3-5 per day, so that's a lot of "Select Message->Right Click on Attachment->Save As->Navigate to target location" that I'm doing each day... over, and over, and OVER.  A prime target for automation - now I just need to find the right tool(s)!

 

Try this free email program Calypso. It can automatically download your PQs, then filter and save the PQ's into a folder of your choice, then run a program/macro of your choice. B) B) :P

 

It takes bit of time to set up the filters but it is well worth the effort. I work away from home on a regular basis. I leave the PC on 24/7 and Calypso takes care of extracting my PQ's from my email. GSAK and CacheMate takes care of the rest. I'd be lost without this Calypso/GSAK/CacheMate combo.

 

Edited to <snip> out the bulk and add the following example of one of my filters ...

 

Filter Rule 1:

Created: 05/12/2004 19:40

Last Hit: 23/02/2005 22:02

Hits:

Mode: Incoming

Case: Off

Pattern 1: contact@geocaching.com

Objects: From

RegExp: Off

Operator: AND

Pattern 2: [GEO] Pocket Query:

Objects: Subject

RegExp: Off

Action: Move to folder: 'Pocket Queries'

Execute program 'D:\GSAKcopy.bat'

Save attachments in 'D:\GSAK GPX files''

Edited by Motley Crew
Link to comment
I use an extension called 'Attachment Extractor' that I use to save all of my PQ's at the same time.

 

I run Thunderbird 1.0.

 

From what Clyde has mentioned in other posts he will be including a POP3 email client in a future version GSAK that can be setup to download PQ's from your email server.

Yes, this is definitely scheduled for the next release, 5.2

 

This feature will allow you to interrogate (by subject line) a pop3 server and download emails and automatically extract the attachments to a given folder. You will also have the option to leave the mail on the server or to delete it.

 

This will be fully supported in the macro language, so you will then be able to do the lot from within a GSAK macro.

Link to comment
I use an extension called 'Attachment Extractor' that I use to save all of my PQ's at the same time.

 

I run Thunderbird 1.0.

 

From what Clyde has mentioned in other posts he will be including a POP3 email client in a future version GSAK that can be setup to download PQ's from your email server.

Yes, this is definitely scheduled for the next release, 5.2

 

This feature will allow you to interrogate (by subject line) a pop3 server and download emails and automatically extract the attachments to a given folder. You will also have the option to leave the mail on the server or to delete it.

 

This will be fully supported in the macro language, so you will then be able to do the lot from within a GSAK macro.

Sounds excellent - can't wait - now about that 'Parking' & 'Info' icon .... <_<

Link to comment
I use an extension called 'Attachment Extractor' that I use to save all of my PQ's at the same time.

 

I run Thunderbird 1.0.

 

From what Clyde has mentioned in other posts he will be including a POP3 email client in a future version GSAK that can be setup to download PQ's from your email server.

Yes, this is definitely scheduled for the next release, 5.2

 

This feature will allow you to interrogate (by subject line) a pop3 server and download emails and automatically extract the attachments to a given folder. You will also have the option to leave the mail on the server or to delete it.

 

This will be fully supported in the macro language, so you will then be able to do the lot from within a GSAK macro.

Thank you Clyde that is the last step needed by many of us to create a completely automated process.

Link to comment

Wow - gotta love the forums! Much thanks to all - I'm still holding out hope for a procmail recipe and Perl modules or something to that effect to automate this process on the Linux server - but LOTS of great ideas here.

 

Then Clyde goes and drops a hint as to that 5.2 feature, and... WOW. I'll experiment with some of these others in the interim, but that will be a big enhancement, from my perspective.

 

Time to go grab that Attachment Extractor - as it sounds like, at a minimum, that could streamline my manual process while I wait for POP support in GSAK. I guess asking for IMAP is just getting greedy - but I've already got that compiled/installed/configured, appropriate firewall rules set, etc for that protocol. Adding POP will be well worth the reward!

 

Thanks again, and keep those ideas coming!

Link to comment
Wow - gotta love the forums! Much thanks to all - I'm still holding out hope for a procmail recipe and Perl modules or something to that effect to automate this process on the Linux server - but LOTS of great ideas here.

 

I'm pretty sure that I've posted the .procmailrc and little scripting ditties (IIRC, they were shell and not perl) that I've used to do this for years. procmail recognizes an incoming PQ and uncompresses it, names it sensibly, squirrels it into a fixed place so that my other Perl code can come honk on it.

 

I'm travelling right now and can't readily get to them, but if you can't find it with the search on the forums, mail me next week and I"ll share.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...