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?
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?
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.
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