Outils personnels

Debugage mail, configuration et DNS : Différence entre versions

De wikiGite

(Configuration DNS)
Ligne 15 : Ligne 15 :
 
  company.com ---- MX Record ---> www.company.com (*)
 
  company.com ---- MX Record ---> www.company.com (*)
 
  www.company.com ---- MX Record ---> www.company.com (*)
 
  www.company.com ---- MX Record ---> www.company.com (*)
  <IP-Address> ---- Reverse ----> company.com or servername.company.com (***)
+
  <IP-Address> ---- Reverse ----> company.com or servername.company.com (**)
  
 
(*) = This MUST be the exact name (including the hostname part) of the
 
(*) = This MUST be the exact name (including the hostname part) of the
domain as shown in the GUI interface.
+
domain as shown in the GUI interface.<br/>
(***) You must have reverse delegation authority for that network
+
(**) You must have reverse delegation authority for that network
 
address in order for this to work. Or ask your network provider to set  
 
address in order for this to work. Or ask your network provider to set  
 
up a reverse for you. Or at the worst check that your IP has a reverse
 
up a reverse for you. Or at the worst check that your IP has a reverse

Version du 12 octobre 2011 à 17:26

DNS

Les problèmes de mails viennent dans 80% des cas de problèmes DNS. On peut débugguer les enregistrements DNS avec ces outils :

http://www.intodns.com

ou directement le Zone Check de l'Afnic

http://www.afnic.fr/outils/zonecheck

Configuration DNS

Les DNS corrects pour sendmail (Postfix est plus permissif) :

If your site is named "www.company.com" in the GUI and has the Email Server 
Alias "company.com", then this is the minimum set of DNS records you ought to 
have:

company.com	 	---- A Record ----> 	 <IP-Address>
www.company.com	 ---- A Record ---->	 <IP-Address>
company.com	 	---- MX Record --->	 www.company.com (*)
www.company.com	 ---- MX Record --->	 www.company.com (*)
<IP-Address>	 	---- Reverse ---->	 company.com or servername.company.com (**)

(*) = This MUST be the exact name (including the hostname part) of the domain as shown in the GUI interface.
(**) You must have reverse delegation authority for that network address in order for this to work. Or ask your network provider to set up a reverse for you. Or at the worst check that your IP has a reverse record already.

Configuration sendmail

Debug sendmail

Voir la config hostname de sendmail

echo '$=m' | sendmail -bt -d0.4 

"mailq -d" affiche aussi ces infos, + d'autres, + la file d'attente !

trace virtusertable :

sendmail -d60.5 -bv user@domain.net

Sendmail voit-il les entrées virtusertable ?

echo '/map virtuser user@domain.net' | sendmail -bt

Sendmail en mode test

sendmail -bt
> 3,0 user@domain.net
...
Ctrl-D

Tester une adresse

sendmail -bv user@domain.net

Essayer aussi de recompiler les tables :

makemap hash /etc/mail/mailertable < /etc/mail/mailertable
makemap hash /etc/mail/access.db < /etc/mail/access
makemap hash /etc/mail/virtusertable.db <  /etc/mail/virtusertable

ou

cd /etc/mail
make clean
make
/etc/init.d/sendmail restart

ERREURS

  • MX loops back to me

peut signifier un tas de chose... Dans l'ordre :

  1. vérifier que l'adresse IP pointe vers le FQDN et non vers localhost dans /etc/hosts
  2. vérifier la configuration des DNS (voir ci-dessus), notamment que le MX pointe soit vers une IP directe, soit un alias qui pointe lui-même directement versun une IP
  3. vérifier les adresses reverse DNS. Elle doivent pointer vers un nom de domaine.