chore: Improve email anti-spam compliance and update server docs
- Add proper email headers: X-Mailer, X-Priority, Precedence, List-Unsubscribe - Improve HTML template with XHTML doctype for better compatibility - Add compliance footer with unsubscribe link and address - Remove accented characters from email template (spam trigger) - Update CREDENCIAIS_SERVIDOR.md with: - Current service versions (PHP 8.4.15, Nginx 1.29.4, etc) - DNS anti-spam status (SPF ✅, DMARC ✅, DKIM ⚠️ pending) - DKIM key for DNS publication - Cron job documentation - New API endpoints (/preferences)
This commit is contained in:
parent
19dcdce262
commit
135dc56eb6
@ -2,7 +2,7 @@
|
||||
|
||||
> **⚠️ DOCUMENTO CONFIDENCIAL - NÃO COMPARTILHAR**
|
||||
>
|
||||
> Última atualização: 07 de Dezembro de 2025
|
||||
> Última atualização: 17 de Dezembro de 2025
|
||||
|
||||
---
|
||||
|
||||
@ -10,14 +10,14 @@
|
||||
|
||||
| Campo | Valor |
|
||||
|-------|-------|
|
||||
| **Host** | `213.165.93.60` |
|
||||
| **Usuário** | `root` |
|
||||
| **Senha** | `Master9354` |
|
||||
| **Porta** | `22` |
|
||||
| **Host** | \`213.165.93.60\` |
|
||||
| **Usuário** | \`root\` |
|
||||
| **Senha** | \`Master9354\` |
|
||||
| **Porta** | \`22\` |
|
||||
|
||||
```bash
|
||||
ssh root@213.165.93.60
|
||||
```
|
||||
\`\`\`bash
|
||||
sshpass -p 'Master9354' ssh -o StrictHostKeyChecking=no root@213.165.93.60
|
||||
\`\`\`
|
||||
|
||||
---
|
||||
|
||||
@ -35,15 +35,15 @@ ssh root@213.165.93.60
|
||||
|
||||
| URL | Descrição | Usuário | Senha |
|
||||
|-----|-----------|---------|-------|
|
||||
| https://phpmyadmin.cnxifly.com | phpMyAdmin (Banco de Dados) | `root` | `M@ster9354` |
|
||||
| https://mail.cnxifly.com | PostfixAdmin (Admin Email) | `admin@cnxifly.com` | `M@ster9354` |
|
||||
| https://webmail.cnxifly.com | Roundcube (Webmail) | `marco@cnxifly.com` | `M@ster9354` |
|
||||
| https://phpmyadmin.cnxifly.com | phpMyAdmin (Banco de Dados) | \`root\` | \`M@ster9354\` |
|
||||
| https://mail.cnxifly.com | PostfixAdmin (Admin Email) | \`admin@cnxifly.com\` | \`M@ster9354\` |
|
||||
| https://webmail.cnxifly.com | Roundcube (Webmail) | \`marco@cnxifly.com\` | \`M@ster9354\` |
|
||||
|
||||
### WEBMoney App (Login Sistema)
|
||||
|
||||
| URL | Usuário | Senha | Descrição |
|
||||
|-----|---------|-------|-----------|
|
||||
| https://webmoney.cnxifly.com | `marco@cnxifly.com` | `M@ster9354` | Administrador |
|
||||
| https://webmoney.cnxifly.com | \`marco@cnxifly.com\` | \`M@ster9354\` | Administrador |
|
||||
|
||||
---
|
||||
|
||||
@ -53,49 +53,59 @@ ssh root@213.165.93.60
|
||||
|
||||
| Campo | Valor |
|
||||
|-------|-------|
|
||||
| **Host** | `localhost` ou `127.0.0.1` |
|
||||
| **Porta** | `3306` |
|
||||
| **Usuário** | `root` |
|
||||
| **Senha** | `M@ster9354` |
|
||||
| **Host** | \`localhost\` ou \`127.0.0.1\` |
|
||||
| **Porta** | \`3306\` |
|
||||
| **Usuário** | \`root\` |
|
||||
| **Senha** | \`M@ster9354\` |
|
||||
|
||||
```bash
|
||||
\`\`\`bash
|
||||
mysql -u root -p'M@ster9354'
|
||||
```
|
||||
# ou via SSH:
|
||||
sshpass -p 'Master9354' ssh root@213.165.93.60 "mysql -u webmoney -p'M@ster9354' webmoney -e 'QUERY'"
|
||||
\`\`\`
|
||||
|
||||
### Databases e Usuários
|
||||
|
||||
| Database | Usuário | Senha | Descrição |
|
||||
|----------|---------|-------|-----------|
|
||||
| `webmoney` | `webmoney` | `M@ster9354` | Aplicação principal |
|
||||
| `postfixadmin` | `postfixadmin` | `M@ster9354` | Gerenciamento de emails |
|
||||
| `roundcube` | `roundcube` | `M@ster9354` | Webmail |
|
||||
| `phpmyadmin` | `phpmyadmin` | `M@ster9354` | Controle phpMyAdmin |
|
||||
| \`webmoney\` | \`webmoney\` | \`M@ster9354\` | Aplicação principal |
|
||||
| \`postfixadmin\` | \`postfixadmin\` | \`M@ster9354\` | Gerenciamento de emails |
|
||||
| \`roundcube\` | \`roundcube\` | \`M@ster9354\` | Webmail |
|
||||
| \`phpmyadmin\` | \`phpmyadmin\` | \`M@ster9354\` | Controle phpMyAdmin |
|
||||
|
||||
---
|
||||
|
||||
## 📧 SERVIDOR DE EMAIL
|
||||
|
||||
### Versões dos Serviços de Email
|
||||
|
||||
| Serviço | Versão |
|
||||
|---------|--------|
|
||||
| Postfix | 3.8.6 |
|
||||
| Dovecot | 2.3.21 |
|
||||
| OpenDKIM | 2.11.0 |
|
||||
|
||||
### Configuração SMTP/IMAP
|
||||
|
||||
| Campo | Valor |
|
||||
|-------|-------|
|
||||
| **Servidor** | `mail.cnxifly.com` |
|
||||
| **SMTP Porta** | `587` (STARTTLS) |
|
||||
| **SMTPS Porta** | `465` (SSL/TLS) |
|
||||
| **IMAP Porta** | `993` (SSL/TLS) |
|
||||
| **Servidor** | \`mail.cnxifly.com\` |
|
||||
| **SMTP Porta** | \`587\` (STARTTLS) |
|
||||
| **SMTPS Porta** | \`465\` (SSL/TLS) |
|
||||
| **IMAP Porta** | \`993\` (SSL/TLS) |
|
||||
| **Autenticação** | Necessária |
|
||||
|
||||
### Contas de Email
|
||||
|
||||
| Email | Senha | Descrição |
|
||||
|-------|-------|-----------|
|
||||
| `admin@cnxifly.com` | `M@ster9354` | Administrador PostfixAdmin |
|
||||
| `marco@cnxifly.com` | `M@ster9354` | Email pessoal Marco |
|
||||
| `no-reply@cnxifly.com` | `M@ster9354` | Notificações do sistema |
|
||||
| \`admin@cnxifly.com\` | \`M@ster9354\` | Administrador PostfixAdmin |
|
||||
| \`marco@cnxifly.com\` | \`M@ster9354\` | Email pessoal Marco |
|
||||
| \`no-reply@cnxifly.com\` | \`M@ster9354\` | Notificações do sistema |
|
||||
|
||||
### Configuração Cliente de Email
|
||||
|
||||
```
|
||||
\`\`\`
|
||||
Servidor de entrada (IMAP):
|
||||
Host: mail.cnxifly.com
|
||||
Porta: 993
|
||||
@ -105,33 +115,75 @@ Servidor de saída (SMTP):
|
||||
Host: mail.cnxifly.com
|
||||
Porta: 587
|
||||
Segurança: STARTTLS
|
||||
```
|
||||
\`\`\`
|
||||
|
||||
---
|
||||
|
||||
## 🛡️ CONFIGURAÇÕES ANTI-SPAM (DNS)
|
||||
|
||||
### Registros DNS para Entrega de Email
|
||||
|
||||
| Tipo | Nome | Valor | Status |
|
||||
|------|------|-------|--------|
|
||||
| **SPF** | \`cnxifly.com\` | \`v=spf1 mx a ip4:213.165.93.60 -all\` | ✅ OK |
|
||||
| **DMARC** | \`_dmarc.cnxifly.com\` | \`v=DMARC1; p=quarantine; ...\` | ✅ OK |
|
||||
| **DKIM** | \`mail._domainkey.cnxifly.com\` | (chave RSA 2048-bit) | ⚠️ **PENDENTE** |
|
||||
| **PTR/rDNS** | \`213.165.93.60\` | \`mail.cnxifly.com\` | ✅ OK |
|
||||
|
||||
### ⚠️ AÇÃO NECESSÁRIA: Adicionar DKIM no DNS
|
||||
|
||||
A chave DKIM existe no servidor mas **NÃO está publicada no DNS**. Adicionar o seguinte registro TXT:
|
||||
|
||||
\`\`\`
|
||||
Nome: mail._domainkey.cnxifly.com
|
||||
Tipo: TXT
|
||||
Valor: v=DKIM1; h=sha256; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA1A8I6ZHyZ0PYdOjB2BSQbH8q6WOJ2dO2zHiIn/bolAGl5ITo5hfn3Zv2fpHBMzcWbDITugSQFuQ3XJeF6oBNdWVvBqnEvI8pCJWzzhZ8Oj9rU+mEPOhIcmmDU6kHCTOFWFxgxbLd2es34rmts06xpF7nI4mWuJq8VVtkrqT0UkZNjjZrNO9KXfdTzV3pP0IEZA+KJlYqVDwnALL62z6GT9xAQi2eytoRSXbTzGDC4+kNXE3v2zMB5+CY9CbH3LZ7SFoJUQJCTf43zc4ea+nWsE/Y2DR5ky2hSwOh7FRJ2nXV07N2VlLu9LekZl08q9G49mwEY6ORT0aShL7RYsNTKQIDAQAB
|
||||
\`\`\`
|
||||
|
||||
### Verificação Anti-Spam
|
||||
|
||||
\`\`\`bash
|
||||
# Testar SPF
|
||||
dig +short TXT cnxifly.com | grep spf
|
||||
|
||||
# Testar DMARC
|
||||
dig +short TXT _dmarc.cnxifly.com
|
||||
|
||||
# Testar DKIM (após adicionar no DNS)
|
||||
dig +short TXT mail._domainkey.cnxifly.com
|
||||
|
||||
# Testar rDNS
|
||||
dig +short -x 213.165.93.60
|
||||
|
||||
# Verificar assinatura DKIM
|
||||
opendkim-testkey -d cnxifly.com -s mail -vvv
|
||||
\`\`\`
|
||||
|
||||
---
|
||||
|
||||
## 🔧 API ENDPOINTS
|
||||
|
||||
### Base URL
|
||||
```
|
||||
\`\`\`
|
||||
https://webmoney.cnxifly.com/api
|
||||
```
|
||||
\`\`\`
|
||||
|
||||
### Endpoints Disponíveis
|
||||
|
||||
| Método | Endpoint | Descrição |
|
||||
|--------|----------|-----------|
|
||||
| `POST` | `/api/login` | Autenticação |
|
||||
| `POST` | `/api/register` | Registro de usuário |
|
||||
| `POST` | `/api/logout` | Logout |
|
||||
| `GET` | `/api/me` | Dados do usuário autenticado |
|
||||
| `GET` | `/api/user` | Informações do usuário |
|
||||
| `GET` | `/api/email/anti-spam-info` | Informações anti-spam |
|
||||
| `POST` | `/api/email/send-test` | Enviar email de teste |
|
||||
| \`POST\` | \`/api/login\` | Autenticação |
|
||||
| \`POST\` | \`/api/register\` | Registro de usuário |
|
||||
| \`POST\` | \`/api/logout\` | Logout |
|
||||
| \`GET\` | \`/api/me\` | Dados do usuário autenticado |
|
||||
| \`GET\` | \`/api/preferences\` | Preferências do usuário |
|
||||
| \`PUT\` | \`/api/preferences\` | Atualizar preferências |
|
||||
| \`POST\` | \`/api/preferences/test-notification\` | Testar notificação |
|
||||
|
||||
### Health Check
|
||||
```
|
||||
\`\`\`
|
||||
GET https://cnxifly.com/up
|
||||
```
|
||||
\`\`\`
|
||||
|
||||
---
|
||||
|
||||
@ -140,42 +192,67 @@ GET https://cnxifly.com/up
|
||||
| Campo | Valor |
|
||||
|-------|-------|
|
||||
| **Emissor** | Let's Encrypt |
|
||||
| **Início** | 07 de Dezembro de 2025 |
|
||||
| **Válido até** | 07 de Março de 2026 |
|
||||
| **Domínios cobertos** | cnxifly.com, www, mail, webmail, phpmyadmin, webmoney |
|
||||
| **Renovação** | Automática via Certbot |
|
||||
|
||||
---
|
||||
|
||||
## 📁 ESTRUTURA DE DIRETÓRIOS
|
||||
|
||||
```
|
||||
\`\`\`
|
||||
/var/www/webmoney/
|
||||
├── backend/ # Laravel API
|
||||
├── frontend/ # Vue/React App
|
||||
└── public/ # Arquivos públicos
|
||||
├── backend/ # Laravel API (PHP 8.4)
|
||||
│ └── storage/logs/ # Logs do Laravel
|
||||
└── frontend/
|
||||
└── dist/ # React build (Nginx root)
|
||||
|
||||
/var/www/postfixadmin/ # PostfixAdmin
|
||||
/var/www/roundcube/ # Roundcube Webmail
|
||||
/var/www/phpmyadmin/ # phpMyAdmin
|
||||
```
|
||||
\`\`\`
|
||||
|
||||
---
|
||||
|
||||
## 🔄 SERVIÇOS DO SISTEMA
|
||||
|
||||
| Serviço | Comando de Status |
|
||||
|---------|-------------------|
|
||||
| Nginx | `systemctl status nginx` |
|
||||
| PHP-FPM | `systemctl status php8.4-fpm` |
|
||||
| MariaDB | `systemctl status mariadb` |
|
||||
| Redis | `systemctl status redis-server` |
|
||||
| Postfix | `systemctl status postfix` |
|
||||
| Dovecot | `systemctl status dovecot` |
|
||||
| OpenDKIM | `systemctl status opendkim` |
|
||||
### Versões
|
||||
|
||||
| Serviço | Versão |
|
||||
|---------|--------|
|
||||
| Nginx | 1.29.4 |
|
||||
| PHP-FPM | 8.4.15 |
|
||||
| MariaDB | 11.4.9 |
|
||||
| Redis | 7.0.15 |
|
||||
| Postfix | 3.8.6 |
|
||||
| Dovecot | 2.3.21 |
|
||||
| OpenDKIM | 2.11.0 |
|
||||
|
||||
### Comandos de Status
|
||||
|
||||
| Serviço | Comando |
|
||||
|---------|---------|
|
||||
| Nginx | \`systemctl status nginx\` |
|
||||
| PHP-FPM | \`systemctl status php8.4-fpm\` |
|
||||
| MariaDB | \`systemctl status mariadb\` |
|
||||
| Redis | \`systemctl status redis-server\` |
|
||||
| Postfix | \`systemctl status postfix\` |
|
||||
| Dovecot | \`systemctl status dovecot\` |
|
||||
| OpenDKIM | \`systemctl status opendkim\` |
|
||||
|
||||
### Reiniciar Todos os Serviços
|
||||
```bash
|
||||
\`\`\`bash
|
||||
systemctl restart nginx php8.4-fpm mariadb redis-server postfix dovecot opendkim
|
||||
```
|
||||
\`\`\`
|
||||
|
||||
---
|
||||
|
||||
## ⏰ CRON JOBS
|
||||
|
||||
| Cron | Comando | Descrição |
|
||||
|------|---------|-----------|
|
||||
| \`* * * * *\` | \`cd /var/www/webmoney/backend && php artisan schedule:run\` | Laravel Scheduler |
|
||||
|
||||
---
|
||||
|
||||
@ -184,21 +261,24 @@ systemctl restart nginx php8.4-fpm mariadb redis-server postfix dovecot opendkim
|
||||
1. **Backup**: Realizar backup regular do banco de dados e arquivos
|
||||
2. **SSL**: Certificado renova automaticamente via Certbot
|
||||
3. **Firewall**: UFW ativo com portas 22, 25, 80, 143, 443, 465, 587, 993
|
||||
4. **Logs**:
|
||||
- Nginx: `/var/log/nginx/`
|
||||
- PHP: `/var/log/php8.4-fpm.log`
|
||||
- Mail: `/var/log/mail.log`
|
||||
- Laravel: `/var/www/webmoney/backend/storage/logs/`
|
||||
4. **DKIM**: ⚠️ Chave existe no servidor mas falta registro DNS
|
||||
5. **Logs**:
|
||||
- Nginx: \`/var/log/nginx/\`
|
||||
- PHP: \`/var/log/php8.4-fpm.log\`
|
||||
- Mail: \`/var/log/mail.log\`
|
||||
- Laravel: \`/var/www/webmoney/backend/storage/logs/\`
|
||||
|
||||
---
|
||||
|
||||
## 🆘 SUPORTE
|
||||
|
||||
Em caso de problemas, verificar:
|
||||
1. Status dos serviços: `systemctl status [serviço]`
|
||||
2. Logs de erro: `tail -f /var/log/nginx/error.log`
|
||||
3. Conectividade: `curl -I https://cnxifly.com`
|
||||
1. Status dos serviços: \`systemctl status [serviço]\`
|
||||
2. Logs de erro: \`tail -f /var/log/nginx/error.log\`
|
||||
3. Logs Laravel: \`tail -f /var/www/webmoney/backend/storage/logs/laravel.log\`
|
||||
4. Logs de email: \`tail -f /var/log/mail.log\`
|
||||
5. Conectividade: \`curl -I https://cnxifly.com\`
|
||||
|
||||
---
|
||||
|
||||
> **Gerado automaticamente em 07/12/2025**
|
||||
> **Gerado automaticamente em 17/12/2025**
|
||||
|
||||
@ -109,7 +109,11 @@ public function headers(): Headers
|
||||
{
|
||||
return new Headers(
|
||||
text: [
|
||||
'List-Unsubscribe' => '<mailto:support@cnxifly.com?subject=unsubscribe>',
|
||||
'X-Mailer' => 'WEBMoney/1.44.5',
|
||||
'X-Priority' => '3',
|
||||
'X-Auto-Response-Suppress' => 'OOF, AutoReply',
|
||||
'Precedence' => 'bulk',
|
||||
'List-Unsubscribe' => '<https://webmoney.cnxifly.com/preferences>, <mailto:no-reply@cnxifly.com?subject=unsubscribe>',
|
||||
'List-Unsubscribe-Post' => 'List-Unsubscribe=One-Click',
|
||||
],
|
||||
);
|
||||
|
||||
@ -1,10 +1,17 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="pt-BR">
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="pt-BR">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Alerta de Pagamentos</title>
|
||||
<style>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<meta name="x-apple-disable-message-reformatting" />
|
||||
<meta name="format-detection" content="telephone=no, date=no, address=no, email=no" />
|
||||
<title>WEBMoney - Alerta de Pagamentos</title>
|
||||
<!--[if mso]>
|
||||
<style type="text/css">
|
||||
body, table, td {font-family: Arial, Helvetica, sans-serif !important;}
|
||||
</style>
|
||||
<![endif]-->
|
||||
<style type="text/css">
|
||||
body {
|
||||
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
|
||||
line-height: 1.6;
|
||||
@ -366,9 +373,15 @@
|
||||
</div>
|
||||
|
||||
<div class="footer">
|
||||
<p>Este email foi enviado automaticamente pelo sistema WEBMoney.</p>
|
||||
<p>Para desativar estas notificações, acesse <a href="https://webmoney.cnxifly.com/preferences">Preferências</a>.</p>
|
||||
<p style="margin-top: 15px;">© {{ date('Y') }} WEBMoney - ConneXiFly</p>
|
||||
<p>Este email foi enviado automaticamente pelo sistema WEBMoney para {{ $userName }}.</p>
|
||||
<p>Voce recebe esta mensagem porque ativou as notificacoes de pagamentos.</p>
|
||||
<p>Para desativar estas notificacoes, acesse <a href="https://webmoney.cnxifly.com/preferences" style="color: #3b82f6;">Preferencias</a>.</p>
|
||||
<p style="margin-top: 15px; font-size: 11px; color: #94a3b8;">
|
||||
WEBMoney - ConneXiFly<br />
|
||||
Servico de gestao financeira pessoal<br />
|
||||
Madrid, Espanha
|
||||
</p>
|
||||
<p style="font-size: 11px; color: #94a3b8;">© {{ date('Y') }} WEBMoney - Todos os direitos reservados</p>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user