Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have about a dozen computers connected in a network. All have Ubuntu 10.04 installed.

Every computer is running unique processes, and sometimes I have the need to send a message from one computer to another. I have a python script that allows sending an email through gmail, and it works.

yet, since all computers are connected in a network, I was hoping there could be a way to send 'private' emails (from one computer to another) without the need to communicate through the internet.

is it at all possible?

share|improve this question

migrated from stackoverflow.com Feb 4 '11 at 17:49

This question came from our site for professional and enthusiast programmers.

    
You could adapt Jabber to accomplish what you are looking to do; example, studio.plugins.atlassian.com/wiki/display/JJABBER/… –  Jared Farrish Feb 2 '11 at 17:56
2  
Why aren't you trying to use a message queue for this? –  S.Lott Feb 2 '11 at 17:57
1  
Email isnt a good way to send a message from one computer to another - its a good way to send a message from one user to another. –  Spacedman Feb 2 '11 at 18:06
    
stackoverflow.com/questions/114735/… –  Jared Farrish Feb 2 '11 at 18:11
    
@Spacedman - It's not unprecedented to use email to send control messages (although I would try not to). Do you have a suggestion for how the poster could accomplish sending messages as the usage suggests, in a way that you think is correct? –  Jared Farrish Feb 2 '11 at 18:13
show 1 more comment

3 Answers 3

Yes, it's possible. Have each computer run it's own SMTP daemon. When a computer wants to send an email to another, it simply connects to that computer over port 25 (by default) and sends the email as if it were talking to gmail or any other SMTP server.

EDIT: though as the commentators to your question have said, is all of this absolutely necessary when there are other mechanisms in place for inter-computer communication?

share|improve this answer
1  
The good thing about many of the SMTP MTAs is that they'll retry if the target machine is down, and preserve unsent messages in a spool if the sending machine goes down. I'm not sure if such resilience is bolted on to other machine-to-machine comms methods. –  Spacedman Feb 2 '11 at 18:30
    
@Spacedman, I agree with this. But isn't that the polar opposite of " Email isnt a good way to send a message from one computer to another - its a good way to send a message from one user to another " ? :) –  Moo-Juice Feb 2 '11 at 20:35
1  
@moo-juice yeah, I think that was another spacedman.. Ummm.. –  Spacedman Feb 2 '11 at 21:18
    
@Spacedman, I'd up-vote you twice if I could ;) –  Moo-Juice Feb 2 '11 at 22:00
add comment

Like the comments say, email isn't quite the easiest way to distribute messages since you need to setup a smtp server everywhere.

Unless there is a very specific reason that you want email, a RPC library such as xmlrpclib would greatly simplify the communication. The basic idea of RPCs is that you call functions on remote computers and get return values.

share|improve this answer
add comment

Since you're already using python. Take a look at func. It uses XMLRPC and python code let groups of computers 'talk to each other' and exchange info.

Func Webpage

share|improve this answer
add comment

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.