Correo local/en

De HackLab
Saltar a: navegación, buscar


<languages />


Internet end points aren't usually able to send or receive email directly by using an email server (SMTP), so they end up being clients of another server (through webmail, POP3, IMAP).

This guide's idea is to configure a SMTP server to be able to send and receive email directly to a LibreVPN/en node, using other, public, server(s) as relays. Since LibreVPN doesn't have artificial boundaries on the network, SMTP works as it should.

Then, to send an email, we send it to our local server, who delegates it to a public server. The inverse is done when an email is received.

And, between nodes in the network, email is sent directly instead of relaying on Internet!

Then you can read it with any client that supports the Maildir format.

Requirements

  • (Opcional) Tener un dominio propio, administrado con Owns o no. Si no contás con tu propio dominio, tu dirección va a ser @nodo.librevpn.org.ar.
  • Install postfix

On the node

Point your domain to the public server

Dialog-warning-yellow.svg This step is optional, you only need it if you're going to use your own domain instead of node.librevpn.org.ar



Si tenemos noanoa.com.ar y el servidor público va a ser librevpn.org.ar, hay que apuntar el registro MX del subdominio al del servidor público.

In your DNS administration, add the following record:

noanoa.com.ar IN MX librevpn.org.ar

Con esto logramos que un servidor externo que se quiera comunicar con noanoa, sepa que tiene que pasar primero por librevpn.org.ar.


Configuración del servidor de correo local

lvpn install-mail-server nodo

Esto hace que postfix quede configurado como servidor de nodo.local. Tu dirección va a ser el nombre de usuario que usás para iniciar sesión, por ejemplo fauno@naven.local.

Enviar correo desde una interfaz gráfica (gui)

We're going to configure the Mozilla Thunderbird email client to send and receive from our local email:

On Thunderbird, open the top right menu (the three strokes icon) and select "Preferences" and then "Email settings".

On the left side of the new window there's an option on the far bottom called "Outgoing Server (SMTP)". Click on it and then push the "Add..." button. Fill the next window with this:

  • Server name: localhost
  • Port: 25
  • Connection security: None
  • Authentication method: No authentication

This is how the SMTP server is added

Push the Accept button and on the left bottom menu push another that says Account actions. Then choose Add other account...

Select the Unix Mailspool (Movemail) option and press Next. Fill with the email field with something like this youruser@node.local and then Next. If it tells you the outgoing server is the one you configured before (localhost:25) there's nothing else to do. Otherwise you can configure it later. Confirm everything pushing Next.

How the account configuration has to look like

If Thunderbird didn't select it correctly, we can change the outgoing server on Account configuration (on the left menu) for the new account.

The second to last item on the right says Outgoing Server (SMTP): Use default server. Change this to the correct server, which we configured first: localhost:25.

Changing the outgoing server

Close the Account configuration pushing the Accept button and that's it :)

You can also write to Internet addresses. The local server will relay this email through naven.local, that translates user@node.local addresses to user@node.librevpn.org.ar and viceversa.

Sending email from shell (cli)

Send an email from the node to Internet:

mail vpn@hackcoop.com.ar (send with ~. or ctrl-d on a newline)

or sendmail -t vpn@hackcoop.com.ar and send with . or ctrl-d on a newline

Send an email to another node:

mail person@anothernode.local

or sendmail -t person@anothernode.local

Read email:

mail