update services information, .env verification, update privacy policy, add git to home links, linting and minor rewording in readme, update guides styling

This commit is contained in:
Aidan 2025-01-23 16:26:04 -05:00
parent 2469ca5a79
commit 9bf1532e34
6 changed files with 73 additions and 63 deletions

View File

@ -1,69 +1,95 @@
# pontus-mail
[![Last Update](https://img.shields.io/badge/last_update-31_Dec_2024-blue)](#)
[![Last Update](https://img.shields.io/badge/last_update-23_Jan_2025-blue)](https://github.com/ihatenodejs/pontus-mail)
[![License: CC0-1.0](https://img.shields.io/badge/License-CC0_1.0-lightgrey.svg)](http://creativecommons.org/publicdomain/zero/1.0/)
Landing page for p0ntus mail
# Self hosting
## Traditional Node.js
## Self hosting
### Using Express
1. Clone the repo
```bash
git clone https://github.com/ihatenodejs/pontus-mail.git
cd pontus-mail
```
2. Copy the example `docker-compose.yml`
```bash
mv docker-compose.yml.example docker-compose.yml
```
3. Copy the example `donations.json`
```bash
mv donations.json.example donations.json
```
4. Copy the example `.env`
```bash
mv .env.example .env
```
Make sure you edit this with your MySQL server information and other values.
Make sure you edit this with the desired internal port. We suggest keeping the internal port set to `3000`.
5. Install dependencies
```bash
npm install
```
6. Start the server
```bash
node app.js
```
You will now have a fully functioning Node.js Express server, which will be running on port `3000`.
## With Docker
### Using Docker
You can also use Docker to self-host pontus-mail's frontend. Make sure you have docker-compose or docker-compose-plugin installed on your system.
1. Clone the repo
```bash
git clone https://github.com/ihatenodejs/pontus-mail.git
cd pontus-mail
```
2. Copy the example `docker-compose.yml`
```bash
mv docker-compose.yml.example docker-compose.yml
```
3. Copy the example `.env`
```bash
mv .env.example .env
```
Make sure you edit this file with values matching in `docker-compose.xml`, and other desired values like admin username/password.
This configuration's defaults have been set to be compatible with Docker. Please do not change this file unless you know what you're doing!
4. Copy the example `donations.json`
```bash
mv donations.json.example donations.json
```
5. Start and build Docker containers
```bash
docker compose up -d --build
```
You will now have a fully functioning Node.js Express server, which will be running on the port specified in `docker-compose.yml`, and internally on port `3000`.
# To-Do
## To-Do
- [ ] Port to NextJS?
- [ ] Hovering effects for buttons
- [ ] Reintegrate backend logic for counters on home page
- [ ] Statistics animation

57
app.js
View File

@ -6,6 +6,21 @@ const axios = require('axios');
const NodeCache = require('node-cache');
const cache = new NodeCache({ stdTTL: 1800 });
function checkSetup() {
if (!fs.existsSync(path.join(__dirname, '.env'))) {
console.error("Couldn't find .env file, please create one using the provided .env.example file.");
process.exit(1);
}
const reqVar = ['INTERNAL_PORT'];
const missingVar = reqVar.filter(envVar => !process.env[envVar]);
if (missingVar.length > 0) {
console.error(`Oops, you're missing these required variables in your .env file: ${missingVar.join(', ')}`);
process.exit(1);
}
}
require('dotenv').config();
const app = express();
@ -15,45 +30,8 @@ app.set('views', path.join(__dirname, 'src'));
app.use(bodyParser.urlencoded({ extended: false }));
app.use(express.static(path.join(__dirname, 'public')));
//async function fetchDomainData() {
// const cachedData = cache.get('domainData');
// if (cachedData) {
// return cachedData;
// }
//
// try {
// const response = await axios.get('https://user.p0ntus.com/api/v1/get/domain/all', {
// headers: {
// 'accept': 'application/json',
// 'X-API-Key': process.env.MC_API_KEY
// }
// });
// const domainData = response.data;
// cache.set('domainData', domainData);
// return domainData;
// } catch (error) {
// console.error('Error fetching domain data:', error);
// return [];
// }
//}
//function getDomains() {
// const domainsPath = path.join(__dirname, 'domains.txt');
// try {
// const domains = fs.readFileSync(domainsPath, 'utf-8').split('\n').filter(Boolean);
// return domains;
// } catch (error) {
// console.error('Error reading domains.txt:', error);
// return [];
// }
//}
// TODO: Reintegrate backend logic for counters on home page
app.get('/', async (req, res) => {
//const domainData = await fetchDomainData();
//const domainCount = Array.isArray(domainData) ? domainData.length : 0;
//const accountCount = Array.isArray(domainData) ? domainData.reduce((acc, domain) => acc + domain.mboxes_in_domain, 0) : 0;
//const totalData = Array.isArray(domainData) ? domainData.reduce((acc, domain) => acc + parseInt(domain.bytes_total), 0) / (1024 * 1024) : 0;
res.render('index', { currentPage: 'home' });
});
@ -122,7 +100,8 @@ app.get('/guides/vaultwarden/firefox', (req, res) => {
res.render('guides/vaultwarden/firefox', { currentPage: 'guides' });
});
// Start server on internal port defined in .env
// Verify .env and start server on internal port defined in .env
checkSetup();
app.listen(process.env.INTERNAL_PORT, () => {
console.log(`Server started on port ${process.env.INTERNAL_PORT}`);
});

View File

@ -16,7 +16,7 @@
</li>
</ul>
<i class="il mt-5">Email</i>
<i class="il">Email</i>
<hr>
<ul class="list-group text-start">
<li class="list-group-item">
@ -27,7 +27,7 @@
</li>
</ul>
<i class="il mt-5">User Dashboard</i>
<i class="il">User Dashboard</i>
<hr>
<ul class="list-group text-start">
<li class="list-group-item">

View File

@ -17,6 +17,7 @@
<a href="https://user.pontusmail.org/webmail/" class="btn bg-dark text-white mt-2"><i class="fa-solid fa-envelope ico-sm"></i> Webmail</a>
<a href="https://user.pontusmail.org" class="btn bg-dark text-white mt-2"><i class="fa-solid fa-user ico-sm"></i> Account</a>
<a href="https://vaultwarden.p0ntus.com" class="btn bg-dark text-white mt-2"><i class="fa-solid fa-key ico-sm"></i> Vaultwarden</a>
<a href="https://git.pontusmail.org" class="btn bg-dark text-white mt-2"><i class="fa-brands fa-git-alt ico-sm"></i> Git</a>
<a href="/guides" class="btn bg-dark text-white mt-2"><i class="fa-solid fa-book ico-sm"></i> Guides</a>
<a href="https://user.pontusmail.org/admin/client" class="btn bg-dark text-white mt-2"><i class="fa-solid fa-question ico-sm"></i> Client Setup</a>
</div>

View File

@ -6,23 +6,25 @@
<p class="text-start"><b>Our system collects automatically:</b></p>
<ul class="list-group text-start">
<li class="list-group-item">Log files which may include the currently logged-in IP address, user agent, or other identifying information. We clear this data as much as possible.</li>
<li class="list-group-item">Linked external email addresses' folders, last check date, status, created date, users, and the ability to take actions (like you can on your dashboard).</li>
<li class="list-group-item">Storage and disk quota used by your account</li>
<li class="list-group-item">Account creation date (no time)</li>
<li class="list-group-item">Linked external email addresses' folders, last check date, status, created date, users, and the ability to take actions (like you can on your dashboard).</li>
<li class="list-group-item">Automatic reply settings</li>
</ul>
<p class="text-start mt-3"><b>What I collect by choice:</b></p>
<ul class="list-group text-start">
<li class="list-group-item">I do not collect any extra information at the moment</li>
</ul>
<p class="text-start mt-3"><b>What the admin has access to:</b></p>
<p class="text-start mt-3"><b>What admins have access to:</b></p>
<ul class="list-group text-start">
<li class="list-group-item">Your email address</li>
<!-- This is classified as what front-end services are available to Mailu admins-->
<li class="list-group-item">Reset your password (your existing password is not visible)</li>
<li class="list-group-item">Most automatically collected data (see above)</li>
<li class="list-group-item">Your registered email address</li>
<li class="list-group-item">Change your account quotas</li>
<li class="list-group-item">Delete your account</li>
<li class="list-group-item">Change your quotas</li>
<li class="list-group-item">Decrypt emails stored on server</li>
</ul>
<p class="text-start mt-3"><b>Please Note:</b> It may be possible for the server owner (or an administrator with shell access) to view your messages</p>
<i class="il mt-3">What I do with the data collected</i>
<hr>
<p class="text-start">I don't store any of your data for monetary gain or marketing purposes. I have nothing to market to you.</p>
@ -31,9 +33,9 @@
<p class="text-start">I will never share your data with third parties unless required by law.</p>
<i class="il mt-3">Security</i>
<hr>
<p class="text-start">Provided all of our security is functioning, only the owners of this service (p0ntus and lucmsilva) and the hosting provider (Namecheap) has access to the data and server.</p>
<p class="text-start">I am committed to ensuring that your data is secure. However, I am no security professional.</p>
<p class="text-start">p0ntus mail is powered by Mailcow, running in Docker. I check for updates several times a day.</p>
<p class="text-start">A strong firewall is backing the server. The server is physically located in Michigan, USA.</p>
<p class="text-start">Your emails are stored encrypted and compressed (using LZ4). I, as the server admin, have access to the decryption keys.</p>
<p class="text-start">p0ntus mail is powered by Mailu, running in Docker. Updates are applied daily for security.</p>
<p class="text-start">The server hosting all of LibreCloud and p0ntus mail is physically located in Atlanta, Georgia and rented from Namecheap Inc.</p>
</div>
<%- include('shards/footer') %>

View File

@ -33,8 +33,8 @@
<div class="col-md-6 mb-4">
<div class="card">
<div class="card-body">
<h5 class="card-title"><i class="fa-solid fa-server ico-sm"></i> Personally Managed</h5>
<p class="card-text">p0ntus mail is personally managed and monitored for maximum uptime.</p>
<h5 class="card-title"><i class="fa-solid fa-server ico-sm"></i> Additional Services</h5>
<p class="card-text">p0ntus mail offers an ever-changing selection of additional services such as Git, available for free.</p>
</div>
</div>
</div>
@ -46,16 +46,18 @@
<li class="list-group-item">4000 MB storage (may vary)</li>
<li class="list-group-item">Roundcube Webmail</li>
<li class="list-group-item">Contacts List</li>
<li class="list-group-item">IMAP/SMTP access</li>
<li class="list-group-item">IMAP/SMTP access (TLS)</li>
<li class="list-group-item">Spam protection</li>
<li class="list-group-item">5 outgoing messages per hour</li>
<li class="list-group-item">Vaultwarden password manager</li>
<li class="list-group-item">Fair-use outgoing message policy</li>
<li class="list-group-item"><a href="https://vaultwarden.p0ntus.com/">Password manager</a> (Vaultwarden)</li>
<li class="list-group-item"><a href="https://git.pontusmail.org/">Unlimited Git access</a> (Gitea)</li>
</ul>
<p class="text-start mt-3">You may request for additional storage, or increased account limits by contacting <a href="mailto:admin@p0ntus.com">admin<i class="fa-solid fa-at p"></i>p0ntus.com</a>. We operate under a "fair use" policy.</p>
<p class="text-start mt-3">You may also be limited in storage depending on your use. There is a 100% chance you will get 4000 MB if you would like to actually use the email service. Some people will not use their accounts and hold up disk quotas.</p>
<p class="text-start mt-3">All aforementioned services are self-hosted on <b>our servers</b>. All data is under control by me and the hosting provider (Namecheap).</p>
<i class="il mt-3">Vaultwarden</i>
<hr>
<p class="text-start">Vaultwarden is a password manager that is included with your services. You can access it by visiting <a href="https://vaultwarden.p0ntus.com">vaultwarden.p0ntus.com</a> and creating a account.</p>
<p class="text-start">You do not need a p0ntus mail account to create a Vaultwarden account.</p>
<p class="text-start">You will need a p0ntus mail account to create a Vaultwarden account.</p>
</div>
<%- include('shards/footer') %>