Erreur de configuration de MailEnable pour SSL : Le serveur ne prend pas en charge les connexions sécurisées
J'envoie des e-mails depuis mon serveur virtuel Windows Server 2016 via mailhost localhost
, en utilisant MailEnable.
en utilisant ce code, tout fonctionne:
Dim mailObj As New SmtpClient
mailObj.Host = "localhost"
mailObj.Port = 25
Cependant, lorsque j'essaie d'envoyer un e-mail via SSL, j'obtiens l'erreur:
Le serveur ne prend pas en charge les connexions sécurisées.
- J'ai ouvert le port SMTP 587 dans le pare-feu Windows
- J'ai obtenu des certificats SSL pour les domaines et attribués à MailEnable: example.com ,www.example.com ,smtp.example.com ,mail.example.com ,ftp.example.com ,pop.example.com
- MailEnable configuré, également pour utiliser le certificat ci-dessus
Mon code sur le backend:
Dim mailObj As New SmtpClient
mailObj.Host = "localhost"
mailObj.EnableSsl = True
mailObj.Port = 587
mailObj.UseDefaultCredentials = false
mailObj.Credentials = New System.Net.NetworkCredential("info@example.com", "mypwd")
Lorsque je vérifie Enable TLS
dans la 1ère capture d'écran ci-dessous, j'obtiens une erreur:
Échec de l'envoi du courrier.
C'est le journal que j'obtiens avec Enable TLS
activé:
[06/23/20 22:33:31]****************** LOG FILE STARTED *******************
06/23/20 22:33:31 SMTP-IN A4C36F71EB8A4F0C8708CD88F4DF3671.MAI 1020 212.60.249.12 220 mail.example.com ESMTP MailEnable Service, Version: 7.59-7.59- ready at 06/23/20 22:33:31 0 0
06/23/20 22:33:32 SMTP-IN FFD462EEB67B44159FF086464B9D3C5E.MAI 1036 212.70.149.50 220 mail.example.com ESMTP MailEnable Service, Version: 7.59-7.59- ready at 06/23/20 22:33:32 0 0
06/23/20 22:33:33 SMTP-IN BDFF4AEDD8B94D0987166BA0DEAC1FC0.MAI 1060 185.143.72.34 220 mail.example.com ESMTP MailEnable Service, Version: 7.59-7.59- ready at 06/23/20 22:33:33 0 0
06/23/20 22:33:33 SMTP-IN A4C36F71EB8A4F0C8708CD88F4DF3671.MAI 1020 212.60.249.12 EHLO EHLO User 250-example.com [212.60.249.12], this server offers 5 extensions 143 11
06/23/20 22:33:34 SMTP-IN FFD462EEB67B44159FF086464B9D3C5E.MAI 1036 212.70.149.50 EHLO EHLO User 250-example.com [212.70.149.50], this server offers 5 extensions 143 11
06/23/20 22:33:34 SMTP-IN BDFF4AEDD8B94D0987166BA0DEAC1FC0.MAI 1060 185.143.72.34 EHLO EHLO User 250-example.com [185.143.72.34], this server offers 5 extensions 143 11
06/23/20 22:33:34 SMTP-IN A4C36F71EB8A4F0C8708CD88F4DF3671.MAI 1020 212.60.249.12 RSET RSET 250 Requested mail action okay, completed 43 6
06/23/20 22:33:35 SMTP-IN FFD462EEB67B44159FF086464B9D3C5E.MAI 1036 212.70.149.50 RSET RSET 250 Requested mail action okay, completed 43 6
06/23/20 22:33:35 SMTP-IN BDFF4AEDD8B94D0987166BA0DEAC1FC0.MAI 1060 185.143.72.34 RSET RSET 250 Requested mail action okay, completed 43 6
06/23/20 22:33:36 SMTP-IN A4C36F71EB8A4F0C8708CD88F4DF3671.MAI 1020 212.60.249.12 AUTH AUTH LOGIN 334 VXNlcm5hbWU6 18 12
06/23/20 22:33:37 SMTP-IN BDFF4AEDD8B94D0987166BA0DEAC1FC0.MAI 1060 185.143.72.34 AUTH AUTH LOGIN 334 VXNlcm5hbWU6 18 12
06/23/20 22:33:37 SMTP-IN FFD462EEB67B44159FF086464B9D3C5E.MAI 1036 212.70.149.50 AUTH AUTH LOGIN 334 VXNlcm5hbWU6 18 12
06/23/20 22:33:37 SMTP-IN D50DB0BE07584F9484734E4E911EE303.MAI 1104 185.143.75.153 220 mail.example.com ESMTP MailEnable Service, Version: 7.59-7.59- ready at 06/23/20 22:33:37 0 0
06/23/20 22:33:37 SMTP-IN A4C36F71EB8A4F0C8708CD88F4DF3671.MAI 1020 212.60.249.12 AUTH {blank} 334 UGFzc3dvcmQ6 18 30 casino@example.com
06/23/20 22:33:38 SMTP-IN D50DB0BE07584F9484734E4E911EE303.MAI 1104 185.143.75.153 EHLO EHLO User 250-example.com [185.143.75.153], this server offers 5 extensions 144 11
06/23/20 22:33:38 SMTP-IN BDFF4AEDD8B94D0987166BA0DEAC1FC0.MAI 1060 185.143.72.34 AUTH {blank} 334 UGFzc3dvcmQ6 18 30 fourier@example.com
06/23/20 22:33:38 SMTP-IN 09B37BA353F34F3EA5A98E682F9E963C.MAI 1120 212.70.149.18 220 mail.example.com ESMTP MailEnable Service, Version: 7.59-7.59- ready at 06/23/20 22:33:38 0 0
06/23/20 22:33:38 SMTP-IN FFD462EEB67B44159FF086464B9D3C5E.MAI 1036 212.70.149.50 AUTH {blank} 334 UGFzc3dvcmQ6 18 30 salud@example.com
06/23/20 22:33:39 SMTP-IN D50DB0BE07584F9484734E4E911EE303.MAI 1104 185.143.75.153 RSET RSET 250 Requested mail action okay, completed 43 6
06/23/20 22:33:39 SMTP-IN A4C36F71EB8A4F0C8708CD88F4DF3671.MAI 1020 212.60.249.12 AUTH bGV0bWVpbg== 504 Invalid Username or Password 34 14 casino@example.com
06/23/20 22:33:39 SMTP-IN BDFF4AEDD8B94D0987166BA0DEAC1FC0.MAI 1060 185.143.72.34 AUTH Rk9VUklFUg== 504 Invalid Username or Password 34 14 fourier@example.com
06/23/20 22:33:39 SMTP-IN 09B37BA353F34F3EA5A98E682F9E963C.MAI 1120 212.70.149.18 EHLO EHLO User 250-example.com [212.70.149.18], this server offers 5 extensions 143 11
06/23/20 22:33:40 SMTP-IN D50DB0BE07584F9484734E4E911EE303.MAI 1104 185.143.75.153 AUTH AUTH LOGIN 334 VXNlcm5hbWU6 18 12
06/23/20 22:33:40 SMTP-IN FFD462EEB67B44159FF086464B9D3C5E.MAI 1036 212.70.149.50 AUTH UEBzc3cwcmQ= 504 Invalid Username or Password 34 14 salud@example.com
06/23/20 22:33:40 SMTP-IN 09B37BA353F34F3EA5A98E682F9E963C.MAI 1120 212.70.149.18 RSET RSET 250 Requested mail action okay, completed 43 6
06/23/20 22:33:40 SMTP-IN 09B37BA353F34F3EA5A98E682F9E963C.MAI 1120 212.70.149.18 AUTH AUTH LOGIN 334 VXNlcm5hbWU6 18 12
06/23/20 22:33:40 SMTP-IN BDFF4AEDD8B94D0987166BA0DEAC1FC0.MAI 1060 185.143.72.34 QUIT QUIT 221 Service closing transmission channel 42 6 fourier@example.com
06/23/20 22:33:40 SMTP-IN A4C36F71EB8A4F0C8708CD88F4DF3671.MAI 1020 212.60.249.12 QUIT QUIT 221 Service closing transmission channel 42 6 casino@example.com
06/23/20 22:33:41 SMTP-IN D50DB0BE07584F9484734E4E911EE303.MAI 1104 185.143.75.153 AUTH {blank} 334 UGFzc3dvcmQ6 18 26 sa2@example.com
06/23/20 22:33:41 SMTP-IN 09B37BA353F34F3EA5A98E682F9E963C.MAI 1120 212.70.149.18 AUTH {blank} 334 UGFzc3dvcmQ6 18 30 mytime@example.com
06/23/20 22:33:41 SMTP-IN FFD462EEB67B44159FF086464B9D3C5E.MAI 1036 212.70.149.50 QUIT QUIT 221 Service closing transmission channel 42 6 salud@example.com
06/23/20 22:33:42 SMTP-IN D50DB0BE07584F9484734E4E911EE303.MAI 1104 185.143.75.153 AUTH MTExMQ== 504 Invalid Username or Password 34 10 sa2@example.com
06/23/20 22:33:42 SMTP-IN 09B37BA353F34F3EA5A98E682F9E963C.MAI 1120 212.70.149.18 AUTH bXl0aW1lMDE= 504 Invalid Username or Password 34 14 mytime@example.com
06/23/20 22:33:43 SMTP-IN D50DB0BE07584F9484734E4E911EE303.MAI 1104 185.143.75.153 QUIT QUIT 221 Service closing transmission channel 42 6 sa2@example.com
06/23/20 22:33:43 SMTP-IN 09B37BA353F34F3EA5A98E682F9E963C.MAI 1120 212.70.149.18 QUIT QUIT 221 Service closing transmission channel 42 6 mytime@example.com
06/23/20 22:33:45 SMTP-IN CA6566ED0D5C4CF4BC9EA6A1A5AC988B.MAI 1068 185.143.75.81 220 mail.example.com ESMTP MailEnable Service, Version: 7.59-7.59- ready at 06/23/20 22:33:45 0 0
06/23/20 22:33:46 SMTP-IN CA6566ED0D5C4CF4BC9EA6A1A5AC988B.MAI 1068 185.143.75.81 EHLO EHLO User 250-example.com [185.143.75.81], this server offers 5 extensions 143 11
06/23/20 22:33:47 SMTP-IN CA6566ED0D5C4CF4BC9EA6A1A5AC988B.MAI 1068 185.143.75.81 RSET RSET 250 Requested mail action okay, completed 43 6
06/23/20 22:33:48 SMTP-IN CA6566ED0D5C4CF4BC9EA6A1A5AC988B.MAI 1068 185.143.75.81 AUTH AUTH LOGIN 334 VXNlcm5hbWU6 18 12
06/23/20 22:33:49 SMTP-IN CA6566ED0D5C4CF4BC9EA6A1A5AC988B.MAI 1068 185.143.75.81 AUTH {blank} 334 UGFzc3dvcmQ6 18 38 unbansubmit@example.com
06/23/20 22:33:50 SMTP-IN CB468621E3BC48089B6A50F14530F7F9.MAI 1136 212.70.149.2 220 mail.example.com ESMTP MailEnable Service, Version: 7.59-7.59- ready at 06/23/20 22:33:50 0 0
06/23/20 22:33:50 SMTP-IN CA6566ED0D5C4CF4BC9EA6A1A5AC988B.MAI 1068 185.143.75.81 AUTH cEBzc3cwcmQ= 504 Invalid Username or Password 34 14 unbansubmit@example.com
06/23/20 22:33:51 SMTP-IN CB468621E3BC48089B6A50F14530F7F9.MAI 1136 212.70.149.2 EHLO EHLO User 250-example.com [212.70.149.2], this server offers 5 extensions 142 11
06/23/20 22:33:51 SMTP-IN CA6566ED0D5C4CF4BC9EA6A1A5AC988B.MAI 1068 185.143.75.81 QUIT QUIT 221 Service closing transmission channel 42 6 unbansubmit@example.com
06/23/20 22:33:52 SMTP-IN CB468621E3BC48089B6A50F14530F7F9.MAI 1136 212.70.149.2 RSET RSET 250 Requested mail action okay, completed 43 6
06/23/20 22:33:53 SMTP-IN CB468621E3BC48089B6A50F14530F7F9.MAI 1136 212.70.149.2 AUTH AUTH LOGIN 334 VXNlcm5hbWU6 18 12
06/23/20 22:33:54 SMTP-IN B4699D1493B74E85A8671850B09F08D3.MAI 1112 185.143.72.25 220 mail.example.com ESMTP MailEnable Service, Version: 7.59-7.59- ready at 06/23/20 22:33:54 0 0
06/23/20 22:33:54 SMTP-IN CB468621E3BC48089B6A50F14530F7F9.MAI 1136 212.70.149.2 AUTH {blank} 334 UGFzc3dvcmQ6 18 34 edamamur@example.com
06/23/20 22:33:55 SMTP-IN CB468621E3BC48089B6A50F14530F7F9.MAI 1136 212.70.149.2 AUTH ZWRhbWFtdXI= 504 Invalid Username or Password 34 14 edamamur@example.com
06/23/20 22:33:55 SMTP-IN B4699D1493B74E85A8671850B09F08D3.MAI 1112 185.143.72.25 EHLO EHLO User 250-example.com [185.143.72.25], this server offers 5 extensions 143 11
06/23/20 22:33:56 SMTP-IN CB468621E3BC48089B6A50F14530F7F9.MAI 1136 212.70.149.2 QUIT QUIT 221 Service closing transmission channel 42 6 edamamur@example.com
06/23/20 22:33:56 SMTP-IN B4699D1493B74E85A8671850B09F08D3.MAI 1112 185.143.72.25 RSET RSET 250 Requested mail action okay, completed 43 6
06/23/20 22:33:58 SMTP-IN B4699D1493B74E85A8671850B09F08D3.MAI 1112 185.143.72.25 AUTH AUTH LOGIN 334 VXNlcm5hbWU6 18 12
06/23/20 22:33:59 SMTP-IN B4699D1493B74E85A8671850B09F08D3.MAI 1112 185.143.72.25 AUTH {blank} 334 UGFzc3dvcmQ6 18 26 ns43@example.com
06/23/20 22:34:00 SMTP-IN B4699D1493B74E85A8671850B09F08D3.MAI 1112 185.143.72.25 AUTH MTIzNDU2Nzg= 504 Invalid Username or Password 34 14 ns43@example.com
06/23/20 22:34:01 SMTP-IN 9CBF0EE9385B47DE8E869EAFE6CC220D.MAI 1100 212.70.149.50 220 mail.example.com ESMTP MailEnable Service, Version: 7.59-7.59- ready at 06/23/20 22:34:01 0 0
06/23/20 22:34:01 SMTP-IN B4699D1493B74E85A8671850B09F08D3.MAI 1112 185.143.72.25 QUIT QUIT 221 Service closing transmission channel 42 6 ns43@example.com
06/23/20 22:34:02 SMTP-IN 3FE80CCEAA0942739F26259F1FB15696.MAI 1040 212.60.249.12 220 mail.example.com ESMTP MailEnable Service, Version: 7.59-7.59- ready at 06/23/20 22:34:02 0 0
06/23/20 22:34:02 SMTP-IN 9CBF0EE9385B47DE8E869EAFE6CC220D.MAI 1100 212.70.149.50 EHLO EHLO User 250-example.com [212.70.149.50], this server offers 5 extensions 143 11
06/23/20 22:34:03 SMTP-IN 3FE80CCEAA0942739F26259F1FB15696.MAI 1040 212.60.249.12 EHLO EHLO User 250-example.com [212.60.249.12], this server offers 5 extensions 143 11
06/23/20 22:34:04 SMTP-IN 9CBF0EE9385B47DE8E869EAFE6CC220D.MAI 1100 212.70.149.50 RSET RSET 250 Requested mail action okay, completed 43 6
06/23/20 22:34:05 SMTP-IN 3FE80CCEAA0942739F26259F1FB15696.MAI 1040 212.60.249.12 RSET RSET 250 Requested mail action okay, completed 43 6
06/23/20 22:34:05 SMTP-IN 9CBF0EE9385B47DE8E869EAFE6CC220D.MAI 1100 212.70.149.50 AUTH AUTH LOGIN 334 VXNlcm5hbWU6 18 12
06/23/20 22:34:06 SMTP-IN 3FE80CCEAA0942739F26259F1FB15696.MAI 1040 212.60.249.12 AUTH AUTH LOGIN 334 VXNlcm5hbWU6 18 12
06/23/20 22:34:07 SMTP-IN 9CBF0EE9385B47DE8E869EAFE6CC220D.MAI 1100 212.70.149.50 AUTH {blank} 334 UGFzc3dvcmQ6 18 22 x@example.com
06/23/20 22:34:08 SMTP-IN 3FE80CCEAA0942739F26259F1FB15696.MAI 1040 212.60.249.12 AUTH {blank} 334 UGFzc3dvcmQ6 18 30 marvin@example.com
06/23/20 22:34:08 SMTP-IN 9CBF0EE9385B47DE8E869EAFE6CC220D.MAI 1100 212.70.149.50 AUTH UEBzc3cwcmQ= 504 Invalid Username or Password 34 14 x@example.com
[06/23/20 22:34:09]****************** LOG FILE CLOSED ********************
Qu'est-ce qui me manque ?
MISE À JOUR 1
Ok, j'ai désactivé require SSL pour port entrant 587 J'ai coché Activer TLS dans l'onglet Paramètres généraux
Il me manque cependant une case à cocher Allow clients to establish secure sessions via STARTTLS
comme on peut le voir ici .
Le courrier est maintenant envoyé lorsque j'ai défini EnableSsl
sur false
.
Maintenant. Je vois cependant quand j'essaie d'envoyer un e-mail de info@example.com via smtp.example.com
Bad sequence of commands. The server response was: This mail server requires authentication when attempting to send to a non-local e-mail address. Please check your mail client settings or contact your administrator to verify that the domain or address is defined for this server.
J'ai essayé d'utiliser les mêmes informations d'identification pour info@example.com mais ça ne marche pas. Dois-je configurer différentes informations d'identification quelque part ?
MISE À JOUR 2
Mise à jour et vérification Allow clients to establish secure sessions via STARTTLS
.
Sur la dernière version MailEnable, il n'y a cependant plus de paramètre Enable TLS
sur l'onglet [Général].
Je reçois toujours l'erreur:
Mauvaise séquence de commandes. La réponse du serveur était la suivante : Ce serveur de messagerie nécessite une authentification lors d'une tentative d'envoi à une adresse e-mail non locale. Veuillez vérifier les paramètres de votre client de messagerie ou contacter votre administrateur pour vérifier que le domaine ou l'adresse est défini pour ce serveur.
J'ai essayé d'envoyer via localhost
sans anycredentials (cet e-mail fonctionne) et via smtp.example.com
avec des informations d'identification, auquel cas il échoue.
Je pense que j'ai besoin d'envoyer via smtp.example.com
parce que j'ai un certificat SSL pour ce domaine, alors que lorsque j'envoie via localhost
j'ai besoin d'un certificat SSL pour mon domaine de serveur VPS 648gfhur343.stratserver.net
, ce qui n'est pas possible (car émis via Let's Encrypt, problème différent).
JOURNAL SMTP
[06/27/20 14:17:27]****************** LOG FILE STARTED *******************
06/27/20 14:17:29 SMTP-IN A7DFBF7F65344DCD86F1FE13AC92DD20.MAI 844 212.60.249.12 220 mail.example.com ESMTP MailEnable Service, Version: 10.30-- ready at 06/27/20 14:17:29 94 0
06/27/20 14:17:30 SMTP-IN 21CF95A9113A47B581E1F0C4FDEB146A.MAI 840 85.214.200.31 220 mail.example.com ESMTP MailEnable Service, Version: 10.30-- ready at 06/27/20 14:17:30 94 0
06/27/20 14:17:30 SMTP-IN 21CF95A9113A47B581E1F0C4FDEB146A.MAI 840 85.214.200.31 EHLO EHLO h2746286 250-example.com [85.214.200.30], this server offers 5 extensions 237 15
06/27/20 14:17:30 SMTP-IN 21CF95A9113A47B581E1F0C4FDEB146A.MAI 840 85.214.200.31 MAIL MAIL FROM:<info@example.com> 250 Requested mail action okay, completed 43 34
06/27/20 14:17:30 SMTP-IN 21CF95A9113A47B581E1F0C4FDEB146A.MAI 840 85.214.200.31 RCPT RCPT TO:<myname@gmail.com> 503 This mail server requires authentication when attempting to send to a non-local e-mail address. Please check your mail client settings or contact your administrator to verify that the domain or address is defined for this server. 235 33
[06/27/20 14:17:36]****************** LOG FILE CLOSED ********************
Captures d'écran paramètres