Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
|
03-18-2009, 11:32 AM
|
#1
|
Member
Registered: Nov 2008
Posts: 158
Rep:
|
Is their a program or script that can execute a command from an email
Is their a way to have my linux box check an email account, look for a specific email from a specific sender and execute a command?
|
|
|
03-18-2009, 11:56 AM
|
#2
|
LQ Veteran
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809
|
Your question does not match the title...
Quote:
Is their a program or script that can execute a command from an email
|
I sincerely hope not....
Quote:
Is their a way to have my linux box check an email account, look for a specific email from a specific sender and execute a command?
|
Send a standard command based on the content (or identity of the sender) of email? Sure.
|
|
|
03-18-2009, 02:30 PM
|
#3
|
LQ Guru
Registered: Oct 2005
Location: Northeast Ohio
Distribution: linuxdebian
Posts: 7,249
Rep:
|
Some ticketing systems do something like this.. of course it depends on the type of command you wish to execute.
for example. OTRS2 -
User sends email to helpdesk@mycompany.com
OTRS2 polls the email server and retrieves email that was sent to it.
OTRS then evaluates the message for certain criteria (from address, Subject keywords, etc.. ) and decides Which queue it belongs in, updates the database, possibly sends out a notification to the tech.
I believe OTRS is written mostly in perl.
Not sure what you are trying to accomplish, explaining a bit more about your goals might make it more clear.
|
|
|
03-18-2009, 05:45 PM
|
#5
|
Member
Registered: Nov 2008
Posts: 158
Original Poster
Rep:
|
Ok, maybe I should be more clear.
Say I send an email to xyz@email.com, the linux box would monitor this account, and say when it saw a message from me@email.com, and if the email had a specific line (ie: where are you), it would then reaply to that email with some info (my ip is: 123.123.123.123), or also run a command like reboot, halt...
Can this be done?
|
|
|
03-18-2009, 05:49 PM
|
#6
|
Senior Member
Registered: Nov 2006
Distribution: Debian Linux 11 (Bullseye)
Posts: 3,409
Rep:
|
Is there some reason your post shouldn't be seen as an attempt to get information about hacking someone else's system?
|
|
|
03-18-2009, 06:03 PM
|
#7
|
Member
Registered: Mar 2009
Distribution: Debian,Centos
Posts: 30
Rep:
|
I can think of several ways to do this but no turnkey solution.
Are you willing to write something yourself?
Otherwise, I got the impression that you have a dynamic IP and trying to find a way to reach your computer remotely. If this is the case then you could use a service like http://www.dyndns.com. They provide a free service that does just that.
|
|
|
03-18-2009, 06:52 PM
|
#8
|
Member
Registered: Nov 2008
Posts: 158
Original Poster
Rep:
|
Quote:
Originally Posted by Quakeboy02
Is there some reason your post shouldn't be seen as an attempt to get information about hacking someone else's system?
|
Why does it sound like I want to hack in to some else's system? Emailing my box (note not someone elses) a command does not make it hack someone else. Besides, don;t you think that if I am asking this question here, its because I don't know how to do it, and if I could hack someone, I would probably know how to do this anyway?
Quote:
Are you willing to write something yourself?
|
I don't know much about writing in linux. If I had a working example, I might be able to reverse it and learn from it.
Any ideas?
|
|
|
03-18-2009, 07:21 PM
|
#9
|
Member
Registered: Oct 2007
Distribution: Fedora, openSUSE
Posts: 252
Rep:
|
Quote:
Originally Posted by pixellany
Your question does not match the title...
Quote:
Is their a program or script that can execute a command from an email
|
I sincerely hope not....
|
Lol. The OP should look into MS Outlook.
Quote:
~$ fortune
Look Out! It's Microsoft Outlook
An old maxim in the Unix community states, "All programs expand until they
can read mail... except Microsoft Outlook." Well, that's no longer true.
By taking advantage of loopholes in several undocumented APIs, a team of
geeks were able to transform Outlook from a virus-delivery system into an
actual mail client.
"It was quite a feat to accomplish this," said one of the geeks. "I mean,
the rat's nest that is the Windows API can be used to frighten small
children... or adults. And the frequency by which Outlook exploits are
discovered is directly proportional to the number of times Bill Gates uses
the word 'innovation'. But this is the first time somebody has discovered
a beneficial exploit."
Microsoft has vowed to release a patch to fix the uncovered security
flaws. "We simply cannot tolerate unauthorized reverse engineering and
hacking of our innovative solutions. Our Security Response Team will pull
an all-nighter to eliminate these known issues."
|
|
|
|
03-18-2009, 07:28 PM
|
#10
|
Member
Registered: Mar 2009
Distribution: Debian,Centos
Posts: 30
Rep:
|
I don't have any real turnkey solution in mind.
Along with the library I suggested earlier, fetchmail might also come in handy. But you will most likely have to spend some time learning your way around before putting together something functional.
|
|
|
03-18-2009, 08:04 PM
|
#11
|
Moderator
Registered: May 2001
Posts: 29,415
|
Quote:
Originally Posted by SuperDude123
Is their a way to have my linux box check an email account, look for a specific email from a specific sender and execute a command?
|
Something like http://freshmeat.net/projects/mail2sh ?
|
|
|
03-18-2009, 08:15 PM
|
#12
|
Member
Registered: Nov 2008
Posts: 158
Original Poster
Rep:
|
How would you implement mail2sh to execute a command from an email?
|
|
|
03-18-2009, 08:21 PM
|
#13
|
Senior Member
Registered: Feb 2002
Location: harvard, il
Distribution: Ubuntu 11.4,DD-WRT micro plus ssh,lfs-6.6,Fedora 15,Fedora 16
Posts: 3,233
|
you might be better off setting up a dyndns registration from www.dyndns.com to your computer and setting up webmin ( www.webmin.com), then there are scripts that automatically update your dyndns information automatically, that way you can have a web interface at mycomp.homelinux.com and just launch a web browser to mycomp.homelinux.com:10000 and have nearly full control of your box
if you don't need a full web interface then a portable version of putty on a thumb drive and setting up ssh access and ssh using putty to mycomp.homelinux.com would work too
Last edited by frieza; 03-18-2009 at 08:25 PM.
|
|
|
03-18-2009, 08:29 PM
|
#14
|
Moderator
Registered: May 2001
Posts: 29,415
|
Quote:
Originally Posted by SuperDude123
How would you implement mail2sh to execute a command from an email?
|
How far are you with the installation? Did you actually download the tarball and peruse the contents?
|
|
|
03-18-2009, 08:30 PM
|
#15
|
Member
Registered: Nov 2008
Posts: 158
Original Poster
Rep:
|
Quote:
you might be better off setting up a dyndns registration from www.dyndns.com to your computer and setting up webmin (www.webmin.com), then there are scripts that automatically update your dyndns information automatically, that way you can have a web interface at mycomp.homelinux.com and just launch a web browser to mycomp.homelinux.com:10000 and have nearly full control of your box
if you don't need a full web interface then a portable version of putty on a thumb drive and setting up ssh access and ssh using putty to mycomp.homelinux.com would work too
|
The idea of emailing was so I could send it from my mobile, and I know I can't SSH with my mobile.
|
|
|
All times are GMT -5. The time now is 03:25 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|