You are here

Mail Server to Mail Server via AREDN MESH - Possible? How?

5 posts / 0 new
Last post
km6zpo's picture
Mail Server to Mail Server via AREDN MESH - Possible? How?

I setup a mail server which has a convenient web interface on a computer connected to my ARDEN node.  That node is tunneled in to the Southern California region.  The name of my server is km6zpo-winlink.local.mesh.  (It's called that because I'm also running an RMS Relay on it)

t's simple enough using the web interface to send emails back and forth on the server since essentially those message are staying on the same server. 

For example:
user1@km6zpo-winlink.local.mesh can send to user2@km6zpo-winlink.local.mesh - that's easy.

Assuming that two separate mail servers could "see" each other by way of the AREDN network, is it possible for a user on one system to send an email to a user on another system?

For example:

mark@kmzpo-winlink.local.mesh send to someuser@somedomain.local.mesh

Has anyone tried this?  Does anyone have a mail server running for me to test?  (Check to see if you can "see" my mail server first: http://km6zpo-winlink.local.mesh )

Mark Warrick

km6zpo's picture
Yes, it works

To answer my own question, I tested a known good email address on a known good ARDEN node.  I have confirmed that YES, sending from one email server which has access to another email server over the AREDN mesh works.  The caveat, of course, is that the two servers can talk to each other.  

So this leads me to my next question, which I am testing now.  Let's say we have three mail servers A, B and C.  A and B can talk to each other and B and C can talk to each other.   So, can I use server B in this scenario as a Smart Host to relay a message from A to C ?  That's my current test.  I'll report back whether or not it succeeded.

K6CCC's picture

If your mail server has the ability to use a mail proxy, it likely would work.  However normally the way modern mail systems work, each mail server directly passed traffic to the destination.  BTW, in all likelyhood if you do set your mail server to use a proxy, it may well attempt to send all traffic to the proxy, so if it can't reach the proxy, it will not be able to send any mail to anyone that is on a different mail server.  Single point of failure.  If your server is smart enough, it may be able to send mail to the proxy only if it can't find a direct route.  I've never used a proxy on my server, so I don't have any details on that type of use.

km6zpo's picture
I'm using a free email system

I'm using a free email system called Mail Enable (  It has a setting for "Smart Host" which esentially routes all SMTP traffic through an external server.  To clarify, when I say external, I don't mean outside the AREDN network.  For now I've set the Smart Host to another mail server which is a known good connection from what I can see.  

NOW, here's where this gets interesting...  If I can route email to another server ON the mesh, what's to stop me from routing messages OFF the mesh?  Why would I want to do that?  Well let's assume the Internet backbone for Southern California went down and all cell and phone service went down.  I have really a couple options: I could send a Winlink message through RMS relays via the mesh.  We all know how to do that.  But that requires special software (and a ham license) and it requires training.  Everybody knows how to use email.  So presumably I can send emails across the RF connected mesh (locally - all across the region) to any email server in the area.  

P.S. MailEnable has a pretty nice web interface.  You don't even need a separate webmail client.  So that means it's platform independent on the client side.  I'll setup an account for you to check it out, Jim and email you the login info.   Go to: http://km6zpo-winlink.local.mesh/

kk6gde's picture
For example:

For example:

mark@kmzpo-winlink.local.mesh send to someuser@somedomain.local.mesh

Normally mail servers rely on DNS MX records to figure out which server to connect to when delivering email.  The problem here is that aredn doesn't really use traditional DNS for the .mesh TLD.  Olsrd finds nodes and populates a text file .. much like the contents of an etc/hosts file .. and then dnsmasq looks in that file to see if there are any matches when lookups are executed. If that fails, dnsmasq will try to reach out to traditional dns servers. However since the .mesh TLD doesn't actually exist, dnsmasq will fail any type of additional lookup (such as for an MX record).

That means if you want to deliver emails to different .mesh nodes, you'd need to take that olsrd node data and write rules for your email server so that it knows where to connect for delivery.  I think that could be automated with a script, assuming each node knows about all the other nodes.  However, if there are nodes that want email but aren't hosting their own email server, things get tricky because somehow your email server would need to know where to deliver to instead (This is why MX records are so useful).  One possible workaround would be for each node to either host their own email server, or have some additional iptables rules on each node that would forward incoming port 25 traffic to the mail server that will accept their mail.

As for delivering to the outside world, that is possible, however it would require three things -- one, a node with an email service that is able to traverse the wan port (a setting we can enable through the aredn gui). Two, you would need to own a domain name that you would use in place of your local.mesh address because most mail servers will reject source emails with domains that don't exist.  Some mail servers can re-write the to and from addresses as they process the emails, so jimmy@callsign.local.mesh would become  Three, you may need to use a mail relay depending on what kind of internet connection you have --thanks to spammers, most isps actively block port 25 outgoing traffic, and most receiving mail servers are outright hostile to traffic that is designated as belonging to non-corporate environments. 

Theme by Danetsoft and Danang Probo Sayekti inspired by Maksimer