Bonjour,
Depuis le 22 avril 2025, la fonction PHP mail() que j'utilise avec WAMP depuis une dizaine d'années sans problème me retourne une erreur "421 Service not available" dans le fichier debug.log. Mes tests de mailing n'ont évidemment plus été réalisables via WAMP.
Pendant toute ces années, sendmail.ini était configuré avec le serveur SMTP ssl0.ovh.net sur le port 587 ainsi qu'avec le même compte email d'ovh et son mot de passe que j'actualise régulièrement.
J'ai temporairement trouvé une simple parade en utilisant le serveur de free smtp.free.fr et une adresse email free.
Cependant, j'aimerai comprendre ce qui a bien pu se passer entre le 14 avril 2025 (date du dernier envoi de mail réussi) et le 22 avril 2025.
Merci d'avance pour votre aide !
Matthieu
Mon environnement de travail :
Windows NT New Tablet PC x64 build 9200
4x Intel(R) Core(TM) i5-3450 CPU @ 3.10GHz
Chrome : Version 136.0.7103.93 (Build officiel) (64 bits)
Wampserver : 3.2.5 - 64bit
Version Apache : 2.4.51
Version de PHP : 7.4.25
OFFRE OVH : MXPLAN 10 hosting (l'adresse email utilisé n'est pas bloquée pour spam)
Fichier sendmail.ini :
; configuration for fake sendmail
; if this file doesn't exist, sendmail.exe will look for the settings in
; the registry, under HKLM\Software\Sendmail
[sendmail]
; you must change mail.mydomain.com to your smtp server,
; or to IIS's "pickup" directory. (generally C:\Inetpub\mailroot\Pickup)
; emails delivered via IIS's pickup directory cause sendmail to
; run quicker, but you won't get error messages back to the calling
; application.
;smtp_server=ssl0.ovh.net
smtp_server=smtp.free.fr
; smtp port (normally 25)
smtp_port=587
; SMTPS (SSL) support
; auto = use SSL for port 465, otherwise try to use TLS
; ssl = alway use SSL
; tls = always use TLS
; none = never try to use SSL
smtp_ssl=tls
; the default domain for this server will be read from the registry
; this will be appended to email addresses when one isn't provided
; if you want to override the value in the registry, uncomment and modify
;default_domain=mydomain.com
; log smtp errors to error.log (defaults to same directory as sendmail.exe)
; uncomment to enable logging
error_logfile=error.log
; create debug log as debug.log (defaults to same directory as sendmail.exe)
; uncomment to enable debugging
debug_logfile=debug.log
; if your smtp server requires authentication, modify the following two lines
;auth_username=mon-mx-plan-ovh@mondomaine-ovh.fr
;auth_password=********************
auth_username=moi@free.fr
auth_password=********************
; if your smtp server uses pop3 before smtp authentication, modify the
; following three lines. do not enable unless it is required.
pop3_server=
pop3_username=
pop3_password=
; force the sender to always be the following email address
; this will only affect the "MAIL FROM" command, it won't modify
; the "From: " header of the message content
force_sender=moi@mondomaine.fr
; force the sender to always be the following email address
; this will only affect the "RCTP TO" command, it won't modify
; the "To: " header of the message content
;force_recipient=moi@mondomaine.fr
; sendmail will use your hostname and your default_domain in the ehlo/helo
; smtp greeting. you can manually set the ehlo/helo name if required
hostname=
Extrait du fichier php.ini :
[mail function]
; For Win32 only.
; http://php.net/smtp
SMTP = localhost
; http://php.net/smtp-port
smtp_port = 25
; For Win32 only.
; http://php.net/sendmail-from
sendmail_from = "mon-mx-plan-ovh@mondomaine-ovh.fr"
;sendmail_from = "moi@free.fr"
; For Unix only. You may supply arguments as well (default: "sendmail -t -i").
; http://php.net/sendmail-path
;sendmail_path =
; Force the addition of the specified parameters to be passed as extra parameters
; to the sendmail binary. These parameters will always replace the value of
; the 5th parameter to mail().
;mail.force_extra_parameters =
; Add X-PHP-Originating-Script: that will include uid of the script followed by the filename
mail.add_x_header = On
;sendmail_from="admin@wampserver.invalid"
; The path to a log file that will log all mail() calls. Log entries include
; the full path of the script, line number, To address and headers.
;mail.log =
; Log mail to syslog (Event Log on Windows).
;mail.log = syslog
Extrait du fichier debug.log du 22 AVRIL 2025 :
25/04/22 11:10:07 ** --- MESSAGE END ---
25/04/22 11:10:07 ** Connecting to ssl0.ovh.net:587
25/04/22 11:10:08 ** Connected.
25/04/22 11:10:08 << 220 GARM-106R006 Tuesday, April 22, 2025<EOL>
25/04/22 11:10:08 >> EHLO PC-MATTHIEU<EOL>
25/04/22 11:10:08 << 250-OVH SMTP PROXY Hello<EOL>250-SIZE 104857600<EOL>
25/04/22 11:10:08 << 250-ENHANCEDSTATUSCODES<EOL>250-AUTH LOGIN PLAIN<EOL>250-AUTH=LOGIN PLAIN<EOL>250-STARTTLS<EOL>250 8BITMIME<EOL>
25/04/22 11:10:08 ** Authenticating as moi@mondomaine.fr
25/04/22 11:10:08 >> STARTTLS<EOL>
25/04/22 11:10:08 << 220 2.0.0 Ready to start TLS<EOL>
25/04/22 11:10:08 >> QUIT<EOL>
25/04/22 11:10:08 << 421 Service not available, closing transmission channel<EOL>221 PC-MATTHIEU Service closing transmission channel<EOL>
25/04/22 11:10:08 ** Disconnected.
25/04/22 11:10:08 ** Disconnecting from ssl0.ovh.net:587
25/04/22 11:10:08 ** Disconnected.
25/04/22 11:10:08 ** Disconnected.
25/04/22 11:10:08 ** Connection Closed Gracefully.
Fichier crash.txt :
date/time : 2025-04-22, 11:10:09, 854ms
computer name : PC-MATTHIEU
user name : Système <admin>
registered owner : MATTHIEU
operating system : Windows NT New Tablet PC x64 build 9200
system language : French
system up time : 1 day 1 hour
program up time : 1 second
processors : 4x Intel(R) Core(TM) i5-3450 CPU @ 3.10GHz
physical memory : 4870/12237 MB (free/total)
free disk space : (C:) 170,90 GB (E:) 1822,74 GB
display mode : 1024x768, 32 bit
process id : $f0
allocated memory : 9,21 MB
command line : "E:\wamp64\sendmail\sendmail.exe" -t
executable : sendmail.exe
exec. date/time : 2011-06-18 01:10
compiled with : Delphi 2006/07
madExcept version : 3.0l
callstack crc : $297aecaf, $1e64072d, $1e64072d
exception number : 1
exception class : EIdConnClosedGracefully
exception message : Connection Closed Gracefully.
main thread ($1a08):
0043e503 +002f sendmail.exe IdIOHandler 1929 +23 TIdIOHandler.RaiseConnClosedGracefully
00440d55 +0051 sendmail.exe IdIOHandlerStack 396 +17 TIdIOHandlerStack.CheckForDisconnect
0043eee7 +002b sendmail.exe IdIOHandler 2384 +2 TIdIOHandler.WriteDirect
0043ebc6 +0032 sendmail.exe IdIOHandler 2264 +4 TIdIOHandler.Write
0043cd64 +0070 sendmail.exe IdIOHandler 962 +6 TIdIOHandler.Write
0043df7c +0040 sendmail.exe IdIOHandler 1646 +2 TIdIOHandler.WriteLn
0043ff76 +004a sendmail.exe IdTCPConnection 584 +3 TIdTCPConnection.SendCmd
0044020e +0056 sendmail.exe IdTCPConnection 723 +4 TIdTCPConnection.SendCmd
0045ac17 +0017 sendmail.exe IdSMTP 394 +2 TIdSMTP.DisconnectNotifyPeer
0043fe12 +002a sendmail.exe IdTCPConnection 519 +5 TIdTCPConnection.Disconnect
0045aea0 +0018 sendmail.exe IdSMTP 509 +2 TIdSMTP.Disconnect
00440598 +0004 sendmail.exe IdTCPConnection 857 +0 TIdTCPConnection.Disconnect
00459ff5 +00a9 sendmail.exe IdSMTPBase 407 +24 TIdSMTPBase.StartTLS
0045a8bd +0039 sendmail.exe IdSMTP 312 +11 TIdSMTP.Authenticate
004b5f81 +10cd sendmail.exe sendmail 822 +340 initialization
76b4fcc7 +0017 KERNEL32.DLL BaseThreadInitThunk
stack dump:
0019eaf0 08 e5 43 00 de fa ed 0e - 01 00 00 00 07 00 00 00 ..C.............
0019eb00 04 eb 19 00 08 e5 43 00 - 90 4f 31 01 01 cb 31 01 ......C..O1...1.
0019eb10 d0 b7 25 01 94 34 46 00 - 30 eb 19 00 20 eb 19 00 ..%..4F.0.......
0019eb20 48 eb 19 00 c8 4b 40 00 - 30 eb 19 00 00 00 00 00 H....K@.0.......
0019eb30 80 eb 19 00 5a 0d 44 00 - 01 00 00 00 d0 b7 25 01 ....Z.D.......%.
0019eb40 98 cb 31 01 ea ee 43 00 - a4 eb 19 00 c8 4b 40 00 ..1...C......K@.
0019eb50 80 eb 19 00 00 b8 32 01 - 98 cb 31 01 d0 b7 25 01 ......2...1...%.
0019eb60 88 eb 19 00 01 00 00 00 - e1 38 42 00 a4 eb 19 00 .........8B.....
0019eb70 24 39 42 00 2c 39 42 00 - 06 00 00 00 00 00 00 00 $9B.,9B.........
0019eb80 98 eb 19 00 cb eb 43 00 - 00 00 00 00 20 b8 32 01 ......C.......2.
0019eb90 94 34 46 00 ff ff ff ff - c4 eb 19 00 6a cd 43 00 .4F.........j.C.
0019eba0 00 00 00 00 d0 eb 19 00 - c8 4b 40 00 c4 eb 19 00 .........K@.....
0019ebb0 28 ac 45 00 d0 b7 25 01 - 94 34 46 00 00 00 00 00 (.E...%..4F.....
0019ebc0 c8 cb 31 01 f0 eb 19 00 - 82 df 43 00 00 00 00 00 ..1.......C.....
0019ebd0 fc eb 19 00 c8 4b 40 00 - f0 eb 19 00 94 34 46 00 .....K@......4F.
0019ebe0 00 00 00 00 70 b6 25 01 - 00 00 00 00 00 00 00 00 ....p.%.........
0019ebf0 1c ec 19 00 7c ff 43 00 - 00 00 00 00 2c ec 19 00 ....|.C.....,...
0019ec00 c8 4b 40 00 1c ec 19 00 - 00 00 00 00 dd 00 30 01 .K@...........0.
0019ec10 34 a5 45 00 44 ec 19 00 - 00 00 00 00 4c ec 19 00 4.E.D.......L...
0019ec20 14 02 44 00 00 00 00 00 - 00 00 00 00 60 ec 19 00 ..D.........`...
disassembling:
[...]
0043e4ef call -$36f9c ($407558) ; System.LoadResString
0043e4f4 mov ecx, [ebp-4]
0043e4f7 mov dl, 1
0043e4f9 mov eax, [$41f6b4]
0043e4fe call -$1eb07 ($41f9fc) ; IdException.EIdException.Create
0043e503 > call -$3981c ($404cec) ; System.@RaiseExcept
0043e508 1930 xor eax, eax
0043e50a pop edx
0043e50b pop ecx
0043e50c pop ecx
0043e50d mov fs:[eax], edx
[...]
Bonjour,
command line : "E:\wamp64\sendmail\sendmail.exe" -t
executable : sendmail.exe
exec. date/time : 2011-06-18 01:10
compiled with : Delphi 2006/07
Windows NT New Tablet PC x64 build 9200 (qui date de 2014)
Il faut vérifier si votre environnement supporte TLS1.2 ou TLS1.3
Il faut considérer que TLS1.1, TLS1.0 et SSLv3 sont tout à fait obsolètes, et OVH a décidé de ne plus les supporter.
Pour info TLS1.2 a été publié en 2008.
Il est regrettable qu'OVH n'ait rien annoncé à ce sujet. Vous êtes certainement dans le cas.
Bonjour,
command line : "E:\wamp64\sendmail\sendmail.exe" -t
executable : sendmail.exe
exec. date/time : 2011-06-18 01:10
compiled with : Delphi 2006/07
Windows NT New Tablet PC x64 build 9200 (qui date de 2014)
Il faut vérifier si votre environnement supporte TLS1.2 ou TLS1.3
Il faut considérer que TLS1.1, TLS1.0 et SSLv3 sont tout à fait obsolètes, et OVH a décidé de ne plus les supporter.
Pour info TLS1.2 a été publié en 2008.
Il est regrettable qu'OVH n'ait rien annoncé à ce sujet. Vous êtes certainement dans le cas.
Bonjour,
Pour information, OVH l'avait bien annoncé : https://web-cloud.status-ovhcloud.com/incidents/x4v6l17cny5d
Autre info supplémentaire : Orange France à fait de même avec leur messagerie et les plus gros aussi l'ont soit déjà fait soit le font en ce moment même.
Note : il existe 2 choses à ce sujet, une norme RFC (RFC 8996), et en France une recommandation de l'ANSI (Cf : https://cyber.gouv.fr/sites/default/files/2017/07/anssi-guide-recommandations_de_securite_relatives_a_tls-v1.2.pdf)
Cordialement, janus57
Bonjour@janus57 @janus57 (il y a deux janus57 dans ce forum !)
100% d'accord qu'il faut évacuer les verrues obsolètes !
Par contre une simple ligne dans travaux.ovh, je n'appelle pas ça une communication orientée client.