70 lines
2.9 KiB
Plaintext
70 lines
2.9 KiB
Plaintext
# Messagerie Bobinoo (docs/mail.md) : https://mail.bobinoo.org, interface de contact@bobinoo.org (boîte OVH Zimbra).
|
|
# Incluse par site.conf, livrée avec chaque release. HTTPS assuré par le proxy en façade du VPS (en-tête Host transmis).
|
|
# Mêmes protections que la console : compte Bobinoo admin + code de double authentification, secret entre ce serveur
|
|
# et la fonction Edge « mail », nombre d'appels limité, journal.
|
|
|
|
limit_req_zone $server_name zone=bobinoo_mail:1m rate=120r/m;
|
|
|
|
server {
|
|
listen 80;
|
|
server_name mail.bobinoo.org;
|
|
server_tokens off;
|
|
|
|
root /srv/bobinoo/current/mail;
|
|
index index.html;
|
|
include /etc/nginx/mime.types;
|
|
|
|
# Styles en ligne autorisés : le contenu des e-mails en a besoin (il est affiché dans un cadre isolé, sans script).
|
|
# Images https autorisées : bloquées par défaut par l'interface, chargées seulement sur « Afficher les images ».
|
|
add_header Content-Security-Policy "default-src 'none'; script-src 'self'; style-src 'self' 'unsafe-inline'; font-src 'self' data:; img-src 'self' data: blob: https:; connect-src 'self' https://qfgnxonqwldcfdjqhhjz.supabase.co; frame-src 'self'; base-uri 'none'; form-action 'self'; frame-ancestors 'none'" always;
|
|
add_header Strict-Transport-Security "max-age=63072000" always;
|
|
add_header X-Frame-Options "DENY" always;
|
|
add_header X-Content-Type-Options "nosniff" always;
|
|
add_header Referrer-Policy "no-referrer" always;
|
|
add_header X-Robots-Tag "noindex, nofollow" always;
|
|
add_header Cache-Control "no-store" always;
|
|
add_header Permissions-Policy "camera=(), microphone=(), geolocation=(), payment=()" always;
|
|
|
|
# Relais vers la fonction serveur « mail », avec le même secret que la console (/etc/nginx/bobinoo-admin-gate.conf)
|
|
location = /api/mail {
|
|
limit_except POST { deny all; }
|
|
limit_req zone=bobinoo_mail burst=40 nodelay;
|
|
limit_req_status 429;
|
|
client_max_body_size 256k;
|
|
resolver 1.1.1.1 9.9.9.9 valid=300s ipv6=off;
|
|
resolver_timeout 5s;
|
|
set $supabase qfgnxonqwldcfdjqhhjz.supabase.co;
|
|
proxy_pass https://$supabase/functions/v1/mail;
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Connection "";
|
|
proxy_ssl_server_name on;
|
|
proxy_ssl_name $supabase;
|
|
proxy_set_header Host $supabase;
|
|
proxy_set_header Cookie "";
|
|
proxy_set_header X-Forwarded-For "";
|
|
include /etc/nginx/bobinoo-admin-gate*.conf;
|
|
proxy_read_timeout 60s;
|
|
}
|
|
|
|
location = /robots.txt {
|
|
default_type text/plain;
|
|
return 200 "User-agent: *\nDisallow: /\n";
|
|
}
|
|
|
|
location /assets/ {
|
|
try_files $uri =404;
|
|
}
|
|
|
|
location / {
|
|
try_files $uri /index.html;
|
|
}
|
|
}
|
|
|
|
# Autre adresse : renvoie vers la messagerie
|
|
server {
|
|
listen 80;
|
|
server_name webmail.bobinoo.org;
|
|
server_tokens off;
|
|
return 301 https://mail.bobinoo.org/;
|
|
}
|