The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
download specified file from ftp server vaskarbasak Shell Programming and Scripting 1 06-25-2008 04:18 AM
download file using wget alphasahoo UNIX and Linux Applications 1 06-16-2008 07:19 AM
download a particular file using wget alphasahoo Shell Programming and Scripting 1 06-13-2008 10:58 AM
Using wget to download a file thoughts UNIX for Dummies Questions & Answers 4 02-20-2008 11:38 AM
Pull E-mail address from file, send e-mail DC Heard Shell Programming and Scripting 1 01-29-2008 02:23 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 08-04-2008
psiva_arul's Avatar
psiva_arul psiva_arul is offline
Registered User
  
 

Join Date: Jul 2007
Location: Bangalore, India
Posts: 97
how to download the file from mail box...?

Ho Experts,

I have a complicated question that is

i want to download the attachement file from mailbox which is having the subject as the "external data" and downloaded the file put it into my local machine particular dir.

simple steps:
Find the mail which is having the subject "external data"
download the attached file and loaded it into my local machine.

everything would be in automated using csh (shell script).

Please suggest me on this.

Regards,
MPS
  #2 (permalink)  
Old 08-04-2008
era era is offline Forum Advisor  
Herder of Useless Cats (On Sabbatical)
  
 

Join Date: Mar 2008
Location: /there/is/only/bin/sh
Posts: 3,652
Without additional knowledge of your mailbox organization, only high-level advice is possible.

If you are using IMAP, and you know the subject and/or index within the mailbox of the message you want the attachment from, it's pretty much a schoolbook example of how you use IMAP on the protocol level. I cannot point to any canned command-line IMAP client, although e.g. the Perl IMAP libraries (and I imagine the Python ones) probably have all you need, including a working example of something very close to what you need.

If you are using POP, it's basically similar, although the details will be different, and the protocol doesn't offer direct access to individual attachments within a message, if I recall correctly.

If you are using a local mailbox, it's not "downloading", so I guess that's not what you need, but if you know how to accomplish what you want on an individual local message, that's of course already a good start, and all that remains is the downloading part.

I don't particularly recommend csh for scripting, and apart from its general limitations, it certainly does not offer facilities for connecting over the network. You can invoke external programs which do that, but then the main body of the script will be in a different language; that of the network client.

If this is for school (which somehow the tone of the "assignment" resembles) then you should know that this site frowns upon posting homework.
  #3 (permalink)  
Old 08-04-2008
psiva_arul's Avatar
psiva_arul psiva_arul is offline
Registered User
  
 

Join Date: Jul 2007
Location: Bangalore, India
Posts: 97
Hi era,

Its not for school work, i am facing some problem while downloading the file from mail box.

i will give the full details on tomorrow.

Regards,
MPS
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 03:03 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0