how to download the file from mail box...?


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting how to download the file from mail box...?
# 1  
Old 08-04-2008
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  
Old 08-04-2008
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  
Old 08-04-2008
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
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

UNIX mail box

Currrently I am not able to send/receive any emails to email id. I believe my mail box is full in server. could you please let me kknow to clear the emails in the unix server. (2 Replies)
Discussion started by: ramkumar15
2 Replies

2. How to Post in the The UNIX and Linux Forums

Copying , renaming the file from windox box and ftp to Linux box

Hello my dear friends, Two file are auto generated from mon - fri at different directories on same windows box.Every day i have to copy the file, rename it (specific name)and ftp it to linux box specified directory. is it possible to automate this process,If yes this has to be done from windows... (1 Reply)
Discussion started by: umesh yadav
1 Replies

3. Open Source

Shell script file movement to a Mail Box server using ftp commands

Hi All, I have a current Process that runs "windows script " for the file movement that needs to changed to a "DataStage Process (Using shell script )" Source :Text file is getting generated as part of Datastage Jobs processes and resides in a shared drive (Unix server) Target :ftp... (2 Replies)
Discussion started by: developer.dwh9
2 Replies

4. UNIX for Dummies Questions & Answers

Download .xls file from mail and copy to another path using shell script

Hi I have a mail attachment coming from a mail id and evreytime with the same name in .xls format.I have to download the .xls file into a location and convert it itno .csv format and copy the .csv file to another location. (1 Reply)
Discussion started by: bikky6
1 Replies

5. Shell Programming and Scripting

How to embed a html file in a mail sending from Linux box with uuencode or mailx?

How to embed a html file as subject in a mail sending from Linux box with uuencode or mailx or any other way? we do not want the file as attachment, it should be embedded in the mail subject. (2 Replies)
Discussion started by: johnveslin
2 Replies

6. Shell Programming and Scripting

ftp file starting with particular name on Windows box to Unix box using shell script

Hello all ! I'm trying to write a shell script (bash) to ftp a file starting with particular name like "Latest_" that is present on a Windows box to UNIX server. Basically I want to set this script in the cron so that daily the new build that is posted on the Windows box can be downloaded to the... (2 Replies)
Discussion started by: vijayb4u83
2 Replies

7. UNIX for Advanced & Expert Users

Sendmail help for nobody mail box

Hi there all, I got a small tiny problem of not remambering how this worked. I get when I mail to a non existing mailbox I get a return failer to nobody@domain.bla wich will end up in root@domain.bla What I want is to get it to /dev/NULL so I dont get a messege when I mailed to a non existing... (0 Replies)
Discussion started by: draco
0 Replies

8. Shell Programming and Scripting

Unix Mail Box

Hi Friends, I'm new to Unix. I have a fbackup step like /bin/nice /etc/fbackup -f /dev/rmt/0m -i / -I /opt/monitrol/tmp/Index.full 2 > /var/adm/error.log the errors for this step is redirected to a log file. How can I make to trigger mails when error occurs. Please suggest. Thanks in... (4 Replies)
Discussion started by: avik.nandi
4 Replies

9. Shell Programming and Scripting

Mail from unix box

I am executing the below script from unix box If row count is zero the mail should not set to the client The problem is, if row count is zero the mail is going to the client (what is wrong in the script) SET HEAD OFF FEED OFF PAGES 0 Select count(*) as change_count from... (9 Replies)
Discussion started by: pmsuper
9 Replies
Login or Register to Ask a Question