AIX

 View Only
  • 1.  Send file from AIX as mail attachment

    Posted Mon October 04, 2021 10:29 AM

    Hello All,

    How can we fix issues emailing attachments from UNIX (AIX or Linux) and making it show up properly in Outlook?  We used to be able to simply use "uuencode" as part of a sendmail/mailx command inside a script, but it appears Notes knew how to interpret that whereas Outlook does not.  Notes treated it as we wanted – as a separate file attachment, whereas Outlook embeds it into the email note body and it's just garbled text (unreadable). Same command  -but depending on the email destination system, totally different results. Anyone have success sending files from AIX to Outlook ?

     Thanks-in-advance.



    ------------------------------
    Glenn Lehman
    ------------------------------


  • 2.  RE: Send file from AIX as mail attachment

    Posted Tue October 05, 2021 05:29 AM
    There's mutt package available in the AIX toolbox for Linux RPM set. Mutt is capable of sending proper MIME attachments and that might solve your problem.

    ------------------------------
    Lech Szychowski
    ------------------------------



  • 3.  RE: Send file from AIX as mail attachment

    IBM Champion
    Posted Tue October 05, 2021 05:34 AM
    Glenn,

    Hi, we use the following (AIX 7.1 and 7.2), the Email arrives in Outlook with the attachment.

    ( uuencode /dir/attachment-file-name attachment-file-name ) | mailx -s "Subject title" <Email-address>​


    Hope that might help.

    Regards, Steve



    ------------------------------
    Steve Munday
    AIX, IBM i, HMC, PowerVM
    ------------------------------



  • 4.  RE: Send file from AIX as mail attachment

    Posted Tue October 05, 2021 09:22 AM

    Outlook is the only client that I have found that will handle uuencoded attached files.  All others and the Linux world has deemed uuencode old standards and have turned away from it even though it works.  In the Linux world, they expect you to use MIME.  I have heard that there is a "mpack" program that will encode a file as MIME.  I think I used it many, many years ago at a different company.

     

    That said, we attach files to emails in AIX all the time as part of our reports on a DR preparation process.  We use uuencode to do that.  The uuencode command does have a -m option to create a MIME encoded output, but we have never been able to get Outlook to handle it properly.  We echo text to a file, append the output from the uuencode command, and use

    mail -s "test" myemail@myco.com < email_file

    to send it.  It shows up as an attachment.



    ------------------------------
    Bruce
    ------------------------------



  • 5.  RE: Send file from AIX as mail attachment

    Posted Tue October 05, 2021 10:10 AM
    Hi Glenn,


    this line of code on an AIX 7.1 machine works for me in Notes and in Outlook for Mac (16.53). The *.zip file is an attachment to the email I receive.

    /usr/bin/uuencode ${ZIPFILE} ${DATE}_Report_all_AIX_sec.csv.zip | mail -s "${DATE}: Regular AIX Security Patch Report" ${RECIPIENTS}


    ------------------------------
    Marcel Mages-Veidt
    ------------------------------



  • 6.  RE: Send file from AIX as mail attachment

    Posted Fri October 29, 2021 08:49 AM
    Hi Glenn,

    Another example I used to running on Linux/AIX. :)

    mail -s "$RANDOM $(date +%H":"%M) Awesome! Your VM is ready ! " -r "no-reply@POWER.MACHINE" -S smtp="smtp://xx.xx.xx.xx:25" -S sendwait -a /var/log/pvc-cloud-init.log "my_mail@your_domain.com" < /etc/somefile

    ------------------------------
    MARS CHUNG
    ------------------------------