Discussion:
Upgrading from RHEL5x to RHEL 7x
(too old to reply)
Prasad Kumar
2016-04-04 03:58:02 UTC
Permalink
Hi,

We are upgrading from RHEL 5.x to RHEL 7x.

uuencode --version
uuencode (GNU sharutils) 4.13.3
Copyright (C) 1994-2013 Free Software Foundation, Inc., all rights reserved.
This is free software. It is licensed for use, modification and
redistribution under the terms of the
GNU General Public License, version 3 or later
http://gnu.org/licenses/gpl.html


The issue is we have many places where we have used uuencode for attachments and send mail.

Now even after we installed uuencode from shareutils , the same command is not working in RHEL 7 linux.


We get attachment as Junk Characters in the Email body for any attachment we send. This is happening with mail command used like below.

$ uuencode Attachement_file.pdf Attachements.pdf |mail -s "This is Attachment Mail" ***@trimble.com<mailto:***@trimble.com>


Can some one let me know what is this issue and how to resolve this.

Thanks
Prasad
Bob Proulx
2016-04-04 17:26:25 UTC
Permalink
Prasad Kumar wrote:
> We are upgrading from RHEL 5.x to RHEL 7x.
>...
> Now even after we installed uuencode from shareutils , the same
> command is not working in RHEL 7 linux.
>
> We get attachment as Junk Characters in the Email body for any
> attachment we send. This is happening with mail command used like
> below.
>
> $ uuencode Attachement_file.pdf Attachements.pdf |mail -s "This is Attachment Mail" ***@...

I don't have easy access to test systems for RHEL 5 and 7 and
therefore can't easily try to recreate this problem. But it seems
likely to me that the problem may just as easily be in the mail part
of the command.

> Can some one let me know what is this issue and how to resolve this.

Please reduce the problem size. Please try uuencoding a small test
file on both systems and comparing the output produced. Then if the
output is the same you know the problem is not the uuencode but the
mail side of things. On the other hand if they are differen then
there will be a very small test case that can be shared in which to
further debug the problem.

umask 02
echo "Now is the time" > testfile1
uuencode testfile1 testfile1 > output1

