LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices


Reply
  Search this Thread
Old 04-18-2007, 12:53 PM   #1
csaunders
LQ Newbie
 
Registered: Jan 2007
Posts: 26

Rep: Reputation: 15
detach mail attachment


Someone sent me a email with an attachment, how do i detach the attachment to a file in Redhat Linux? On the command line...
 
Old 04-18-2007, 01:04 PM   #2
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
Haven't done but I think you can do it with uudecode (you use uuencode to add attachments which I have done).

You should be able to get information from:
man uudecode
 
Old 04-18-2007, 01:48 PM   #3
csaunders
LQ Newbie
 
Registered: Jan 2007
Posts: 26

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by jlightner
Haven't done but I think you can do it with uudecode (you use uuencode to add attachments which I have done).

You should be able to get information from:
man uudecode
whoops, looking at man page for UUDECODE

Last edited by csaunders; 04-18-2007 at 02:04 PM.
 
Old 04-18-2007, 02:09 PM   #4
csaunders
LQ Newbie
 
Registered: Jan 2007
Posts: 26

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by jlightner
Haven't done but I think you can do it with uudecode (you use uuencode to add attachments which I have done).

You should be able to get information from:
man uudecode
but still how do i do this against /var/spool/mail/mailbox?

do i login into my mailbox? then what do i do, im tottally confused
 
Old 04-18-2007, 03:25 PM   #5
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
Run "mail" to read your mailbox.

Type the number of the message that contains the attachment so you can read the message.

Type "s filename" to save the message to filename (where filename is any name you want to give it.)

Run "uudecode -o outfile filename" where filename is the name you used above and outfile is another name (any name you want other than the original) where you want the output to go. This should put the attachment into outfile.

FYI: I just worked this out for a file I uuencoded. Since I hadn't done it before there may be other things I'm not aware of that need to be done or better ways to do it.
 
Old 04-19-2007, 08:23 AM   #6
csaunders
LQ Newbie
 
Registered: Jan 2007
Posts: 26

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by jlightner
Run "mail" to read your mailbox.

Type the number of the message that contains the attachment so you can read the message.

Type "s filename" to save the message to filename (where filename is any name you want to give it.)

Run "uudecode -o outfile filename" where filename is the name you used above and outfile is another name (any name you want other than the original) where you want the output to go. This should put the attachment into outfile.

FYI: I just worked this out for a file I uuencoded. Since I hadn't done it before there may be other things I'm not aware of that need to be done or better ways to do it.
thank you, excellent help
 
  


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
mail attachment tostay2003 Linux - Software 6 10-01-2006 07:07 PM
Mail Attachment size hinetvenkat Linux - Security 3 12-26-2004 08:05 AM
mail server attachment problem sreejithk Linux - Software 0 07-27-2004 01:10 AM
mail -a would not work to send e-mail attachment saavik Linux - Networking 3 12-18-2003 09:33 AM
mail with attachment joseph Linux - Networking 1 08-31-2003 10:01 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat

All times are GMT -5. The time now is 03:42 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