Re: sharutils || uuencode
Bob Proulx <[email protected]> Sat, 5 Dec 2020 22:12:24 -0700
| Newsgroups | gmane.comp.gnu.utils.bugs |
|---|---|
| Message-ID | <[email protected]> |
[email protected] wrote: > The particular utility uuencode was running fine on OEL5 but is not > working on OL7. The attachments in OL7 are not getting attached but > rather getting pasted in mail body. In the way that Bruce mentioned that things are rather casually supported could you share the command being used that used to work one way and is now working another way, that is not working? Because it seems strange to me that when sharutils itself isn't changing at all that anything regarding it would be changing at all. It feels to me like whatever it happening it might be happening outside of shartutils entirely. And below you will see my suspicions in detail. > I was surfing through google to see if I can get help on any forum > and found one below URL which says that uuencode is no longer being > supported from version 6 onwards of RHEL. Red Hat is well known for only officially supporting a very limited set of packages for their distribution. But most people continue to install other packages and use them okay regardless. > Uuencode for mail attachments not working > (unix.com)<https://www.unix.com/shell-programming-and-scripting/252437-uuencode-mail-attachments-not-working.html> In that thread I see this usage. Is this the same usage you are referring to? uuencode testfile testfile | mail emailadress If so then that should *never* have produced attachments. If the result is the output of uuencode in the body of the message then that is exactly what it should be doing in that command usage. That is exactly what it always did previously in that command usage. Since the "mail" command is not being told to produce an attachment but to mail the stdin as the body of the message. That's the way that command usage works! There should be no expectation of an attachment there. That is actually one of main reasons for shar and unshar. One can shar up a file and pipe it into mail and on the receiving end one can then pipe the message through unshar. shar testfile | mailx -s "shar file to you" emailaddress And then on the receiving end one can pipe it to unshar. In my mailer I can simply type the "|" pipe character and then the command to which to pipe the message into as standard input. | unshar However as Bruce noted since MIME mail is now a standard the base64 encoding for most attachments is a more routine way to send something small enough to mail as a contained file these days. If anyone is doing anything like this now then MIME attachments are now standard and would be the preferred method. However this is implemented by the MUA mail user agent and not something that users need to know about. Example using the mutt mail user agent. If the file is binary then it will use a base64 encoding for the attachment very similar to uuencode yet distinct and separate in implementation from it. echo "See attached." | mutt -s "I attach testfile" -a testfile -- emailaddress Bob