The drive has the built-in functionality of sending an email when there's a problem. Do we know what software it uses to do that? Is there a way of piggy-backing on this?
I'd like to periodically email myself my IP address, because my IP is dynamic and it is frustrating to go away for some time, only to find that the ISP reset the IP...
Thanks.
Email software
-
- Posts: 110
- Joined: Fri Jul 13, 2012 8:12 am
Re: Email software
You can try the mailmail command line program, like this:but I think it doesn't work.
Other option would be to directly talk to the mail server, data from here:
Code: Select all
echo 'From: sohostorage@myremotenas.com
To: yourmail@example.com
Subject: Test-Email
This is the content
' | mailmail yourmail@example.com
Other option would be to directly talk to the mail server, data from here:
Code: Select all
cat /usr/local/cfg/Email.xml
Stefan<?xml version="1.0" encoding="utf-8"?><Email Default_Password="Hkv482N9G" Default_RelayServer="alerts.myremotenas.com:587" Default_Sender="sohostorage@myremotenas.com" Default_User="lifelinesohostorage" _Fixed_="1">
Re: Email software
I will try some things I've seen online and report back if I'm successful... I can think of a few instances where having the device mail me as a part of a bash script would be somewhat useful...
Re: Email software
I think I have nearly managed to get somewhere by installing Mutt, but I need to do some more configuration before it will connect to my SMTP server.
Re: Email software
On my Lenovo EZ there's a python script /usr/sbin/smtpsend that my system uses to send emails. Run "head -30 /usr/sbin/smtpsend" for parameters and their meanings.lawrencew wrote:The drive has the built-in functionality of sending an email when there's a problem. Do we know what software it uses to do that? Is there a way of piggy-backing on this?
I'd like to periodically email myself my IP address, because my IP is dynamic and it is frustrating to go away for some time, only to find that the ISP reset the IP...
Thanks.
When I send a test email from the GUI, and simultaneously run "ps" from CLI, I find that it runs like so:
Code: Select all
/usr/bin/python /usr/sbin/smtpsend --host nasalerts.lenovoemc.com --port 587 --from alertnotification@lenovoemc.com -x -M <MAC-VENDOR-NUMBER> --username wynnlife --passwd <SOME-PASSWORD> -a --subject "Notification message from 'LenovoEZ' device (1)" --msg "This is a test message to validate that notification address '<MY-EMAIL-ADDRESS' is reachable. Device Information: <IP-ADDRESS>, <FIRMWARE-VERSION>, Lenovo EZ, <ID??>" --rcpt <MY-EMAIL-ADDRESS>
Re: Email software
It turns out most of those parameters are not required if you're prepared to use the EMC-provided mail relay (specifying "--df"). This is all you require:jez wrote:On my Lenovo EZ there's a python script /usr/sbin/smtpsend that my system uses to send emails.
Code: Select all
printf "testing\n" | /usr/sbin/smtpsend --df --subject "Subject" --rcpt recipient@example.com