cat output1
begin 664 testfile1
03F]W(&ES('1H92!T:6UE"@``
`
end

Hopefully a small test like that on both systems will show that the
output of uuencode is the same on both systems. If not then we would
want to know the versions of each.

Additionally to look only at the mail side of the problem you can test
by creating a test file to mail using your problem file on your
working RHEL 5 system.

uuencode Attachement_file.pdf Attachements.pdf > uuencode.data1
md5sum uuencode.data1
... save this ...

Mail it from the RHEL 7 system.

mail -s "This is Attachment Mail" ***@... < uuencode.data1

Then copy that file to the RHEL 7 system that you suspect of problems.
Verify that the copy is correct be comparing the md5sum. Then mail it
from there.

...copy file to RHEL 7 system ...
md5sum uuencode.data1
... compare to verify that the copy was identical ...
mail -s "This is Attachment Mail" ***@... < uuencode.data1

If this second mail message is corrupted as you describe then again
you know the problem is in the mail side of things and not the
uuencode side of things since the file will have been identical in
both places.

Bob
Prasad Kumar
2016-04-04 20:41:04 UTC
Permalink
Hi Bob,

First I want to Thank you for looking into my issue.

Firstly uuencode versions of RHEL7
uuencode --version
uuencode (GNU sharutils) 4.13.3
Copyright (C) 1994-2013 Free Software Foundation, Inc., all rights reserved.
This is free software. It is licensed for use, modification and
redistribution under the terms of the
GNU General Public License, version 3 or later
<http://gnu.org/licenses/gpl.html>


uuencode versions of RHEL5
uuencode --version
uuencode (GNU sharutils) 4.6.1
Copyright (C) 1994, 1995, 1996, 2002, 2005 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


Test Cases are Below
----------------------------
1. Created Script in RHEL7 and RHEL 5 Instance for
umask 02
echo "Now is the time" > testfile1
uuencode testfile1 testfile1 > output1

Got Same output in both Instance.

begin 664 testfile1
03F]W(&ES('1H92!T:6UE"@``
`
end

2. Created Script in RHEL5
uuencode Attachement_file.pdf Attachements.pdf > uuencode.data1
md5sum uuencode.data1

Sent mail from RHEL5 ( the Attachment was good no Issues)
mail -s "This is Attachment Mail" ***@hotmail.com < uuencode.data1


Saved and transfered the uuencode.data1 to RHEL7
Sent mail from RHEL7 (Attachment is Corrupted)
1. mail -s "This is Attachment Mail" ***@hotmail.com < uuencode.data1
The Attachment is not there instead I get Junk in Body of the mail.

begin 660 Attachements.pdf
M)5!$1BTQ+C0*)<?LCZ(*-2`P(&]B:@H\/"],96YG=&@@-B`P(%(O1FEL=&5R
M("]&;&%T941E8V]D93X^"G-T<F5A;0IXG+U;67,;N1'688$2J>*QDI8CD[)'
M-.F5=8QP#\;>7'O8+WG9M:KRHC=GLZF4I925A_S]=..8DUK9RG#M*I,?B,%\
M:#0:***@F+*;XUW]^N.E>_IS&O_ZG^ZF+6&6,QFFJ:7SW2_RW^+:;)3K^
MK_V)QC^_ZS(F


2. I sent mail with -a option
echo "uuencode testing"|mail -s "This is Attachment Mail" -a uuencode.data1 ***@trimble.com

I got attachment uuencode.data1 to the mail but cannot open the file


3. Compared the md5sum uuencode.data1 in both Systems RHEL 5 and RHEL 7

md5sum uuencode.data1

Got Same result
RHEL5>$md5sum uuencode.data1
caed0be19f6903c899ffc077b1fa8edc uuencode.data1

RHEL7>$ md5sum uuencode.data1
caed0be19f6903c899ffc077b1fa8edc uuencode.data1




Thanks and Regards
Prasad Kumar

________________________________________
From: Bob Proulx <***@proulx.com>
Sent: Monday, April 4, 2016 10:56 PM
To: Prasad Kumar
Cc: bug-gnu-***@gnu.org
Subject: Re: Upgrading from RHEL5x to RHEL 7x

Prasad Kumar wrote:
> We are upgrading from RHEL 5.x to RHEL 7x.
>...
> Now even after we installed uuencode from shareutils , the same
> command is not working in RHEL 7 linux.
>
> We get attachment as Junk Characters in the Email body for any
> attachment we send. This is happening with mail command used like
> below.
>
> $ uuencode Attachement_file.pdf Attachements.pdf |mail -s "This is Attachment Mail" ***@...

I don't have easy access to test systems for RHEL 5 and 7 and
therefore can't easily try to recreate this problem. But it seems
likely to me that the problem may just as easily be in the mail part
of the command.

> Can some one let me know what is this issue and how to resolve this.

Please reduce the problem size. Please try uuencoding a small test
file on both systems and comparing the output produced. Then if the
output is the same you know the problem is not the uuencode but the
mail side of things. On the other hand if they are differen then
there will be a very small test case that can be shared in which to
further debug the problem.

umask 02
echo "Now is the time" > testfile1
uuencode testfile1 testfile1 > output1

cat output1
begin 664 testfile1
03F]W(&ES('1H92!T:6UE"@``
`
end

Hopefully a small test like that on both systems will show that the
output of uuencode is the same on both systems. If not then we would
want to know the versions of each.

Additionally to look only at the mail side of the problem you can test
by creating a test file to mail using your problem file on your
working RHEL 5 system.

uuencode Attachement_file.pdf Attachements.pdf > uuencode.data1
md5sum uuencode.data1
... save this ...

Mail it from the RHEL 7 system.

mail -s "This is Attachment Mail" ***@... < uuencode.data1

Then copy that file to the RHEL 7 system that you suspect of problems.
Verify that the copy is correct be comparing the md5sum. Then mail it
from there.

...copy file to RHEL 7 system ...
md5sum uuencode.data1
... compare to verify that the copy was identical ...
mail -s "This is Attachment Mail" ***@... < uuencode.data1

If this second mail message is corrupted as you describe then again
you know the problem is in the mail side of things and not the
uuencode side of things since the file will have been identical in
both places.


Bob
Bob Proulx
2016-04-04 23:04:07 UTC
Permalink
Hi Prasad,

Prasad Kumar wrote:
> First I want to Thank you for looking into my issue.

Sure. Happy to help.

> umask 02
> echo "Now is the time" > testfile1
> uuencode testfile1 testfile1 > output1
> Got Same output in both Instance.

Then you know that uuencode on both systems are okay. That isn't the
problem you are seeing. You can further confirm this by doing the
longer test with your Attachements.pdf file to be extra certain. (I
asked for the "Now is the time" file so that we could recreate it
without anything external.)

> Saved and transfered the uuencode.data1 to RHEL7
> Sent mail from RHEL7 (Attachment is Corrupted)
> 1. mail -s "This is Attachment Mail" ***@hotmail.com < uuencode.data1
> The Attachment is not there instead I get Junk in Body of the mail.

This shows the problem is in the mail side of things.

> 2. I sent mail with -a option
> echo "uuencode testing"|mail -s "This is Attachment Mail" -a uuencode.data1 ***@trimble.com
>
> I got attachment uuencode.data1 to the mail but cannot open the file

What is your 'mail' command on RHEL7? The command line 'mail' command
has been many different over many years and systems. On my Debian
system /usr/bin/mail is the bsd-mailx command selected through the
Debian alternatives system which is not used for that purpose on RHEL.

ls -l /usr/bin/mail
rpm -qf /usr/bin/mail

That first may show a symlink. I don't know. The second should show
the package associated with the file. (-q query, -f file). Hoping it
will be something like bsd-mailx or Heirloom mailx. Or something. Do
the same on your working RHEL 5 system. Compare them. One is working
and the other is not. Something is different on the one that is not.

And by different I suspect it is the entire email software stack. The
two common MTAs for RHEL are Sendmail and Postfix. Which are you
using?

alternatives --display mta

It is possible that your mail transport agent is configured one way on
your RHEL 5 system and (probably not at all) configured differently on
your later RHEL 7 system. Plus note that RHEL 7 has systemd which has
probably included and subsumed the mail transfer agent within itself
and so you might have to study it too.

Since you are using RHEL it implies that you have a paid support
contract with Red Hat. You might try getting something for your paid
money and asking for support.

Bob
Prasad Kumar
2016-04-05 08:55:29 UTC
Permalink
Hi Bob,

What should be my Next Step to figure out why this is happening , before going to the Support Team.

So that I can explain them what exactly needs to be checked.

I am a Oracle Technical so not having much knowledge in depth with Linux Systems.

Thanks
Prasad Kumar

________________________________________
From: Prasad Kumar <***@hotmail.com>
Sent: Tuesday, April 5, 2016 2:11 AM
To: Bob Proulx
Cc: bug-gnu-***@gnu.org
Subject: Re: Upgrading from RHEL5x to RHEL 7x

Hi Bob,

First I want to Thank you for looking into my issue.

Firstly uuencode versions of RHEL7
uuencode --version
uuencode (GNU sharutils) 4.13.3
Copyright (C) 1994-2013 Free Software Foundation, Inc., all rights reserved.
This is free software. It is licensed for use, modification and
redistribution under the terms of the
GNU General Public License, version 3 or later
<http://gnu.org/licenses/gpl.html>


uuencode versions of RHEL5
uuencode --version
uuencode (GNU sharutils) 4.6.1
Copyright (C) 1994, 1995, 1996, 2002, 2005 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


Test Cases are Below
----------------------------
1. Created Script in RHEL7 and RHEL 5 Instance for
umask 02
echo "Now is the time" > testfile1
uuencode testfile1 testfile1 > output1

Got Same output in both Instance.

begin 664 testfile1
03F]W(&ES('1H92!T:6UE"@``
`
end

2. Created Script in RHEL5
uuencode Attachement_file.pdf Attachements.pdf > uuencode.data1
md5sum uuencode.data1

Sent mail from RHEL5 ( the Attachment was good no Issues)
mail -s "This is Attachment Mail" ***@hotmail.com < uuencode.data1


Saved and transfered the uuencode.data1 to RHEL7
Sent mail from RHEL7 (Attachment is Corrupted)
1. mail -s "This is Attachment Mail" ***@hotmail.com < uuencode.data1
The Attachment is not there instead I get Junk in Body of the mail.

begin 660 Attachements.pdf
M)5!$1BTQ+C0*)<?LCZ(*-2`P(&]B:@H\/"],96YG=&@@-B`P(%(O1FEL=&5R
M("]&;&%T941E8V]D93X^"G-T<F5A;0IXG+U;67,;N1'688$2J>*QDI8CD[)'
M-.F5=8QP#\;>7'O8+WG9M:KRHC=GLZF4I925A_S]=..8DUK9RG#M*I,?B,%\
M:#0:***@F+*;XUW]^N.E>_IS&O_ZG^ZF+6&6,QFFJ:7SW2_RW^+:;)3K^
MK_V)QC^_ZS(F


2. I sent mail with -a option
echo "uuencode testing"|mail -s "This is Attachment Mail" -a uuencode.data1 ***@trimble.com

I got attachment uuencode.data1 to the mail but cannot open the file


3. Compared the md5sum uuencode.data1 in both Systems RHEL 5 and RHEL 7

md5sum uuencode.data1

Got Same result
RHEL5>$md5sum uuencode.data1
caed0be19f6903c899ffc077b1fa8edc uuencode.data1

RHEL7>$ md5sum uuencode.data1
caed0be19f6903c899ffc077b1fa8edc uuencode.data1




Thanks and Regards
Prasad Kumar

________________________________________
From: Bob Proulx <***@proulx.com>
Sent: Monday, April 4, 2016 10:56 PM
To: Prasad Kumar
Cc: bug-gnu-***@gnu.org
Subject: Re: Upgrading from RHEL5x to RHEL 7x

Prasad Kumar wrote:
> We are upgrading from RHEL 5.x to RHEL 7x.
>...
> Now even after we installed uuencode from shareutils , the same
> command is not working in RHEL 7 linux.
>
> We get attachment as Junk Characters in the Email body for any
> attachment we send. This is happening with mail command used like
> below.
>
> $ uuencode Attachement_file.pdf Attachements.pdf |mail -s "This is Attachment Mail" ***@...

I don't have easy access to test systems for RHEL 5 and 7 and
therefore can't easily try to recreate this problem. But it seems
likely to me that the problem may just as easily be in the mail part
of the command.

> Can some one let me know what is this issue and how to resolve this.

Please reduce the problem size. Please try uuencoding a small test
file on both systems and comparing the output produced. Then if the
output is the same you know the problem is not the uuencode but the
mail side of things. On the other hand if they are differen then
there will be a very small test case that can be shared in which to
further debug the problem.

umask 02
echo "Now is the time" > testfile1
uuencode testfile1 testfile1 > output1

cat output1
begin 664 testfile1
03F]W(&ES('1H92!T:6UE"@``
`
end

Hopefully a small test like that on both systems will show that the
output of uuencode is the same on both systems. If not then we would
want to know the versions of each.

Additionally to look only at the mail side of the problem you can test
by creating a test file to mail using your problem file on your
working RHEL 5 system.

uuencode Attachement_file.pdf Attachements.pdf > uuencode.data1
md5sum uuencode.data1
... save this ...

Mail it from the RHEL 7 system.

mail -s "This is Attachment Mail" ***@... < uuencode.data1

Then copy that file to the RHEL 7 system that you suspect of problems.
Verify that the copy is correct be comparing the md5sum. Then mail it
from there.

...copy file to RHEL 7 system ...
md5sum uuencode.data1
... compare to verify that the copy was identical ...
mail -s "This is Attachment Mail" ***@... < uuencode.data1

If this second mail message is corrupted as you describe then again
you know the problem is in the mail side of things and not the
uuencode side of things since the file will have been identical in
both places.


Bob
Continue reading on narkive:
Loading...