blob: 98fb9c162238d70748b1343f68f66bfcfd943dc2 (
plain)
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
|
---
title: "Alps"
tags: ["service"]
icon: "alps.webp"
short_desc: "Alps is a simple and extensible webmail. It offers a web interface for IMAP, SMTP and other upstream servers."
date: 2024-07-16
---
[Alps](https://git.sr.ht/~migadu/alps)
is a webmail client, a program that allows you to access your email
online like Gmail. It is useful to be able to access you email from a
web browser because it allows you to easily access your email from any
device with a web browser without much additional setup.
## Instructions
There is no Debian package so we are going to build it from source. You need to
have a newer Go compiler installed than what is in the Debian repos. You can
follow the [instructions
here](https://www.vultr.com/docs/install-the-latest-version-of-golang-on-Debian/)
to install Go.
Then, we can clone and build alps.
```sh
git clone https://git.sr.ht/~migadu/alps /opt/alps
cd /opt/alps
go build ./cmd/alps
mv alps /usr/local/bin/alps
```
Now, we are going to create a login key with this command.
```sh
go run github.com/fernet/fernet-go/cmd/fernet-keygen
```
Now, we need to create a systemd service to auto start it on boot.
```systemd
[Unit]
Description=Alps Webmail
After=network.target
Wants=network-online.target
[Service]
Restart=always
Type=simple
ExecStart=/usr/local/bin/alps -theme alps -addr 127.0.0.1:1323 -login-key yourloginkey imaps://mail.example.org:993 smtps://mail.example.org:465
WorkingDirectory=/opt/alps
Environment="GOPATH=/opt/alps/.gopath"
Environment="GOCACHE=/opt/alps/.gocache"
[Install]
WantedBy=multi-user.target
```
If you run Postfix and Dovecot on the same machine, you could change the `After` string to the following:Add commentMore actions
```
After=network.target postfix.service dovecot.service
```
Put that in `/etc/systemd/system/alps.service` and fill in your login key and your mail domain.
Now, reload and start Alps.
```sh
systemctl daemon-reload
systemctl enable --now alps
```
You will need to have already set up nginx. Add this to a file in `/etc/nginx/sites-available/alps.conf`.
```nginx
server {
listen 80;
server_name mail.example.com;
location / {
proxy_pass http://localhost:1323;
}
}
```
Now, link it to `/etc/nginx/sites-enabled/alps.conf` with this command.
```sh
ln -s /etc/nginx/sites-available/alps.conf /etc/nginx/sites-enabled/alps.conf
```
Now, run `certbot` and select your new domain to setup ssl on it.
Finally, you can access your web mail at `mail.example.org` and log in with your email and password.
## Contribution
XMR: `86MMzQFTWgWHdLmJgdUSyKYKitVtgw3Dbfe2hTFeZmSC92FUE7wFcEF5AA4ugqyge4hGdL8PwvZKB49fsGLbUtYdGmNgNU9`
|