Firing alerts from shell scripts using smtp in RedHat

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Firing alerts from shell scripts using smtp in RedHat

satish
Dear erman,

Rhel 7.3 is the os

We are setting up alerts from backup shell scripts.Earlier we used gmail smtp server smtp-relay.gmail.com:25 and we used to receive emails.

Vendor changed and it was now relay.gic.in..we are using the same commands but here is the error.Can u pls give us some Idea.

oraprod@edb1~]$ cat a.txt| mailx -v -r "ARC Backup< username@domain.com
>" -s "${SUBJECTHEADER}" -S smtp="relay.gic.in:25" -S smtp-use-starttls -S smtp-auth=login -S smtp-auth-user=" username@domain.com" -S smtp-auth-password="Satish@1234" -S ssl-verify=ignore -S nss-config-dir="/etc/pki/nssdb/" username@domain.com
Resolving host relay.gic.in . . . done.
Connecting to *******:25 . . . connected.
Connecting to *********:25 . . . connected.
Unexpected EOF on SMTP connection
"/home/oraprod/dead.letter" 11/349
. . . message not sent.
[oraprod@db1~]

Thanks,
Satish
Reply | Threaded
Open this post in threaded view
|

Re: Firing alerts from shell scripts using smtp in RedHat

ErmanArslansOracleBlog
Administrator
That new mail server and its smtp port may be the cause.. Maybe it only supports SMTPS.. (not the plain SMTP).. That may be the reason of that EOF error . Please ask your smtp service provider and ensure that.
If it supports SMTPS, then you got to do some changes on your mailer script
Reply | Threaded
Open this post in threaded view
|

Re: Firing alerts from shell scripts using smtp in RedHat

satish
Dear erman,

Checked with vendor,SMTP supports only smtps...do I need to change anything in my script.please suggest.

Thanks,
Satish
Reply | Threaded
Open this post in threaded view
|

Re: Firing alerts from shell scripts using smtp in RedHat

ErmanArslansOracleBlog
Administrator
Yes you should Satish :)
Make it be capable to do smtps.. check the web and you will see. Basically the things for making mailx work with smtps..