This content has been marked as final. Show 30 replies
Mail systems will do inline conversion of text, but a unix text file as an attachment will not be computer platform compatible. You should convert line endings before encoding if you are going to send it to MS-Windows clients.
First you need to install required software:
yum install unix2dos sharutils
Then convert, encode and send the file
cat backup.log | uuencode -m backup.log > backup.att
cat backup.att | mailx -s "backup logfile" email@example.com
mailx -s "Testing" firstname.lastname@example.org ---(Using my email id here)
Im using the above commnad for testing the email facility. But it hangs there and nothing is coming out. If i kill the pross while pressing CTRL+C the below messages desplays.
(Interrupt -- one more to kill letter)
Do we need to open any port on OS level?
HOw to check whether root received this email : root@localhost, as there is no echo message on termial about mail.
could you please advice what needs to be configured to sending mail outside of the machine.
FYI: oracle application is running on this machine and workflow notification mailer configured and it is working sending the notification maile outside.
May 25 16:50:16 ora-stg sendmail: q4O4fYCO011184: to=<email@example.com>, ctladdr=<firstname.lastname@example.org> (510/500), delay=1+04:08:42, xdelay=00:00:00, mailer=esmtp, pri=2640391, relay=example.com.s5b2.psmtp.com., dsn=4.0.0, stat=Deferred: Connection timed out with exmaple.com.s5b2.psmtp.com.
FYI: email@example.com -- used actual email address
root account mail:
May 22 04:02:01 ora-stg sendmail: q4LK21mW012459: to=root, ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=31270, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (q4LK21VL012461 Message accepted for delivery)
Do we need to open any port or configure the relay? Please hlep
relay=example.com.s5b2.psmtp.comHere seems to be your problem. Apart from "exmaple" probably being a typing mistake, I doubt that "example.com.s5b2.psmtp.com" is a valid smtp gateway.
Connection timed out with exmaple.com.s5b2.psmtp.com
I suggest to check your /etc/hosts file
and verify your sendmail configuration. What is the output of:
grep SMART /etc/mail/sendmail.mc
If you send to root@localhost the mailer will use the local host to deliver the mail. If you send to firstname.lastname@example.org and example.com com is not the domain name of your local machine, then the mailer will need to resolve the IP address of the mail server of example.com by using the mail exchange record (MX) from DNS. A relay SMTP gateway, when configured, will be used to process your email if you send email outside your server's own mail domain. It is usually required if your server cannot or is not supposed to send emails directly.
What is your output of the following commands:
grep SMART /etc/mail/sendmail.mc
grep LOCAL_DOMAIN /etc/mail/sendmail.mc
You might want to give this thread are more meaningful subject than "Oracle Linux", like "SMTP relay configuration".
[root@nfs-stg-db1 ~]# cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost
10.60.17.11 nfs-stg-db1.rp.edu.sg nfs-stg-db1
10.60.18.11 nfs-stg-app1.rp.edu.sg nfs-stg-app1
#127.0.0.1 nfs-stg-db1.rp.edu.sg nfs-stg-db1 localhost.localdomain localhost
#::1 localhost6.localdomain6 localhost6
# 10.244.1.59 ppssftps1
# grep SMART /etc/mail/sendmail.mc
dnl define(`SMART_HOST', `smtp.your.provider')dnl
# grep LOCAL_DOMAIN /etc/mail/sendmail.mc
May 29 17:35:47 nfs-stg-db1 sendmail: q4T9ZlJc012203: from=root, size=84, class=0, nrcpts=1, msgid=<201205290935.q4T9ZlJc012203@nfs-stg-db1.rp.edu.sg>, relay=root@localhost
May 29 17:35:48 nfs-stg-db1 sendmail: q4T9Zlvw012204: from=<email@example.com>, size=384, class=0, nrcpts=1, msgid=<201205290935.q4T9ZlJc012203@nfs-stg-db1.rp.edu.sg>, proto=ESMTP, daemon=MTA, relay=localhost.localdomain [127.0.0.1]
May 29 17:35:48 nfs-stg-db1 sendmail: q4T9ZlJc012203: firstname.lastname@example.org, ctladdr=root (0/0), delay=00:00:01, xdelay=00:00:01, mailer=relay, pri=30084, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (q4T9Zlvw012204 Message accepted for delivery)
-- according to the log message status the email was sent, but we have not recevied any emails...
Edited by: user13681259 on May 29, 2012 2:39 AM