Contenu | Rechercher | Menus

Annonce

Si vous avez des soucis pour rester connecté, déconnectez-vous puis reconnectez-vous depuis ce lien en cochant la case
Me connecter automatiquement lors de mes prochaines visites.

À propos de l'équipe du forum.

#1 Le 02/07/2015, à 09:19

ERGY13

[résolu] postfix / impossible de recevoir les mails.

Bonjour,

j'ai actuellement un problème sur mon ubuntu server 15.04. j'ai installé le service postfix, mais depuis que j'ai ajouté quelques entrées SRV au DNS, plus moyen de recevoir de mails.

Ma config :
- Ubuntu-server-main
--- lamp
--- proftpd
--- bind9 (non utilisé)
--- postfix
--- un service teamspeak
--- 2 services minecraft
--- screen
--- ubuntu-desktop

Mon DNS  (mon registar me fournit un produit DNS car j'ai de la peine avec la configuration de bind9) :
- ns1.switchplus.ch | ns2.switch.plus.ch

Hostname			type	taget
play02.minegeeks.ch.		SRV	tcp://minegeeks.ch:25567
play01.minegeeks.ch.		SRV	tcp://minegeeks.ch:25565
minegeeks.ch.			MX	mail.minegeeks.ch
*.minegeeks.ch.			MX	mail.minegeeks.ch
webmail.minegeeks.ch.		CNAME	owa.minegeeks.ch
smtp.minegeeks.ch.		CNAME	smtp.minegeeks.ch
pop3.minegeeks.ch.		CNAME	pop.minegeeks.ch
pop.minegeeks.ch.		CNAME	pop.minegeeks.ch
owa.minegeeks.ch.		CNAME	owa.minegeeks.ch
imap.minegeeks.ch.		CNAME	imap.minegeeks.ch
autodiscover.minegeeks.ch.	CNAME	autodiscover.minegeeks.ch
*.minegeeks.ch.			A	83.77.49.64
minegeeks.ch.			A	83.77.49.64

note : j'ai un peu compacter les entrées SRV pour les afficher ici.
note2 :  j'ai utilisé une configuration par défaut du DNS en modifiant pour correspondre au domaine et j'ai ajouté les 2 entrées SRV.

-------------------------------

Avez-vous une idée pourquoi ça ne marche plus ? et si vous pensez à des optimisations DNS, c'est le bienvenue.

Merci d'avance
ERGY13

Dernière modification par ERGY13 (Le 15/07/2015, à 07:46)

Hors ligne

#2 Le 02/07/2015, à 17:34

Elder

Re : [résolu] postfix / impossible de recevoir les mails.

Salut,

Je ne suis pas un spécialiste du DNS mais il me semble qu'il manque un élément de pondération sur ton enregistrement MX.
Si je ne m'abuse il devrait ressembler à :

mondomaine.tld.    IN   MX    10    mail.mondomaine.tld. 

Maintenant, tu as peut être trop résumé le contenu de ta zone.

@+
Elder

Dernière modification par Elder (Le 02/07/2015, à 17:52)

Hors ligne

#3 Le 02/07/2015, à 20:58

ERGY13

Re : [résolu] postfix / impossible de recevoir les mails.

@Elder

Merci pour ta réponse, j'ai modifié et ça ne marche toujours pas.
Précision importante dont je viens de me rendre compte, ça ne marche pas non-plus en interne. je viens de m'en rendre compte.
j'ai essayé de remettre à zéro les entrées DNS mais ça ne marche pas mieux.

il y aurait-t-il un problème dans la configuration de postfix ? pourtant je n'y ai pas touché entre le moment où ça marchait et le moment ou ça marchait plus.

Hors ligne

#4 Le 02/07/2015, à 22:14

LeoMajor

Re : [résolu] postfix / impossible de recevoir les mails.

scan () { for ((t=0;t<${#target[@]};t++)); do for p in 25 465 587 143 110 993 995 25565; do nc -i1 -w1 -z "${target["$t"]}" "$p"; [ "$?" -eq 0 ] && echo `date +%H:%M:%S` "oK $p accessible sur ${target["$t"]} ++++" || echo `date +%H:%M:%S` "ko $p inaccessible sur ${target["$t"]}"; done ; done };  echo "ip, host, fqdn, à sonder ?"; unset target; declare -a target; read tgt; target=( `echo "${tgt}"` ); scan
ip, host, fqdn, à sonder ?
mail.minegeeks.ch imap.minegeeks.ch minegeeks.ch smtp.minegeeks.ch
22:45:17 oK 25 accessible sur mail.minegeeks.ch ++++
22:45:18 ko 465 inaccessible sur mail.minegeeks.ch
22:45:19 ko 587 inaccessible sur mail.minegeeks.ch
22:45:19 oK 143 accessible sur mail.minegeeks.ch ++++
22:45:20 oK 110 accessible sur mail.minegeeks.ch ++++
22:45:21 ko 993 inaccessible sur mail.minegeeks.ch
22:45:22 ko 995 inaccessible sur mail.minegeeks.ch
22:45:22 oK 25565 accessible sur mail.minegeeks.ch ++++
nc: getaddrinfo: Name or service not known
22:45:24 ko 25 inaccessible sur imap.minegeeks.ch
nc: getaddrinfo: Name or service not known
22:45:24 ko 465 inaccessible sur imap.minegeeks.ch
nc: getaddrinfo: Name or service not known
22:45:25 ko 587 inaccessible sur imap.minegeeks.ch
nc: getaddrinfo: Name or service not known
22:45:26 ko 143 inaccessible sur imap.minegeeks.ch
nc: getaddrinfo: Name or service not known
22:45:26 ko 110 inaccessible sur imap.minegeeks.ch
nc: getaddrinfo: Name or service not known
22:45:27 ko 993 inaccessible sur imap.minegeeks.ch
nc: getaddrinfo: Name or service not known
22:45:27 ko 995 inaccessible sur imap.minegeeks.ch
nc: getaddrinfo: Name or service not known
22:45:27 ko 25565 inaccessible sur imap.minegeeks.ch
22:45:28 oK 25 accessible sur minegeeks.ch ++++
22:45:29 ko 465 inaccessible sur minegeeks.ch
22:45:30 ko 587 inaccessible sur minegeeks.ch
22:45:30 oK 143 accessible sur minegeeks.ch ++++
22:45:30 oK 110 accessible sur minegeeks.ch ++++
22:45:31 ko 993 inaccessible sur minegeeks.ch
22:45:32 ko 995 inaccessible sur minegeeks.ch
22:45:32 oK 25565 accessible sur minegeeks.ch ++++
nc: getaddrinfo: Name or service not known
22:45:34 ko 25 inaccessible sur smtp.minegeeks.ch
nc: getaddrinfo: Name or service not known
22:45:35 ko 465 inaccessible sur smtp.minegeeks.ch                                                                                                                                                       
nc: getaddrinfo: Name or service not known                                                                                                                                                               
22:45:35 ko 587 inaccessible sur smtp.minegeeks.ch                                                                                                                                                       
nc: getaddrinfo: Name or service not known                                                                                                                                                               
22:45:36 ko 143 inaccessible sur smtp.minegeeks.ch                                                                                                                                                       
nc: getaddrinfo: Name or service not known                                                                                                                                                               
22:45:36 ko 110 inaccessible sur smtp.minegeeks.ch                                                                                                                                                       
nc: getaddrinfo: Name or service not known                                                                                                                                                               
22:45:37 ko 993 inaccessible sur smtp.minegeeks.ch                                                                                                                                                       
nc: getaddrinfo: Name or service not known                                                                                                                                                               
22:45:37 ko 995 inaccessible sur smtp.minegeeks.ch                                                                                                                                                       
nc: getaddrinfo: Name or service not known                                                                                                                                                               
22:45:38 ko 25565 inaccessible sur smtp.minegeeks.ch                    

tu as un problème sur tes cname.
ton mta est accessible en 25 sur mail.minegeeks.ch et minegeeks.ch

telnet  mail.minegeeks.ch 25
Trying 83.77.49.64...
Connected to mail.minegeeks.ch.
Escape character is '^]'.
220 ubuntu-server-MAIN.home ESMTP Postfix (Ubuntu)
ehlo aa
250-ubuntu-server-MAIN.home
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-STARTTLS
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
mail from:<toto@minegeeks.c>
250 2.1.0 Ok
rcpt to:<tataminegeeks.ch>
550 5.1.1 <tataminegeeks.ch>: Recipient address rejected: User unknown in local recipient table
rcpt to:<root@minegeeks.ch>
250 2.1.5 Ok
data
354 End data with <CR><LF>.<CR><LF>                                                                                                                                                                      
test ok                                                                                                                                                                                                  
.                                                                                                                                                                                                        
250 2.0.0 Ok: queued as 97985FA0C4F  

et en idem en starttls

openssl s_client -connect mail.minegeeks.ch:25 -starttls smtp -ign_eof
CONNECTED(00000003)
depth=0 CN = ubuntu-server-MAIN.home
verify error:num=18:self signed certificate
verify return:1
depth=0 CN = ubuntu-server-MAIN.home
verify return:1
---
Certificate chain
 0 s:/CN=ubuntu-server-MAIN.home
   i:/CN=ubuntu-server-MAIN.home
---
Server certificate
-----BEGIN CERTIFICATE-----
MIIC1DCCAbygAwIBAgIJAM5sSc6RDGKHMA0GCSqGSIb3DQEBCwUAMCIxIDAeBgNV
BAMTF3VidW50dS1zZXJ2ZXItTUFJTi5ob21lMB4XDTE1MDYwNzE0NDM1MFoXDTI1
MDYwNDE0NDM1MFowIjEgMB4GA1UEAxMXdWJ1bnR1LXNlcnZlci1NQUlOLmhvbWUw
ggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCZkQ/5DIWlVqAXXVL8aFq6
+OUJbJ2h1blu9j2jWTEbRihOO3yO2I1Egu6UPE1fp1hbWoIaQrQ3RJGbOYU2bIJK
blKzPFt48Abo4UgwRXzLFf1/J5QRFIcdQ6W+n6oHqPDv5UsfBvQonKcMMUMyjMYk
N8wBlQw8O/SXkThN1gI88Ocedc2ulLaM9MNXzlhvMrLrzvY/PWHGs0KjITgh8j7w
fBXIxcvTy59TpQLM1XFXFwrgB4fucS4cCrbyngu3gbeQ39YijuCFD+TffZ1jb8f6
pZKcwwp8FoisZCJ+40ba53ZwbS8KAUKUzBrk+Kl+bNTmf8Yg0CpzAXc7ZukhBf73
AgMBAAGjDTALMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQELBQADggEBAFKg52jAKrUD
TqoKcjGJPLozQ9ZHg44Ri7k8nVvfB0qTI0HiDTkTLv4HTIoWZS9Z9yh95h+MNwlT
IK7pP/BNZ2b9eWJq+Kyh0hnrCMyze26VGNpO+Ad7GNho4bN+v522E4g6e1r6Qw2v
mCU0c0vfcvQHDpf/Sq5rq2b3mMIFuvSeYe0UGuUzN8U22xx2U8BBAzXgApMzwhIS
fjDKBakbhyJOYGMb5JliaGObFCk54Cd5di7pwi2KXIKI0A0wilorP2cEsWv50LD6
5oiFqa0WvsG2O6OxAW6UZQPqsMWkw3pvWEA/l5JF7+gUF/ps+/wFTCT0S2q1112C
3gLjzjWecQs=
-----END CERTIFICATE-----
subject=/CN=ubuntu-server-MAIN.home
issuer=/CN=ubuntu-server-MAIN.home
---
No client certificate CA names sent
---
SSL handshake has read 1637 bytes and written 398 bytes
---
New, TLSv1/SSLv3, Cipher is ECDHE-RSA-AES256-SHA
Server public key is 2048 bit
Secure Renegotiation IS supported                                                                                                                                                                        
Compression: NONE                                                                                                                                                                                        
Expansion: NONE                                                                                                                                                                                          
SSL-Session:                                                                                                                                                                                             
    Protocol  : TLSv1.1                                                                                                                                                                                  
    Cipher    : ECDHE-RSA-AES256-SHA                                                                                                                                                                     
    Session-ID: E7DFD26732F8077A44ABE857982FD73876F34974E165DBFE0531A0B425BD925B                                                                                                                         
    Session-ID-ctx:                                                                                                                                                                                      
    Master-Key: 5255F843A1CCC055A954BB7186CEA85D17FFD8D4A5D0DDDE9BDA4ACE0B814435E12DDEEE8DB02391959BE2819DBCE68A                                                                                         
    Key-Arg   : None                                                                                                                                                                                     
    PSK identity: None                                                                                                                                                                                   
    PSK identity hint: None                                                                                                                                                                              
    SRP username: None                                                                                                                                                                                   
    TLS session ticket lifetime hint: 7200 (seconds)
    TLS session ticket:
    0000 - 8f 1d 74 25 77 a7 77 53-14 20 12 c0 2c b4 d7 b4   ..t%w.wS. ..,...
    0010 - 57 b6 61 e0 be c6 55 dc-be 47 61 17 57 7a 21 64   W.a...U..Ga.Wz!d
    0020 - fe 8e e4 87 00 d8 cf e9-ec 9d 51 9b 46 b1 7d f1   ..........Q.F.}.
    0030 - 3d f7 4c f2 ed be da 4e-45 3a 34 2c 97 25 89 b4   =.L....NE:4,.%..
    0040 - 36 99 e7 11 58 9d 9d 7a-9b c4 88 48 bf 6e 52 df   6...X..z...H.nR.
    0050 - e2 08 3a d1 2a 43 eb 37-a6 06 9e dc 4d 69 e6 ca   ..:.*C.7....Mi..
    0060 - 45 43 3e ca bb 39 12 cd-86 90 fa 2c d4 99 08 fd   EC>..9.....,....
    0070 - c2 ef e9 1c 59 ff 1c bc-8e de a8 3c 2b a2 15 af   ....Y......<+...
    0080 - a0 57 c7 63 2a ad 3c 82-05 c7 8b 65 97 8b 1b 75   .W.c*.<....e...u
    0090 - 14 4f 1f b5 f0 24 b8 14-40 a7 7d 15 43 0c 01 d3   .O...$..@.}.C...

    Start Time: 1435870124
    Timeout   : 300 (sec)
    Verify return code: 18 (self signed certificate)
---
250 DSN
ehlo aa
250-ubuntu-server-MAIN.home
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
mail from:<toto@minegeeks.ch>
250 2.1.0 Ok
rcpt to:<spam@spam.com>
454 4.7.1 <spam@spam.com>: Relay access denied
rcpt to:<tata@minegeeks.ch>
550 5.1.1 <tata@minegeeks.ch>: Recipient address rejected: User unknown in local recipient table
rcpt to:<root@minegeeks.ch>
250 2.1.5 Ok
data
354 End data with <CR><LF>.<CR><LF>
test ok
.
250 2.0.0 Ok: queued as 63F15FA0AE9

ton certif est vraiment bidon CN=ubuntu-server-MAIN.home
et pas d'authentification en option.

je ne vois pas d'erreur de session smtp. Tu devrais pouvoir recevoir du courrier, sur au moins root@minegeeks.ch

Hors ligne

#5 Le 02/07/2015, à 22:21

ERGY13

Re : [résolu] postfix / impossible de recevoir les mails.

@Tewis

je n'ai rien reçu. même pas dans les nobody.

Hors ligne

#6 Le 02/07/2015, à 22:48

LeoMajor

Re : [résolu] postfix / impossible de recevoir les mails.

sudo mailq

Hors ligne

#7 Le 02/07/2015, à 22:50

ERGY13

Re : [résolu] postfix / impossible de recevoir les mails.

rien :

Mail queue is empty

si ça peut aider :

 service postfix status
● postfix.service - LSB: Postfix Mail Transport Agent
   Loaded: loaded (/etc/init.d/postfix)
  Drop-In: /run/systemd/generator/postfix.service.d
           └─50-postfix-$mail-transport-agent.conf
   Active: active (running) since lun 2015-06-29 17:09:48 CEST; 3 days ago
     Docs: man:systemd-sysv-generator(8)
   CGroup: /system.slice/postfix.service
           ├─ 2120 /usr/lib/postfix/master
           ├─ 2125 qmgr -l -t unix -u
           ├─ 2674 tlsmgr -l -t unix -u -c
           ├─27672 pickup -l -t unix -u -c
           └─29919 showq -t unix -u -c

jui 02 22:50:52 ubuntu-server-MAIN postfix/smtpd[21100]: disconnect from 118....
jui 02 23:00:28 ubuntu-server-MAIN postfix/smtpd[23488]: connect from 118.60....
jui 02 23:01:06 ubuntu-server-MAIN postfix/smtpd[23488]: NOQUEUE: reject: RCP...
jui 02 23:01:34 ubuntu-server-MAIN postfix/smtpd[23488]: 97985FA0C4F: client=...
jui 02 23:01:42 ubuntu-server-MAIN postfix/cleanup[23686]: 97985FA0C4F: messa...
jui 02 23:01:42 ubuntu-server-MAIN postfix/qmgr[2125]: 97985FA0C4F: from=<tot...
jui 02 23:01:43 ubuntu-server-MAIN postfix/local[23751]: 97985FA0C4F: to=<roo...
jui 02 23:01:43 ubuntu-server-MAIN postfix/qmgr[2125]: 97985FA0C4F: removed
jui 02 23:06:43 ubuntu-server-MAIN postfix/smtpd[23488]: timeout after END-OF...
jui 02 23:06:43 ubuntu-server-MAIN postfix/smtpd[23488]: disconnect from 118....
Hint: Some lines were ellipsized, use -l to show in full.

Dernière modification par ERGY13 (Le 02/07/2015, à 22:52)

Hors ligne

#8 Le 02/07/2015, à 23:22

LeoMajor

Re : [résolu] postfix / impossible de recevoir les mails.

si le message était deferred, tu l'aurais dans la file d'attente. Donc, je pense qu'il est livré.

Hors ligne

#9 Le 02/07/2015, à 23:30

ERGY13

Re : [résolu] postfix / impossible de recevoir les mails.

pourtant la boite aux lettres root et la nobody aussi.

si tu veux le fichier de configuration /etc/postfix/main.cf

# See /usr/share/postfix/main.cf.dist for a commented, more complete version


# Debian specific:  Specifying a file name will cause the first
# line of that file to be used as the name.  The Debian default
# is /etc/mailname.
#myorigin = /etc/mailname

smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
biff = no

# appending .domain is the MUA's job.
append_dot_mydomain = no

# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h

readme_directory = no

# TLS parameters
smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
smtpd_use_tls=yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache

# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
# information on enabling SSL in the smtp client.

smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
myhostname = ubuntu-server-MAIN.home
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = minegeeks.ch, ubuntu-server-MAIN.home, localhost.home, localhost, btsmail.ch, JRCitations.ch, lunx.ch, remy.computer
relayhost =
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 83.77.49.64 192.168.1.105
mailbox_command =
mailbox_size_limit = 0
recipient_delimiter =
inet_interfaces = all
inet_protocols = all
home_mailbox = Maildir/

je ne comprend toujours pas d’où peut venir l'erreur.

Dernière modification par ERGY13 (Le 02/07/2015, à 23:30)

Hors ligne

#10 Le 04/07/2015, à 11:12

LeoMajor

Re : [résolu] postfix / impossible de recevoir les mails.

depuis que j'ai ajouté quelques entrées SRV au DNS, plus moyen de recevoir de mails.

Cela laisse supposer que Postfix fonctionnait déjà, et que la livraison fonctionnait.  Je ne sais pas ce que tu as modifié.

/etc/hosts
127.0.0.1 mail.minegeeks.ch minegeeks.ch

main.cf
myhostname mail.minegeeks.ch
mydomain minegeeks.ch
....

A/ livraison directe : postfix est l''agent de livraison avec local (pas de dovecot, pas de courrier, ...)
mailbox_command = à supprimer

L'ordre de priorité des fonctionnalités de livraison locale est : alias, fichiers .forward, mailbox_transport_maps, mailbox_transport, mailbox_command_maps, mailbox_command, home_mailbox, mail_spool_directory, fallback_transport_maps, fallback_transport et luser_relay.

renseigner /etc/aliases
https://grox.net/doc/postfix/html/faq.h … l_delivery

ssh assure les connexions distantes avec mutt -f /home/titi/Maildir
(permit_mynetworks à l'envoi, permit_auth_destination à la réception, pas d'authentification)

B/ livraison avec courier/dovecot
tu as un dovecot sur le 110 et courrier sur le 143... il faudrait choisir !?
...

Hors ligne

#11 Le 14/07/2015, à 14:04

ERGY13

Re : [résolu] postfix / impossible de recevoir les mails.

Bonjour,

après quelques temps de réflexion, j'ai finalement réussi.
j'ai réinstallé 2 fois. la deuxième était la bonne, en particulier grace à une partie de ce tutoriel : https://www.isalo.org/wiki.debian-fr/Co … ec_Postfix

j'ai aussi refais le DNS à ma sauce donc en l'allegeant pas mal.

Merci de votre aide

Hors ligne