1 2 3 Previous Next 30 Replies Latest reply: Jul 30, 2012 6:51 AM by Catch 22 Go to original post RSS
      • 15. Re: Oracle Linux
        Catch 22
        What do you receive when you type:

        <pre>
        dig -t MX example.com noall answer
        </pre>
        • 16. Re: Oracle Linux
          user13681259
          any help would be much appreciated on this please. Thanks
          • 17. Re: Oracle Linux
            user13681259
            We understand the issue now...
            We need to configure the relay SMTP between our DB machine to relay host in our DNS. Could you please help how to do this... Thanks
            • 18. Re: Oracle Linux
              Catch 22
              The following should do the trick:

              # yum install sendmail-cf

              # vi /etc/mail/sendmail.mc

              dnl define(`SMART_HOST', `smtp.your.provider')dnl
              change to :
              define(`SMART_HOST', `abc.xyz.com')

              # m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf
              # service sendmail restart
              • 19. Re: Oracle Linux
                user13681259
                Thanks, now we are able to receive the test email using the below command

                $ echo "text" | mail -s "Testing the email facility from R12-Apps Machine" me@example.com


                But, while sending as an attachment of backup log file, it just hangs on command prompt.

                $ uuencode -m /u01/appluat/scripts/log/uat_apps__hotbkp_20Apr2012.log | mailx -s "Backup Log file from R12-Apps Machine" me@example.com

                -->> If i press the CTRL+C the below message displays

                (Interrupt -- one more to kill letter)
                Null message body; hope that's ok

                $


                Do, we still need to convert, encode and send the file as like below?


                unix2dos backup.log
                cat backup.log | uuencode -m backup.log > backup.att
                cat backup.att | mailx -s "backup logfile" me@example.com

                Please advise the correct steps. Appreciate your quick help.

                Edited by: user13681259 on May 31, 2012 8:50 PM
                • 20. Re: Oracle Linux
                  Catch 22
                  There are several ways. For instance:
                  MAILTO="me@example.com"
                  ORIG_FILE=myfile
                  CONV_FILE=myfile.txt
                  
                  mailx -s "Daily Report" $MAILTO <<-EOM
                  Please find attached file.
                  Kind regards
                  `unix2dos -n $ORIG_FILE $CONV_FILE`
                  `uuencode -m $CONV_FILE $CONV_FILE`
                  EOM
                  • 21. Re: Oracle Linux
                    Zoltan Kecskemethy
                    I know I'm a bit late but FYI I use mpack linux command to send a file as attachment... so no need a script here...
                    • 22. Re: Oracle Linux
                      Catch 22
                      Mpack does not convert Unix line endings to DOS/Windows, which was one of the required tasks.
                      • 23. Re: Oracle Linux
                        user13681259
                        We are managed to email facility working and now the email are working. But, the file attachemnt are NOT working. Below code has been used in script


                        unix2dos -n ${LOGDIR}/Tablespace-Alert.log ${LOGDIR}/Tablespace-Alert.att
                        uuencode -m ${LOGDIR}/Tablespace-Alert.att Tablespace-Alert.att | mailx -s "ALERT - TableSpace With Less Than 20% Available FREE Space on $ORACLE_SID" me@company.com

                        Email received with below body messaeg...

                        begin-base64 644 UAT_Tablespace-Alert.att
                        DQpUQUJMRVNQQUNFX05BTUUgICAgICAgICAgICAgICAgVE9UQUxfU1BBQ0Ug
                        KE1CKSAgRlJFRSAoTUIpICBVU0VEIChNQikgUEVSX0ZSRUUNCi0tLS0tLS0t
                        LS0tLS0tLS0tLS0tLS0tLS0tLS0tLSAtLS0tLS0tLS0tLS0tLS0tIC0tLS0t
                        LS0tLS0gLS0tLS0tLS0tLSAtLS0tLS0tLQ0KQVBQU19UU19NRURJQSAgICAg
                        ICAgICAgICAgICAgICAgICAgICAgICAgIDMwMDAgICAgICAgIDMwNiAgICAg
                        ICAyNjk0ICAgICAxMCAlDQo=
                        ====


                        Appreciate any help Thanks
                        • 24. Re: Oracle Linux
                          Catch 22
                          There is nothing wrong with the base64 encoding, in fact you can decode the text using http://base64converter.com for instance. The automatic recognizing and handling of email attachments is a task normally performed by the email client. Any sophisticated and modern email client will do. What are you using?
                          • 25. Re: Oracle Linux
                            user13681259
                            we are not getting any attachment and email mody is with this message.

                            We need to have the log file attacment facility to eamil. Plese help to provide the steps
                            • 26. Re: Oracle Linux
                              Catch 22
                              we are not getting any attachment and email mody is with this message.
                              That's perfectly normal and just how email works. Attachments are always part of the original or transmitted SMTP message. Like I said in my previous post, to separate attachments from email you need to have an email client that can handle binary encoding and attachments. The basic Linux or Unix mail utilities will probably only handle text based email - or at least I would never dream of using them for anything else. So again, what are you using?
                              • 27. Re: Oracle Linux
                                user13681259
                                we are sending oracle backup log as an attachment to email to support team after backup completion. But they are receiving the email with below code as message body without any attachment.

                                begin-base64 644 /u01/orauat/scripts/log/UAT_Tablespace-Alert.att
                                ClRBQkxFU1BBQ0VfTkFNRSAgICAgICAgICAgICAgICBUT1RBTF9TUEFDRSAo
                                TUIpICBGUkVFIChNQikgIFVTRUQgKE1CKSBQRVJfRlJFRQotLS0tLS0tLS0t
                                LS0tLS0tLS0tLS0tLS0tLS0tLS0gLS0tLS0tLS0tLS0tLS0tLSAtLS0tLS0t
                                LS0tIC0tLS0tLS0tLS0gLS0tLS0tLS0KQVBQU19UU19NRURJQSAgICAgICAg
                                ICAgICAgICAgICAgICAgICAgICAgIDMwMDAgICAgICAgIDMwNiAgICAgICAy
                                Njk0ICAgICAxMCAlCg==
                                ====

                                we would like to send the text log file as an attachment eamil to support. Pleae help us how to achive this. Thanks in advance.
                                • 28. Re: Oracle Linux
                                  Catch 22
                                  I think I have already given you a reasonable answer and possible solution. If there is something you do not understand, please explain. I doubt that repeating your question is going to make it.
                                  • 29. Re: Oracle Linux
                                    user13681259
                                    I understand your update, but i'm looking the possiblities to have the email attachment facility instead of having text message body in the email.

                                    Can you give me the more deatils on email client that can handle binary encoding and attachments.

                                    Appreciate your help