Sponsored Content
Top Forums Shell Programming and Scripting how to download the file from mail box...? Post 302221420 by era on Monday 4th of August 2008 12:19:45 PM
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.
 

9 More Discussions You Might Find Interesting

1. 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

2. 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

3. 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

4. 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

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. 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

7. 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

8. 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

9. 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
FETCHYAHOO(1)						      General Commands Manual						     FETCHYAHOO(1)

bg.

NAME
fetchyahoo - retrieve mail from Yahoo!'s webmail service SYNOPSIS
fetchyahoo [options] DESCRIPTION
FetchYahoo is a Perl script that downloads mail from a Yahoo! account to a local mail spool. It is meant to replace fetchmail for people using Yahoo! mail since Yahoo!'s POP service no longer free. It downloads messages to a local mail spool, including all parts and attach- ments. It then deletes messages unless requested not to. It can also optionally forward messages to a specified e-mail address and repeat with a given interval. OPTIONS
This program follows the usual GNU command line syntax, with long options starting with two dashes (`-'). A summary of options is included below. For additional information, see the HTML documentation. --help Show summary of options. --version Show version of program. --quiet, --noquiet Suppress (or do not suppress) non-error messages. --noerrors, --errors Suppress (or do not suppress) error messages. --configfile=CONFIG-FILE Use CONFIG-FILE as the configuration file. --username=USERNAME Use USERNAME as the Yahoo! login. --password=PASSWORD Use PASSWORD as your Yahoo! password. --spoolfile=SPOOL Specify SPOOL as the file to spool messages to; if --pipe is also specified, SPOOL is a program that accepts messages from standard input (such as procmail). --https --nohttps Use insecure plaintext or secure HTTPS to login (default is to use HTTPS). --append Append messages to the SPOOL (the default behavior). --pipe Pipe messages to the program SPOOL, instead of appending to SPOOL. --overwrite Overwrite SPOOL, instead of appending to it. --folder=FOLDER Specify the folder on Yahoo! to download messages from. (Default is Inbox.) --newonly Only download new messages. (The default is to download all messages.) --allmsgs Download all messages. --nodelete, --delete Do not (or do) delete messages after they are downloaded. --nodownload, --download Do not download messages; however, they will be deleted unless --nodelete is also specified. (--download is the default.) --listmessages, --nolistmessages List messages in mail folder. (--nolistmessages is the default.) --onlylistmessages Only list messages in mail folder. This combines --listmessages, --nodownload and --nodelete --emptybulk Empty Bulk folder before downloading messages. --emptytrashbefore Empty trash before downloading messages. --emptytrashafter Empty trash after downloading messages. --noempty Do not empty trash or bulk. (Default) --leaveunread Leave the messages marked as unread on the server. --markread Mark the messages downloaded as read. (Default) --repeatinterval=N Check for mail every N minutes. --statusonly, --nostatusonly Just get the number of messages. (--nostatusonly is the default.) --getexternal, --nogetexternal Retrieve messages from external mailboxes also. (--nogetexternal is the default.) --externalmailboxes=boxes,list retrieve messages from only this comma-separated list of external mailboxes --maxmessages=N Maximum number of messages to download (default is 100). Setting this to over 100 may cause problems. --warninglevel=N Warn if more than N% of storage quota is used. Never warn if N=0 (default is 0). --nofromline, --includefromline Omit (or include) the leading "From " in messages appended or piped. (--includefromline is the default.) --logout, --nologout Log out (or do not log out) of Yahoo! on exit. (--nologout is the default.) --proxyhost=s Hostname to use for proxy (default is off). --proxyport=N Port to use for proxy (default is 80). --proxyuser=s Username to use for proxy authentication (default is no authentication) --proxypass=s Password to use for proxy authentication (default is no authentication) --imaphost=s Hostname to use for IMAP (default is off). --imapport=N Port to use for IMAP (default is 143). --imapuser=s Username to use for IMAP authentication (no default) --imappass=s Password to use for IMAP authentication (no default) --imapmailbox=s IMAP mailbox to use (default is INBOX) --repeatinterval=N Check for mail every N minutes (daemon mode). --md5hex Print the MD5 hex hash value of a password entered interactively FILES /etc/fetchyahoorc $HOME/.fetchyahoorc Configuration files for FetchYahoo. An example configuration file is located in /usr/share/doc/fetchyahoo/examples/ SEE ALSO
procmail(1) /usr/share/doc/fetchyahoo/index.html AUTHOR
FetchYahoo was written by Ravi Ramkissoon <ravi_ramkissoon@yahoo.com>. This manual page was written by Chris Lawrence <lawrencc@debian.org>, for the Debian GNU/Linux system (but may be used by others). September 20, 2002 FETCHYAHOO(1)
All times are GMT -4. The time now is 02:08 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy