Get Paid to Participate - up to $1 per post!     Twitter     Facebook     Google+
Hosting Discussion
 

forgot password?



Reply


Old
  Post #1 (permalink)   09-08-2007, 09:16 AM
Rob
HD Master
 
Join Date: Aug 2007
Location: Wiltshire
Posts: 276
Send a message via AIM to Rob Send a message via Skype™ to Rob

Status: Rob is offline
I wonder if its possible to reboot an server / service via email

Say for instance i setup an email account services@domain.com and then got a php script to read the email's within the email account and if any service commands were listed in the email body like 'service httpd restart' the php script interpreted the command and executed it - thus rebooting Apache
__________________
Rob G.
Chief Operating Officer
Peartree Digital Media Solutions

Last edited by Rob : 09-08-2007 at 09:19 AM.
 
 
 


Old
  Post #2 (permalink)   09-21-2007, 03:49 AM
HD Newbie
 
Join Date: Sep 2007
Posts: 27

Status: sparkstation is offline
never heard before so far.
__________________
<<MOD NOTE: See rules for signature setup.>>
 
 
 


Old
  Post #3 (permalink)   09-26-2007, 01:57 PM
HD Wizard
 
Join Date: Sep 2004
Location: Pennsylvania
Posts: 1,628

Status: ANMMark is offline
HHS-Rob, this would be virtually impossible, unless the script was setup to recognize the commands given.

There would be a lot of factors to take into consideration as well.
1. The script would have to be located on an account that has root level, or super user level SSH access.

2. At the very least, shell_exec would need to be enabled.

3. Email piping takes the incoming message, and sends it off, it doesn't interpret any of it. It just receives and sends by default. The script would need to be configured to interpret the command, before it actually could.
__________________
Mark
NIC™ - Network Innovative Concepts - Get ready for R.A.I.N.
Protect your website from hackers NIC™ - SiteLock
 
 
 


Old
  Post #4 (permalink)   09-27-2007, 09:09 AM
Rob
HD Master
 
Join Date: Aug 2007
Location: Wiltshire
Posts: 276
Send a message via AIM to Rob Send a message via Skype™ to Rob

Status: Rob is offline
Hi Mark,

Thanks for your reply. I thought it would be a bit complicated to achieve. But still no harm in asking
__________________
Rob G.
Chief Operating Officer
Peartree Digital Media Solutions
 
 
 


Old
  Post #5 (permalink)   09-28-2007, 05:59 PM
HD Master
 
Join Date: Dec 2005
Posts: 353
Send a message via AIM to lowesthost

Status: lowesthost is offline
Interesting but if you have access to email don't have access to the server ??
and if the server is completely locked up sending an email to said server is not going to do much good or I did I miss something ?
__________________
Lowest Host/Empire Technology LLC
Offering Quality Shared, Reseller, VPS servers, and Dedicated Servers
24x7 Tech Support http://empire-hosting.net
cPanel Licenses http://empire-hosting.net/buy-cpanel.html - Dedicated VPS /
 
 
 


Old
  Post #6 (permalink)   11-12-2007, 02:20 PM
HD Amateur
 
Join Date: Nov 2007
Posts: 55

Status: mr_brain is offline
It should be possible. You can parse your email boy. Something like:

if (cat /var/spool/INBOX | grep "reboote server") do

do something

fi
 
 
 


Old
  Post #7 (permalink)   11-29-2007, 05:32 PM
HD Newbie
 
Join Date: Nov 2007
Posts: 3

Status: dnstevenson is offline
Like mr_brain said, it is possible. Make sure you think about security - the email should make sure that the sender has the correct credentials for the particular server they are wanting to reboot.

That said, I haven't seen anyone provide such a service...

Dave
__________________
SilverRack
Affordable VPS Hosting
Perfect for Ruby on Rails
 
 
 


Old
  Post #8 (permalink)   12-10-2007, 08:00 PM
HD Addict
 
Join Date: Nov 2007
Posts: 190

Status: brianf is offline
There is a free script out there, http://rfxnetworks.com/sim.php, that runs via CRON monitoring several services and will preform a command if the service is down. I would think that this would be significantly better than trying to restart via email.
 
 
 


Old
  Post #9 (permalink)   12-11-2007, 05:50 AM
HD Guru
 
Join Date: Sep 2005
Location: England
Posts: 753
Send a message via Skype™ to Matthew

Status: Matthew is offline
I would say it's possible, but it would require some good security (to ensure random emails cannot be received with other dangerous commands).

I personally would use a remote reboot service which I could telnet/ssh in to from my PDA. Right now I have that option and assistance from my hosting company who monitor and reboot services as required.
__________________
Matthew
 
 
 


Old
  Post #10 (permalink)   12-11-2007, 10:32 AM
Rob
HD Master
 
Join Date: Aug 2007
Location: Wiltshire
Posts: 276
Send a message via AIM to Rob Send a message via Skype™ to Rob

Status: Rob is offline
[quote]Right now I have that option and assistance from my hosting company who monitor and reboot services as required.
[\quote]

Thats the same for us, the servers are managed.

I just thought it was something to possibly think about and wether it was possible. I do see your point about security and you could also have the problem of fake mailers posing to be from that specific email address.
__________________
Rob G.
Chief Operating Officer
Peartree Digital Media Solutions
 
 
 


Old
  Post #11 (permalink)   12-11-2007, 11:28 AM
Data Center Specialist
 
Join Date: Aug 2005
Location: United Kingdom
Posts: 849

Status: Marks is offline
Quote:
I just thought it was something to possibly think about and wether it was possible. I do see your point about security and you could also have the problem of fake mailers posing to be from that specific email address.
However the solution to fake mailers would be to setup a rule that will only process if the email is coming from one of your own mail servers ONLY.
 
 
 


Old
  Post #12 (permalink)   05-09-2008, 10:19 PM
HD Newbie
 
Join Date: May 2008
Posts: 27

Status: iastaff is offline
Quote:
Originally Posted by Marks View Post
However the solution to fake mailers would be to setup a rule that will only process if the email is coming from one of your own mail servers ONLY.
Even still, there are soooo many ways this can be compromised its not even funny.
__________________
International Alliance Privacy Services
Shared Hosting|SSH Proxies|SSL Certs.|Dedi Servers
Domain Registration|Secure Email|Dedicated Hosting
 
 
 
Reply

Thread Tools

New Post New Post   Old Post Old Post
Posting Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Sponsored By: