Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

My predicament:

I designed an app, written in Python, to read my mail and check for messages that contain a certain digital signature. It opens these and looks for keywords. If the message contains these keywords, certain related functions area executed on the computer. It is a way I can control my computer from my cell phone without being there. I am still in the beginning stages and it can only currently remotely open and close applications/processes.

The obvious issue is security risks. I hoped to spearhead that by requiring and checking for that digital signature. However, my issue comes when I'd like to make this program usable by multiple users. The idea is that the user will send keywords: username and password, for instance, to log into their personal email account and send messages to it to be parsed.

Please ignore the security implications of sending non-encoded passwords through email. (Though if you could help me on that part I'd much appreciate it as well, but currently, that is not the scope of my question.)

My issue is designing an intermediary process that will take an email/password to read an email and scan for those keywords. The issue is, that the program has to be accessing an email to read the email for the username/password! I have got myself into a loop and cannot figure out how to have this required intermediary program. I could just create an arbitrary email account and have that check for login-creds, but is there a better way of doing this than that?

Also, is there a better way of communicating with a computer remotely than this? Especially if the computer is not a server and is behind a router with only a subnet ip?

If I am asking this question in the wrong place, I deeply apologize. Any help would be much appreciated!

share|improve this question

1 Answer 1

Using emails is one of possible solutions. It seems you need to create a special mail account on some public mail server and make a service(daemon) which will login on server and receive mail messages from server and execute commands which they contain. Good tool for creating such services in Python is twisted, they also have a rather good tutorial for creating SMTP client. For sending commands to your computer you could use your favourite mail client. Some knowledge of SMTP, POP3 or IMAP protocols is essential.

Another option is to create IRC bot or Jabber bot. In this case you have to study some internals of appropriate protocol(IRC and XMPP) and register some closed room on a public IRC or Jabber server. This bot also could be easy implemented as twisted service, because twisted has a built-in support of these protocols. There are many IRC/Jabber clients, which helps you to send commands to your bot, e.g. Pidgin.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.