**Yggmail – чат через почтовый интерфейс | DevZone**

**Что это и зачем**

[Yggmail](https://github.com/neilalexander/yggmail) — экспериментальный мессенджер, который использует стандартные почтовые протоколы IMAP и SMTP, но работает как чат. Создан как побочный проект разработчиков [Yggdrasil](https://devzone.org.ua/post/yggdrasil-mereznii-protokol-z-decentralizovanim-routingom). Написан на Go, полностью открытый. Основная идея — можно быстро поднять сервер, к которому подключается любой почтовый клиент, и при этом не нужен центральный сервер или публичный IP.

### Коротко об истории

Идея «почта как чат» существует давно, но раньше оставалась экспериментальной. Yggmail делает это проще: использует встроенный Yggdrasil-узел для связи между пользователями, сообщения защищены внутри сети, можно работать автономно.

### Как работает

* Использует Yggdrasil для передачи данных (TLS не нужен отдельно)
* Поддерживает стандартные IMAP/SMTP, можно подключить Thunderbird или [DeltaChat](https://delta.chat/uk/)
* Все данные хранятся локально (`~/yggmail.db`)
* Сообщения ставятся в очередь, если узел недоступен

### Установка

Собирается из исходников с Go:

```bash
cd ~
go install github.com/neilalexander/yggmail/cmd/yggmail@latest
install go/bin/yggmail /usr/local/bin/yggmail
yggmail -password
```

Для автозапуска через `systemd`:

```ini
[Unit]
After=network.target
Wants=network.target

[Service]
User=yggmail
Group=yggmail
Type=simple
WorkingDirectory=/home/yggmail
ExecStart=/usr/local/bin/yggmail -peer=tls://...
StandardOutput=file:///home/yggmail/debug.log
StandardError=file:///home/yggmail/error.log

[Install]
WantedBy=multi-user.target
```

### Подключение почтового клиента

Порты: SMTP 1025, IMAP 1143

Настройки клиента:

* Login: `123abc@yggmail`
* Password: сгенерированное `yggmail -password`
* SMTP: `localhost:1025`
* IMAP: `localhost:1143`

> Для теста лучше отправлять сообщения с другого узла сети, «сам себе» пока не работает.

### Ссылки и источники

* [GitHub: Yggmail](https://github.com/neilalexander/yggmail)
* [DevZone статья](https://devzone.org.ua/post/yggmail-mesendzer-z-poshtovym-interfeysom)
* RetroShare: `retroshare://channel?name=%2A%2AYggmail%20%E2%80%93%20klepetalnik%20z%20e-po%C5%A1tnim%20vmesnikom%20%7C%20DevZone%2A%2A&id=a63bcd6b10f0885208c9d63a3953ec75&msgid=8c6498275af451f9559858a3e7398de73c78208`

### Хэштеги

#Yggmail #Yggdrasil #DecentralizedChat #IMAP #SMTP #GoLang #OpenSource #SecureMessaging #Retroshare #PrivacyTech

Если нужно, могу сделать **схему работы Yggmail и маршрутизации через Yggdrasil**, чтобы было наглядно, как сообщения доходят до получателя.

Сделать такую схему?

@zash I was talking about VPS with static IP, the usual way people host public servers, but if it is about a LAN or neighborhood mesh, there you could even have whatever domains you want with local DNS server or use the computer hostname as domain 🤔

or even use #yggmail which is #p2p #email over #yggdrasil protocol

@delta @walsonde 🤔 Ich weiß nicht, aber ist #chatkontrolle mit #yggmail nicht endgültig gegenstandslos?
Commits · neilalexander/yggmail

End-to-end encrypted email for the mesh networking age - Commits · neilalexander/yggmail

GitHub
@madamada it is not a "desktop version of Tyr" it is #yggmail, the original program created to send #email over #yggdrasil, #tyr is just an android apk packaging yggmail for #android

@madamada the internal dependency #yggmail has some bugs that cause message drop/lost or delivery delays, but I am hyped with #tyr and hope the developer keeps improving it

this concept could even be expanded, making such an app an "universal bridge" providing that fake email server to #DeltaChat while then internally it is connecting to Telegram, WhatsApp, XMPP, etc. basically allowing you to use that networks with Delta Chat

On the other hand, I might write more about it today. (The weekend wasn't as close as I thought when I wrote that.)

The best #peerToPeer systems allow ordinary people to use them without having to rely on a system administrator, or be one themself. What I described above clearly isn't that kind of #P2P system.

But it is a proof-of-concept demonstration, and I'm sure it would be possible to bundle an #XMPP server with its own internal #yggdrasil component, like @neilalexander's #yggmail does for email.

There's something to be said for the way yggmail lets you use your favourite email client, and that could be one way to go for peer-to-peer XMPP, but another alternative would be to bundle the relevant parts of an XMPP client in there, too (so it doesn't need to worry about client-to-server communication), resulting in an an all-in-one #XMP2P app that anyone could use.

Next time, I might talk about interoperability with the existing federated XMPP network.

@[email protected] @aquaratixc это должно быть понужнее #yggmail

@marcirl Vor einiger Zeit gab es bei DeltaChat aus das Projekt über Yggmail (https://github.com/deltachat/AndroidYggmail). Weiß gar nicht was daraus geworden ist. @delta, könnt ihr dazu etwas sagen?

#deltachat #Yggmail #yggdrasil https://yggdrasil-network.github.io/

GitHub - deltachat/AndroidYggmail

Contribute to deltachat/AndroidYggmail development by creating an account on GitHub.

GitHub
@Revertron p2p мессенджер для Yggdrassil уже существует, и называется он #Deltachat в связке с #Yggmail