1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
|
# olden-mail
`olden-mail` is an IMAP & SMTP proxy that allows you to connect to SSL
enabled mail servers using insecure plaintext connections.
This is of course very insecure, but it's intended to allow vintage
computers that don't have SSL capability or ther right ciphers to still
be used for e-mail.
## Installation
### Pre-built binaries and packages
Binaries are available for macos and linux, for both aarch64 and x86_64
from https://build.r.bdr.sh/olden-mail, including `.deb` and `.rpm`
packages.
### Homebrew
You can also install this on macos via homebrew.
```
% brew tap rbdr/apps git@git.sr.ht:~rbdr/homebrew-apps
% brew install rbdr/apps/olden-mail
```
### From source
You can run `make` for a debug build, or `make -e profile=release` for a
release build.
## Usage
The proxy requires you to set environment variables, but otherwise takes
no options.
* `LOCAL_IMAP_PORT` u16, the port in which the server will listen for
IMAP clients. Defaults to 143.
* `LOCAL_IMAP_BIND_ADDRESS` String, the address on which to listen for
IMAP clients. Defaults to 0.0.0.0.
* `REMOTE_IMAP_PORT` u16, the port to which the server will forward the
IMAP messages. Defaults to 993.
* `REMOTE_IMAP_HOST` String, the host to which the server will forward the
IMAP messages. Required.
* `LOCAL_SMTP_PORT` u16, the port in which the server will listen for
SMTP clients. Defaults to 25.
* `LOCAL_SMTP_BIND_ADDRESS` String, the address on which to listen for
SMTP clients. Defaults to 0.0.0.0.
* `REMOTE_SMTP_PORT` u16, the port to which the server will forward the
SMTP messages. Defaults to 465.
* `REMOTE_SMTP_HOST` String, the host to which the server will forward the
SMTP messages. Required.
This means the minimum invocation is this (Shown here with inline
environment variables)
```
% REMOTE_IMAP_HOST=imap.coolmailsite.example REMOTE_SMTP_HOST=smtp.coolmailsite.example olden-mail
```
## Middleware
In order to work with some older clients, middleware allow transformation of
messages. The current middleware are:
- `FindMailboxesCompatibility` - Transforms IMAPv3 FIND MAILBOX commands to
IMAPv4 LIST commands.
## Debugging
You can control how much it prints by setting `RUST_LOG`. Setting it to
`debug` will output the whole protocol stream. The default level is
`info`.
Messages coming from the client are prefixed with `>>>`, and messages coming
from the server with `<<<`. If a middleware modified a command, you'll see
the message that was actually sent prefixed with `###`.
|