I am trying to send mail from my cluster using the command line. Using either the mail or mailx command. When I try to send mail the logs show the wrong relay and mail is deferred. I tried adding the correct relay to the line in /etc/mail/sendmail.cf starting with the DS. Then I tried to bounce sendmail using /etc/rc.d_disabled/sendmail onerestart... But I'm getting the same results.
Using the GUI under cluster management, email settings everything is correct and the call home seems to be working when I run a manual test.
Unfortunately sending mail from an Isilon cluster directly is not so simple. The sendmail configuration is stored in an internal database and our tools use internal Python APIs to send the e-mail properly. This is not exposed directly to the CLI even though at the core we use sendmail.
Actually i am new to python script. Kindly let me in this script what are fields i have modify with the actual values. (Ex: sender mail id, receptionist, whether i have to mention SMTP IP and port no...) Kindly provide these details.
IndentationError: unindent does not match any outer indentation level
xxxisilon-1# tail /var/log/messages
2017-07-26T09:04:17Z <3.4> dxbisilon-1 celog_alerting:channel_updater[71109:channel_controller.py:236] WARNING:`1-reporter-16427`: scheduling next send attempt for Wed Jul 26 17:04:16 2017
2017-07-26T09:04:34Z <3.3> dxbisilon-1 celog_alerting:Main[4857:celog_main.py:63] ERROR:Sender process exited non-zero. Setting backoff of 60 seconds
2017-07-26T09:15:39Z <1.4> dxbisilon-1 isi_celog_alerting: Unable to send to [u'xxxx@xxxx.xxx', u'xxxx@xxxx.xxx'] through u'xx.x.x.xx': STARTTLS extension not supported by server.
2017-07-26T09:15:39Z <3.3> dxbisilon-1 celog_alerting:channels[72042:channels.py:149] ERROR:Could not send email notification: All SMTP hosts (xx.x.x.xx) failed to deliver to [u'xxxx@xxxx.xxx', u'xxxx@xxxx.xxx']
2017-07-26T09:15:39Z <3.4> dxbisilon-1 celog_alerting:channel_updater[72042:channel_controller.py:236] WARNING:`1-reporter-18723`: scheduling next send attempt for Wed Jul 26 17:15:38 2017
2017-07-26T09:15:39Z <3.4> dxbisilon-1 celog_alerting:channel_updater[72042:channel_controller.py:236] WARNING:`1-reporter-18724`: scheduling next send attempt for Wed Jul 26 17:15:38 2017
2017-07-26T09:15:40Z <3.4> dxbisilon-1 celog_alerting:channel_updater[72042:channel_controller.py:236] WARNING:`1-reporter-18722`: scheduling next send attempt for Wed Jul 26 17:15:38 2017
2017-07-26T09:15:40Z <3.4> dxbisilon-1 celog_alerting:channel_updater[72042:channel_controller.py:236] WARNING:`1-reporter-18725`: scheduling next send attempt for Wed Jul 26 17:15:38 2017
2017-07-26T09:15:53Z <3.3> dxbisilon-1 celog_alerting:Main[4857:celog_main.py:63] ERROR:Sender process exited non-zero. Setting backoff of 60 seconds
2017-07-26T11:57:49Z <3.3> dxbisilon-1 celog_analysis:prune[77335:eventgroup_pruner.py:284] ERROR:Unable to stat files, skipping cleanup: [Errno 2] No such file or directory: '/ifs/.ifsvar/db/celog_capture/2/attachments/asbuilt.3'
Peter_Sero
6 Operator
•
1169 Posts
6646
1
Posted August 3rd, 2013 05:00
(To the original poster:)
Here is sort of a bad hack that once helped me when sending e-mail
from a machine whose root disk (with /tmp) occasionally went into a read-only state,
making use of sendmail etc. just impossible.
It is simply shell-based, plus "nc":
(
echo "HELO "
sleep 1
echo "MAIL FROM: "
sleep 1
echo "RCPT TO:
sleep 1
echo "DATA"
sleep 1
echo "Subject:
sleep 1
echo ""
sleep 1
echo " "
sleep 1
echo "."
sleep 1
echo "QUIT"
sleep 1
) |
nc 25
Everything in <...> needs to be replaced by actual values of course!
The key is the "nc" (netcat) command in UNIX (also OneFS),
which opens a network connection to the given host and port (smtp = 25)
and allows to send and receive any data over it.
Here we "speak" the text-based SMTP mail protocol line by line.
(You might also use telnet, probably with an "expect" script.)
Note there is no error handling in here, no retry after failure etc.
And the mailhost is fixed -- no problem assuming you want to send
e-mails only to few in-house addresses. Otherwise you would
need to look up the server for each e-mail address, probably deal
with relays, and more or less you would arrive at something that
acts like the Python mail module mentioned by Andrew.
(You could use that Python module of course, it is not Isilon-specific.
Only obtaining the mail config is; you could feed in your mail params
on your own instead.)
-- Peter