LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-14-2013, 06:12 PM   #1
nancydrew72
LQ Newbie
 
Registered: Apr 2012
Posts: 8

Rep: Reputation: Disabled
uuencode issue with rhel 6.3


Just installed sharutil package for rhel6.3 and tried to send email with attachment to myself. This is only a portion of what I receive:
begin 666 mail0254.pdf
M)5!$1BTQ+C$-"B7T]/3T#0HU(#`@;V)J#0H\/`T*+U1Y<&4@+T9O;G0-"B]3
M=6)T>7!E("]4>7!E,0T*+TYA;64@+T8Q#0HO16YC;V1I;F<@,3`@,"!2#0HO
M0F%S949O;G0@+T-O=7)I97(-"CX^#0IE;F1O8FH-"C8@,"!O8FH-"CP\#0HO
M5'EP92`O1F]N=`T*+U-U8G1Y<&4@+U1Y<&4Q#0HO3F%M92`O1C(-"B]%;F-O
>"CX^#0IS=&%R='AR968-"C,S,SDV#0HE)45/1@T*
`
end

Anyone ever experienced this and know what the issue is and how to correct?

Any assistance is appreciated.

Sincerely,
Nancy Drew
 
Old 02-14-2013, 06:16 PM   #2
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,241

Rep: Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325
Can you show the exact cmd you used?
Also, the distro name + version and SMTP server?

It looks like you've sent it inline instead of as an actual attachment.
 
Old 02-14-2013, 08:18 PM   #3
thomas.hedden
Member
 
Registered: May 2006
Location: Carlisle, MA
Distribution: Ubuntu, Fedora
Posts: 50

Rep: Reputation: 15
What mail client are you using?
It's possible that everything is OK.
Some mail clients can recognize attachments and handle them automatically.
Really old-fasioned ones require that you manually decode the encoded attachment.
Tom
 
Old 02-15-2013, 01:34 PM   #4
nancydrew72
LQ Newbie
 
Registered: Apr 2012
Posts: 8

Original Poster
Rep: Reputation: Disabled
I'm on RHEL 6.3 and the email is being sent via postfix.

The command is being executed as part of a script. This same script is running on a different server but on RHEL 5.3 and works fine.

TEMPFILE=/tmp/MAIL$$.PDF
TEMPUU=/tmp/MAIL$$.UU
MEMOFILE=/tmp/MEMO$$.txt

uuencode ${TEMPFILE} report.pdf > ${TEMPUU}

cat ${TEMPUU} >> ${MEMOFILE}

mail -s "${SUBJECT}" ${EMAILADDR} < ${MEMOFILE}


Thanks for your help.

Regards,

Nancy Drew
 
Old 02-15-2013, 01:55 PM   #5
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,331
Blog Entries: 55

Rep: Reputation: 3531Reputation: 3531Reputation: 3531Reputation: 3531Reputation: 3531Reputation: 3531Reputation: 3531Reputation: 3531Reputation: 3531Reputation: 3531Reputation: 3531
Missing MIME header. Easiest for such mail type of ops would be to use 'mpack' which you'll find in the RPMforge repo.
 
Old 02-16-2013, 09:08 AM   #6
thomas.hedden
Member
 
Registered: May 2006
Location: Carlisle, MA
Distribution: Ubuntu, Fedora
Posts: 50

Rep: Reputation: 15
There are a number of questions here.
I'm curious why you are using temporary files
rather than pipes. You are creating an
unnecessary security risk by doing so.
I also don't understand why you are appending
the encoded message to another file rather
than using the existing encoded file. That
means that whatever was in the file before
will be at THE TOP of the message, which is
where the header should be. As for the header,
I think that uuencode creates an adequate
header for this puspose. One might also ask
why you are using uuencode instead of MIME,
but uuencode should work.
The main point, however, is what mailer is
RECEIVING the message and what is the
problem with the message AS RECEIVED.
Tom
--
Quote:
Originally Posted by nancydrew72 View Post
I'm on RHEL 6.3 and the email is being sent via postfix.

The command is being executed as part of a script. This same script is running on a different server but on RHEL 5.3 and works fine.

TEMPFILE=/tmp/MAIL$$.PDF
TEMPUU=/tmp/MAIL$$.UU
MEMOFILE=/tmp/MEMO$$.txt

uuencode ${TEMPFILE} report.pdf > ${TEMPUU}

cat ${TEMPUU} >> ${MEMOFILE}

mail -s "${SUBJECT}" ${EMAILADDR} < ${MEMOFILE}


Thanks for your help.

Regards,

Nancy Drew
 
Old 02-16-2013, 10:29 AM   #7
shivaa
Senior Member
 
Registered: Jul 2012
Location: Grenoble, Fr.
Distribution: Sun Solaris, RHEL, Ubuntu, Debian 6.0
Posts: 1,800
Blog Entries: 4

Rep: Reputation: 286Reputation: 286Reputation: 286
Simplest way to send an attachment is:
Code:
[user@host]~$ uuencode /path/to/file.txt file.txt | mailx -s "subject" abc@example.com
Can you try this? And did you check mail services running on your system or not.
 
Old 11-20-2013, 11:34 PM   #8
nick-lek
LQ Newbie
 
Registered: Jun 2011
Posts: 4

Rep: Reputation: Disabled
Hi Nancy,
I am facing the same problem like you...
The command I use to send attachment is working fine in my old server.

>>> uuencode original_full_path_file_name attachment_file_name| mail -s "mail subject" email_address

May I know your problem is solved? If so, can you share with me how you solved it?
Thank you very much.

regards,
nick
 
Old 05-06-2014, 10:23 PM   #9
beeng
LQ Newbie
 
Registered: May 2014
Posts: 1

Rep: Reputation: Disabled
Angry uuencode not working in rel 6.3

I am facing the same issue here. What is the resolution to it
 
Old 05-07-2014, 10:10 AM   #10
thomas.hedden
Member
 
Registered: May 2006
Location: Carlisle, MA
Distribution: Ubuntu, Fedora
Posts: 50

Rep: Reputation: 15
I suspect that the problem is the mail client you are using to read the message.
Most mail clients detect encoded attachments and decode them automatically.
I just tested what you did and e-mailed the file to myself via Gmail. The
attachment was recognized automatically and appeared as an attachment to the
message in my inbox.
Command line mail clients don't do that. If the message you receive is a text
file containing the encoded text, then your e-mail client is not doing this
automatically. In that case, just copy out the part of the e-mail message
between (and including) the next two lines:
begin [3 digit number] [name of attachment]
end
Paste that text, including the "begin" and "end" lines, into a text file.
Name it whatever you want, for example "name_of_text_file.uu". Then, in the
same directory (if not in same directory, use absolute path name), type:
$ uudecode name_of_text_file.uu
The original encoded attachment will be decoded and appear in the same directory.
(Be careful not to overwrite any existing file in that directory.)
I suggest that you read the "man page" for uuencode.
Tom
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
uuencode question dennismonsewicz Linux - Newbie 6 01-06-2010 05:22 PM
uuencode sherimm Linux - Software 4 01-22-2009 02:47 AM
Problem using uuencode hashbangbinbash Linux - Newbie 2 04-17-2008 09:54 AM
does fedora have uuencode? sorno Linux - Newbie 2 08-07-2005 07:40 AM
uuencode Berhanie Programming 4 11-27-2004 07:33 PM


All times are GMT -5. The time now is 12:58 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration