General NAS-Central Forums

Welcome to the NAS community
It is currently Fri Nov 17, 2017 8:58 pm

All times are UTC




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: Email software
PostPosted: Wed Sep 26, 2012 10:47 pm 
Offline

Joined: Mon Sep 24, 2012 8:20 am
Posts: 12
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.


Top
 Profile  
 
 Post subject: Re: Email software
PostPosted: Thu Sep 27, 2012 9:37 am 
Offline

Joined: Fri Jul 13, 2012 8:12 am
Posts: 110
You can try the mailmail command line program, like this:
Code:
echo 'From: sohostorage@myremotenas.com
To: yourmail@example.com
Subject: Test-Email

This is the content
' | mailmail yourmail@example.com
but I think it doesn't work.

Other option would be to directly talk to the mail server, data from here:
Code:
cat /usr/local/cfg/Email.xml

Quote:
<?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">


Stefan


Top
 Profile  
 
 Post subject: Re: Email software
PostPosted: Thu Sep 27, 2012 2:58 pm 
Offline

Joined: Mon Sep 24, 2012 8:20 am
Posts: 12
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...


Top
 Profile  
 
 Post subject: Re: Email software
PostPosted: Tue Oct 02, 2012 11:27 pm 
Offline

Joined: Mon Sep 24, 2012 8:20 am
Posts: 12
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.


Top
 Profile  
 
 Post subject: Re: Email software
PostPosted: Thu Jan 22, 2015 4:14 am 
Offline

Joined: Wed Jul 10, 2013 3:18 pm
Posts: 18
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.

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.

When I send a test email from the GUI, and simultaneously run "ps" from CLI, I find that it runs like so:
Code:
/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>

The bits in <ANGLE-BRACKETS> are redacted. The password might be unique for each device, I don't know. The password is stored in the file /usr/local/cfg/Email.xml.


Top
 Profile  
 
 Post subject: Re: Email software
PostPosted: Thu Jan 22, 2015 6:50 am 
Offline

Joined: Wed Jul 10, 2013 3:18 pm
Posts: 18
jez wrote:
On my Lenovo EZ there's a python script /usr/sbin/smtpsend that my system uses to send emails.

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:
Code:
printf "testing\n" | /usr/sbin/smtpsend --df --subject "Subject" --rcpt recipient@example.com

Also, I made a wrapper that uses smtpsend but works like the traditional "mail" program.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC


Who is online

Users browsing this forum: Bing [Bot] and 15 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group