Merci encore pour le coup de main 😉
Effectivement, j'avais cru comprendre que ça ne servait pas à grand chose depuis mon serveur, mais ça confirmait que tout était fonctionnel à ce niveau là, pour mail.mondomaine.com.
Pour :
sudo iptables -L -n
La partie qui me semble intéressante :
TABLISHED
ufw-logging-deny all -- 0.0.0.0/0 0.0.0.0/0 ctstate INVALID
DROP all -- 0.0.0.0/0 0.0.0.0/0 ctstate INVALID
ACCEPT icmp -- 0.0.0.0/0 0.0.0.0/0 icmptype 3
ACCEPT icmp -- 0.0.0.0/0 0.0.0.0/0 icmptype 4
ACCEPT icmp -- 0.0.0.0/0 0.0.0.0/0 icmptype 11
ACCEPT icmp -- 0.0.0.0/0 0.0.0.0/0 icmptype 12
ACCEPT icmp -- 0.0.0.0/0 0.0.0.0/0 icmptype 8
ACCEPT udp -- 0.0.0.0/0 0.0.0.0/0 udp spt:67 dpt:68
ufw-not-local all -- 0.0.0.0/0 0.0.0.0/0
ACCEPT udp -- 0.0.0.0/0 224.0.0.251 udp dpt:5353
ACCEPT udp -- 0.0.0.0/0 239.255.255.250 udp dpt:1900
ufw-user-input all -- 0.0.0.0/0 0.0.0.0/0
Chain ufw-user-input (1 references)
target prot opt source destination
ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:22
ACCEPT udp -- 0.0.0.0/0 0.0.0.0/0 udp dpt:22
ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 multiport dports 80,443 /* 'dapp_Apache%20Full' */
ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:25
ACCEPT udp -- 0.0.0.0/0 0.0.0.0/0 udp dpt:25
ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:12301
ACCEPT udp -- 0.0.0.0/0 0.0.0.0/0 udp dpt:12301
ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:17789
ACCEPT udp -- 0.0.0.0/0 0.0.0.0/0 udp dpt:17789
Sinon j'ai toujours du source et du destination 0.0.0.0/0, est-ce normal ? Je vois que le port 25 est censé être en Accept mais il ne fonctionne quand même pas sur le telnet mail.mondomaine.com smtp, donc le problème ne vient pas de là ?
Les tests avec Kloth.net (merci pour l'outil !) :
Mx :
; <<>> DiG 9 <<>> @localhost mail.mondomaine.com MX
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 55219
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0
;; QUESTION SECTION:
;mail.mondomaine.com. IN MX
;; AUTHORITY SECTION:
mondomaine.com. 300 IN SOA dns20.ovh.net. tech.ovh.net. 2019072603 86400 3600 3600000 300
;; Query time: 13 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Thu Aug 1 13:16:14 2019
;; MSG SIZE rcvd: 96
A :
; <<>> DiG 9 <<>> @localhost mail.mondomaine.com A
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 17021
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;mail.mondomaine.com. IN A
;; ANSWER SECTION:
mail.mondomaine.com. 3142 IN A XX.XX.XX.XX
;; Query time: 0 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Thu Aug 1 13:19:02 2019
;; MSG SIZE rcvd: 58
DKIM & SPF OK confirmé par Mail-Tester.
EDIT :
Test du mail avec
https://dnslookup.fr :
Tests SMTP
Les champs MX possèdent les serveurs SMTP suivants :
MX 1 mail.mondomain.com. <=> XX.XX.XX.XX [GB] : 220 mail.mondomaine.com ESMTP Postfix (Ubuntu) nmap
Le domaine possède les champs SPF suivants :
v=spf1 ip4:xx.xx.xx.xx include:mx.ovh.com ~all"
(Pour vérifier si la liste des serveurs est exhaustive : Cf. FAQ #15)
Il y a 1 tests non validés :
Le domaine n'accepte pas l'adresse postmaster@mondomaine.com.
Tests DNS
Il y a 2 tests non validés :
Le SOA du domaine n'est pas correct
Un seul MX, risque d'indisponibilité
Afficher la réponse DNS
Serveur ayant répondu => ns20.ovh.net. <=> xxx.xxx.xxx.xxx [FR] [13 ms]
Enregistrements MX
Domaine TTL Classe Type Poids Serveur
domaine.com. 3600 IN MX 1 mail.domaine.com.
Enregistrements NS
Domaine TTL Classe Type Serveur
domaine.com. 3600 IN NS ns20.ovh.net.
domaine.com. 3600 IN NS dns20.ovh.net.
Enregistrements SOA
Domaine TTL Classe Type Détail du SOA
domaine.com. 3600 IN SOA
Serveur DNS maître dns20.ovh.net.
Contact email tech@ovh.net
Serial 2019072603
Refresh 86400
Retry 3600
Expire 3600000
Minimum TTL 300
Enregistrements CNAME
Alias TTL Classe Type Nom d'hôte cible
Aucun enregistrement CNAME
Enregistrements A
Nom d'hôte TTL Classe Type Adresse IP
domaine.com. 3600 IN A xxx.xxx.xx.x
www.domaine.com. 3600 IN A xxx.xxx.xx.x
Enregistrements TXT
Domaine TTL Classe Type Détail du TXT
domaine.com. 60 IN TXT "4|https://www.domaine.fr"
domaine.com. 60 IN TXT "v=spf1 ip4:xx.xx.xx.xx include:mx.ovh.com ~all"