LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-06-2009, 04:44 PM   #1
mpyusko
Member
 
Registered: Oct 2003
Location: Rochester, NY, USA
Distribution: Salckware ver 10.1 - 14.1, Debian too.
Posts: 432
Blog Entries: 1

Rep: Reputation: 41
Question Automatically save email attachments


Is there a way to automatically save file attachments to a specific location? I have a service that emails me daily data files. I would like to be able to have these file placed in a specific folder each time they come in so I don't have to do it manually for 6 files a day. It gets a little tedious and then if I forget..... oh well, you get the idea.

Thanks.
 
Old 09-07-2009, 05:10 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Depending on how you receive email (mailserver, fetchmail, fetched directly with mail client?) that could be automated using a Procmail recipe.
 
Old 09-18-2009, 02:41 PM   #3
mpyusko
Member
 
Registered: Oct 2003
Location: Rochester, NY, USA
Distribution: Salckware ver 10.1 - 14.1, Debian too.
Posts: 432

Original Poster
Blog Entries: 1

Rep: Reputation: 41
I'm using Kmail as my mail client.

Now I've been playing with this for a few days and I can't seem to make it work automatically. I setup a filter in kmail to take all messages with "[GEO]" in the subject and pipe through "procmail". I created a .procmailrc file that is supposed to take all messages piped to it with "[GEO]" in the subject and pipe them through "ripmime". Ripmime is then supposed to extract the attachment from the email message and place it neatly in the /home/mpyusko/Desktop/gc folder.

Now I know my ripmime command is ok, because I can locate the specific message in the maildir and execute the commad on it and the zip file shows up where it is supposed to be. I think my issue lies in the execution of procmail.

The whole point is, I get pocket queries from Geocaching.com and each day superseeds the previous day. So it makes more sense to automatically save them all in the same folder where I only have one copy that is always the most up to date.

If I can get this working, then I can use it for a few other tasks as well.

Code:
cat .procmailrc

:0
* ^Content-Type:.*multipart/mixed
* ^Subject:.*[GEO]
| ripmime -i - -d /home/mpyusko/Desktop/gc --syslog --paranoid --no-nameless --overwrite &&\
Thanks!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Automatically unzip attachments Fredde87 Linux - Server 5 12-30-2008 07:06 AM
download e-mail and save attachments via pop sunpascal Linux - Software 1 04-25-2006 05:24 PM
email attachments rhb327 Linux - Software 2 11-13-2004 09:08 AM
Save Email Attachments mwmethe Linux - Software 1 01-14-2004 07:55 AM
mutt can't save attachments cage Linux - Software 0 08-28-2003 01:12 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:18 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration