Sponsored Content
Top Forums Shell Programming and Scripting Extract all attachments from unix mailbox file Post 302208749 by raynor on Tuesday 24th of June 2008 10:42:00 PM
Old 06-24-2008
thx

Hi,

Thanks for the answers. Actually both of you give an answer which is part of the solution. I was thinking that someone must wrote a tool like munpack for it.

The only problem with munpack that it can't process a single mailbox file, eg: thunderbird's inbox. It only works if I make a test.txt which containst only a single mail which starts with:

From <sender> Mon Jun 16 20:42:11 2008
...
and ends with
--------------=CODE--

So I still have to cut this file apart to single mails in order to extract the attachments from them but I can do it from here. Thx guys.
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Mailbox file format

Does anyone know where can I find information about UNIX mailbox files' organization? I am willing to develop a file-mailbox-compliant mail agent, but for doing so I need that information. (1 Reply)
Discussion started by: exile
1 Replies

2. UNIX for Advanced & Expert Users

sending attachments via unix

Hi, I need to send a mail attachment from the UNIX commandline. I'm using Tru64 and the mail client thats supposed receive the attached file (an excel sheet) is Lotus Notes. Can anybody help me out? (6 Replies)
Discussion started by: Abhishek Ghose
6 Replies

3. UNIX for Dummies Questions & Answers

Can you e-mail files as attachments from unix to windows?

Another question if you guys don't mind, if you do this: cat * |mailx -s xxxxx <email> it will send files to a email address displayed as sdout, is there a quick way to send files to a e-mail address but as a attachement? Say if I renamed files to .xls on unix, and sent them to a e-mail... (4 Replies)
Discussion started by: nj78
4 Replies

4. Shell Programming and Scripting

Reading a mailbox and sending new messages to a text file

I'm new to scripting and have been tasked with creating a script that will read a mailbox, such as /var/mail/user1, scan it for new messages, then send those new messages to another file. It also has to be looped to run almost continuously. Any help would be greatly appreciated (1 Reply)
Discussion started by: rsw626
1 Replies

5. AIX

Aix Unix Mailx Attachments

I'm trying to send a mailx with an attachment, really I have not do it in a long time. I forgot (3 Replies)
Discussion started by: darioa
3 Replies

6. HP-UX

Sending Unix files as attachments in an email

Hi, I am executing the following command in order to send a file as an attachment: mailx -s "Subject" emailID@xyz.com < Testfile.txt Instead of attaching the file Testfile.txt, it is writing the contents of the file in the email message body. Please advise on how I can send the file as an... (7 Replies)
Discussion started by: sangharsh
7 Replies

7. Shell Programming and Scripting

Reading Mail attachments using unix

:wall:hi all, please somebody can help me out in reading the pop3 mail attachments or saving it locally i have a mail account where i receive .csv attachments i need to read that attachments and process them. any sample code can be much appriciated Removed email :wall: (3 Replies)
Discussion started by: srikanthkadapal
3 Replies

8. Shell Programming and Scripting

unix email attachments in web mail

Hi, Request you to please help on my issue. My issue is: We are able to send the log files as an email attachment. We are able to get the attachment in our inbox. But when we try to see in web mail, instead of the attachment, junk characters are displaying. Appreciate your help. Regards,... (10 Replies)
Discussion started by: gi.srinivas
10 Replies

9. UNIX for Dummies Questions & Answers

Sending attachments via unix

OS Linux....Just curious as to why this is not working... uuencode test.txt "test.xls"|mailx -r xxx@server.com -s "validation report" emailrecipient1,emailrecipient2 Please help....Any other options do we need to use?? (3 Replies)
Discussion started by: saggiboy10
3 Replies

10. Shell Programming and Scripting

Issue with opening the UNIX mailx attachments on iPhone/iOS

I have created a simple log file (abc.log) with Hello World, from my UNIX script. At the end of the script, I have attached the log to my email using uuencode & mailx command. THe email was send successfully and opening on my desktop without any issues. I have the email sync with my iPhone... (7 Replies)
Discussion started by: karumudi7
7 Replies
Mail::Server::IMAP4::List(3pm)				User Contributed Perl Documentation			    Mail::Server::IMAP4::List(3pm)

NAME
Mail::Server::IMAP4::List - folder related IMAP4 answers SYNOPSIS
my $imap = Mail::Server::IMAP4::List->new ( folders => $folders # Mail::Box::Identity , inbox => $inbox # Mail::Box , delimiter => '#' ); my $imap = Mail::Server::IMAP4::List->new(user => $user); print $imap->list(...); # for LIST command METHODS
Constructors Mail::Server::IMAP4::List->new(USER) Create a (temporary) object to handle the LIST requests for a certain user, based upon a set of folders. The data is kept by Mail::Box::Identity and Mail::Box::Collection objects, which mean that the folders will not be opened to answer these questions. -Option --Default delimeter '/' folders <from user> inbox <from user> user <undef> delimeter => STRING|CODE Either the constant delimiter, or a code reference which will get passed a folder name and should return the delimiter string used in that name. If that folder name is empty, the default delimiter must be reported. See delimiter() for an example. folders => OBJECT You need to specify either a set of folders explicitly or via the user. Some Mail::Box::Identity OBJECT is needed. inbox => BOOLEAN For now, only used to see whether there is an inbox, so a truth value will do. This may change in the future. By default, the flag is set if "$user-"inbox> is defined. user => OBJECT A Mail::Box::Manage::User OBJECT, representing the user who's folders must get reported. Attributes $obj->delimiter([FOLDERNAME]) Returns the delimiter string. The foldername is only required when a CODE reference was specified at initiation. example: setting-up an IMAP4 delimeter sub delim($) { my $path = shift; my ($delim, $root) = $path =~ m/^(#news.)/ ? ('.', $1) = $path =~ m!^/! ? ('/', '/') : ('/', ''); wantarray ? ($delim, $root) : $delim; } my $list = Mail::Server::IMAP4::List->new(delimiter => &delim, ...); print $list->delimiter('abc/xyz'); # returns a / (slash) and '' print $list->delimiter('#news.feed'); # returns a . (dot) and $news. print $list->delimiter(''); # returns default delimiter $obj->folders() Returns the Mail::Box::Identity of the toplevel folder. $obj->inbox() Returns the Mail::Box or filename of the INBOX. $obj->user() Returns the Mail::Box::Manage::User object, if defined. IMAP Commands $obj->list(BASE, PATTERN) IMAP's LIST command. The request must be partially decoded, the answer will need to be encoded. example: using IMAP list my $imap = Mail::Server::IMAP4::List->new(delimiter => &delim, ...); local $" = ';'; my @lines = $imap->list('', ''); # returns the default delimiter print ">@{$lines[0]}<"; # >(Noselect);/;< my @lines = $imap->list('#news',''); # specific delimiter print ">@{$lines[0]}<"; # >(Noselect);.;< my @lines = $imap->list('top/x/', '%'); print ">@$_<," foreach @lines; # >();/;/tmp/x/y<,>(Marked);/;/tmp/x/z< DETAILS
See RFC2060: "Internet Message Access Protocol IMAP4v1" sections 6.3.8 (LIST question) and 7.2.2 (LIST answer) SEE ALSO
This module is part of Mail-Box distribution version 2.105, built on May 07, 2012. Website: http://perl.overmeer.net/mailbox/ LICENSE
Copyrights 2001-2012 by [Mark Overmeer]. For other contributors see ChangeLog. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See http://www.perl.com/perl/misc/Artistic.html perl v5.14.2 2012-05-07 Mail::Server::IMAP4::List(3pm)
All times are GMT -4. The time now is 07:30 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy