OVH Community, votre nouvel espace communautaire.

Configuration SMTP - phpmailer pour être valide sur Hotmail


Freemaster
30/08/2012, 19h11
soit tu modifies ton reverse depuis le manager d'ovh... soit tu modifies ton MX dans ton dns

c'est pas compliqué

Knowledge
30/08/2012, 18h51
Merci pour vos explications, je vous tiens au courant si j'avance (ou pas) ^^

Freemaster
30/08/2012, 18h21
Citation Envoyé par Knowledge
Aussi j'ai remarqué quelques chose dans mes mails qui ne passetn pas j'ai pas toutes les lignes X-ovh-...

Est-ce que cela peut aiguiller certaines solutions ?
mais tout à fait, cela confirmes que hotmail s'en fout complètement de ta balise spf...

mo11.mail-out.ovh.net <=> 178.33.111.214 <=> mo11.mail-out.ovh.net
hotmail apprécies

alors que toi :
mail.mmolazy.com <=> 178.33.235.147 <=> ns236138.ovh.net

Knowledge
30/08/2012, 15h34
Oki je vais demander à mon associé de modifier le spf

Faudrait que je matte la syntaxe un peu quand même ça a l'air intéressant.

fritz2cat
30/08/2012, 15h03
Tu disais: "v=spf1 a mx ip4:178.33.235.147 mx:mail.mmolazy.com mx:shop.mmolazy.com -all"
(je l'ai encore à l'écran)

Si tu envoies tes mails via ns0.ovh.net ils vont sortir par un tuyau du mutualisé et non depuis ton dédié.
Dans ton exemple plus haut je reprends la ligne suivante:
Received: from mo11.mail-out.ovh.net ([178.33.111.214]) by COL0-MC4-F16.Col0.hotmail.com with Microsoft SMTPSVC(6.0.3790.4900);
Mon, 27 Aug 2012 09:58:38 -0700
Dans ton SPF, tu donnes instruction que 178.33.111.214 n'est pas autorisé à envoyer des mails de ton domaine, puisque cette IP n'est pas listée et que tu termines par -all .

Hotmail a donc 1000x raison de le taper dans le spam.

Frédéric

Knowledge
30/08/2012, 14h40
Mon SPF est comme ça :
mmolazy.com. TXT v=spf1 +a +mx -all

Quand tu me dis de le violer je dois comprendre quoi ?
Je suis vraiment à la ramasse à ce niveau là je suis désolé.

fritz2cat
30/08/2012, 14h34
Si tu as des lignes X-OVH alors que ton dédié envoie à Hotmail, j'oserais parier que tu as tout envoyé à travers le serveur ns0.ovh.net.

Dans ce cas ça viole ton SPF. (qui contient un "-all")

Et en plus, fais gaffe, ce service limite à maximum 100 messages par heure et 500 par jour, si mes souvenirs sont corrects.

Frédéric

Knowledge
30/08/2012, 14h19
Aussi j'ai remarqué quelques chose dans mes mails qui ne passetn pas j'ai pas toutes les lignes X-ovh-...

Est-ce que cela peut aiguiller certaines solutions ?

Freemaster
30/08/2012, 14h19
Citation Envoyé par Knowledge
Voilà je viens de modifier cela et je me heurte toujours au refus de hotmail. Merci de votre aide J'apprécie ^^
le problème ne se situe pas ici, tu mettrais l'ip y a pas de souci...
mais ton MX est mail.mmolazy.com, alors que ton serveur lui est configuré avec ns236138.ovh.net

Knowledge
30/08/2012, 14h18
Je vais voir ce que je peux faire, je vois pas exactement comment changer tout ça, notamment le nom de ma machine même changer le "HELO mmolazy.com" je vois pas trop comment faire.

Ce qui est super bizarre c'est que les mails de mon forum vbulletin ne sont pas considéré comme des spams et ils sont également envoyé via phpmailer, je pense juste que la configuration de php mailer via la class Mail n'est pas bonne dans mon script php...

fritz2cat
30/08/2012, 13h37
Alors il faudra veiller à mettre en place toutes les bonnes pratiques pour améliorer "la deliverabilité" de tes mails sortants.

1) donner à ta machine un nom qui soit dans ton domaine (dans ton cas mail.mmolazy.com -> 178.33.235.147 c'est OK, mais 178.33.235.147 -> ns236138.ovh.net c'est médiocre)

2) veiller à ce que ton serveur SMTP s'identifie avec mail.mmolazy.com lors du HELO. D'après ton exemple j'ai vu "HELO mmolazy.com" ce qui est à moitié pas bien.

3) Ton SPF contient des entrées inutiles et qui génèrent des query DNS lors de la réception. Retire "mx:mail.mmolazy.com mx:shop.mmolazy.com" sauf si tu sais exactement pourquoi tu les as mis. Syntaxe : http://www.openspf.org/SPF_Record_Syntax

Quand tu auras fait tout cela, tu n'es pas à l'abri d'un classement comme spam quand même chez Hotmail. Ce sont eux qui font la police chez eux, et on ne connaît pas tout leur mode de fonctionnement.

Frédéric

Knowledge
30/08/2012, 12h31
Il n'y a pas de message d'erreur, juste que le mail va dans les courriers indésirables. J'ai copié collé les sources des mails c'est les seules infos qui sont à ma disposition je crois.

Knowledge
30/08/2012, 12h30
Code:


PHPMailer - SMTP advanced test with authentication



IsSMTP(); // telling the class to use SMTP

try {
  $mail->Host       = "ns236138.ovh.net"; // SMTP server
  $mail->SMTPDebug  = 2;                     // enables SMTP debug information (for testing)
  $mail->SMTPAuth   = true;                  // enable SMTP authentication
  $mail->Port       = 25;                    // set the SMTP port for the GMAIL server
  $mail->Username   = "noreply@mmolazy.com"; // SMTP account username
  $mail->Password   = "xxxxxx";        // SMTP account password
  $mail->IsHTML(true);
  $mail->AddCustomHeader('Return-Path: noreply@mmolazy.com');
  $mail->AddReplyTo('noreply@mmolazy.com', 'MMOLazy');
  $mail->AddAddress('pwlwowrox@hotmail.fr', 'Knowledge');
  $mail->From = "noreply@mmolazy.com";
  $mail->FromName = "MMOLazy";
  $mail->Subject = 'MMOLazy - Newsletter';
  $mail->SetLanguage('en');
  $mail->AltBody = 'To view the message, please use an HTML compatible email viewer!'; // optional - MsgHTML will create an alternate automatically
  $mail->MsgHTML(file_get_contents('contents.html'));
  $mail->Priority = "1";
  $mail->Send();
  echo "Message Sent OK

\n"; } catch (phpmailerException $e) { echo $e->errorMessage(); //Pretty error messages from PHPMailer } catch (Exception $e) { echo $e->getMessage(); //Boring error messages from anything else! } ?>
Voilà je viens de modifier cela et je me heurte toujours au refus de hotmail. Merci de votre aide J'apprécie ^^

Freemaster
29/08/2012, 18h05
$mail->Host = "mail.mmolazy.com"; // sets the SMTP server

from ns236138.ovh.net ([178.33.235.147]) by COL0-MC4-F28.Col0.hotmail.com with Microsoft SMTPSVC(6.0.3790.4900)

il y a comme une discordance dans le hostname du serveur mail...

fritz2cat
29/08/2012, 07h56
Quel est le message d'erreur renvoyé par hotmail ?

Knowledge
28/08/2012, 20h50
Bonjour,

Je désirerais effectuer des envois de mails, en utilisant la librairie phpmailer.
Grâce aux examples distribués avec cette dernière j'ai rapidement réussi à maîtriser cet outil.

Cependant mes mails se heurter à un fournisseur de mail en particulier : hotmail...

Voici mon code :

Code:


PHPMailer - SMTP advanced test with authentication



IsSMTP(); // telling the class to use SMTP

try {
  $mail->Host       = "mail.mmolazy.com"; // SMTP server
  $mail->SMTPDebug  = 2;                     // enables SMTP debug information (for testing)
  $mail->SMTPAuth   = true;                  // enable SMTP authentication
  $mail->Host       = "mail.mmolazy.com"; // sets the SMTP server
  $mail->Port       = 25;                    // set the SMTP port for the GMAIL server
  $mail->Username   = "xxxxxxxx@mmolazy.com"; // SMTP account username
  $mail->Password   = "xxxxxxxxx";        // SMTP account password
  $mail->IsHTML(true);
  $mail->AddCustomHeader('Return-Path: noreply@mmolazy.com');
  $mail->AddReplyTo('noreply@mmolazy.com', 'MMOLazy');
  $mail->AddAddress('pwlwowrox@hotmail.fr', 'Hugo Trial');
  $mail->From = "noreply@mmolazy.com";
  $mail->FromName = "MMOLazy";
  $mail->Subject = 'MMOLazy - Newsletter';
  $mail->SetLanguage('en');
  $mail->AltBody = 'To view the message, please use an HTML compatible email viewer!'; // optional - MsgHTML will create an alternate automatically
  $mail->MsgHTML(file_get_contents('contents.html'));
  $mail->Priority = "1";
  $mail->Send();
  echo "Message Sent OK

\n"; } catch (phpmailerException $e) { echo $e->errorMessage(); //Pretty error messages from PHPMailer } catch (Exception $e) { echo $e->getMessage(); //Boring error messages from anything else! } ?>

En parallèle, mon forum vbulletin (créé par un de mes anciens partenaires) envoie correctement des mails sur hotmail, j'en suis venu à utiliser phpmailer grâce à ce premier outil qui exploite lui même la célèbre librairie. Sans succès visiblement puisque je ne peux pas réaliser la même "prouesse" (oui c'est d'une prouesse dont il s'agit lorsqu'on traite avec hotmail ^^).
Je tiens à préciser que je ne suis pas sur une blacklist et que le spf est activé via le DNS.

Pour vous aider voici le contenu du mail tel qu'envoyé par mon forum :

Code:
x-store-info:J++/JTCzmObr++wNraA4Pa4f5Xd6uensWQjutc4PB1DX2u5HF2bCDTyz/L6QZHp/lkwW6vQzFceQAWRODP+9takDPT4dAWRlfPMXHpSiYK9cj0p9ttpA10xwdMnlz6b7EGyZElUAo5k=
Authentication-Results: hotmail.com; sender-id=temperror (sender IP is 178.33.111.214) header.from=noreply@mmolazy.eu; dkim=none header.d=mmolazy.eu; x-hmca=none
X-SID-PRA: noreply@mmolazy.eu
X-DKIM-Result: None
X-SID-Result: TempError
X-AUTH-Result: NONE
X-Message-Status: n:n
X-Message-Delivery: Vj0xLjE7dXM9MDtsPTE7YT0xO0Q9MTtHRD0xO1NDTD0w
X-Message-Info: aKlYzGSc+LntszwVaofz52vH2JRnpZD6mw0401kE/AMxFcq6IbTAGggA0d1LfN/5KRzD+f94WEuRLq/PoWYlcUeS2SC3jvzcIItXS7V29RCyGCrk6baUNUAgiaUwoOeSR/R1i10prISu3jZNgUsu0A==
Received: from mo11.mail-out.ovh.net ([178.33.111.214]) by COL0-MC4-F16.Col0.hotmail.com with Microsoft SMTPSVC(6.0.3790.4900);
	 Mon, 27 Aug 2012 09:58:38 -0700
Received: from mail182.ha.ovh.net (b3.ovh.net [213.186.33.53])
	by mo11.mail-out.ovh.net (Postfix) with SMTP id BA7E4FF80FE
	for ; Mon, 27 Aug 2012 19:07:09 +0200 (CEST)
Received: from b0.ovh.net (HELO queueout) (213.186.33.50)
	by b0.ovh.net with SMTP; 27 Aug 2012 18:58:38 +0200
Received: from ns236138.ovh.net (HELO ns0.ovh.net) (achat@mmolazy.eu@178.33.235.147)
  by ns0.ovh.net with SMTP; 27 Aug 2012 18:58:36 +0200
Date: Mon, 27 Aug 2012 16:58:37 +0000
To: pwlwowrox@hotmail.fr
From: "WoW Bot for PVP Leveling Gathering -- MMOLAZY" 
Auto-Submitted: auto-generated
Message-ID: <20120827165836.fbb47edebc2c@www.mmolazy.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Priority: 3
X-Mailer: vBulletin Mail via PHP
X-Ovh-Mailout: 178.32.228.11 (mo11.mail-out.ovh.net)
Subject: New Private Message at WoW Bot for PVP Leveling Gathering -- MMOLAZY
X-Ovh-Tracer-Id: 12050506704830782142
X-Ovh-Remote: 178.33.235.147 (ns236138.ovh.net)
X-Ovh-Local: 213.186.33.20 (ns0.ovh.net)
X-OVH-SPAMSTATE: OK
X-OVH-SPAMSCORE: 10
X-OVH-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrfeehtddrfedtucetufdoteggodetrfcurfhrohhfihhlvgemucfqggfjnecuuegrihhlohhuthemuceftddtnecuufhprghmjfgvrgguvghrhfhivghlugcujfgvrgguvghrucfutghorhhinhhgucdluddtmdenucfhrhhomhepfdghohghuceuohhtuchfohhrucfrggfrucfnvghvvghlihhnghcuifgrthhhvghrihhnghcuqddqucfooffqnfetkggjfdcuoehnohhrvghplhihsehmmhholhgriiihrdgvuheqnecuffhomhgrihhnpehmmhholhgriiihrdgtohhmnecujfgurhepfffvhffkgggtgffroffusehtkeertdertddu
X-Spam-Check: DONE|U 0.5/N
X-VR-SPAMSTATE: OK
X-VR-SPAMSCORE: 10
X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrfeehtddrfedtucetufdoteggodetrfcurfhrohhfihhlvgemucfqggfjnecuuegrihhlohhuthemuceftddtnecuufhprghmjfgvrgguvghrhfhivghlugcujfgvrgguvghrucfutghorhhinhhgucdluddtmdenucfhrhhomhepfdghohghuceuohhtuchfohhrucfrggfrucfnvghvvghlihhnghcuifgrthhhvghrihhnghcuqddqucfooffqnfetkggjfdcuoehnohhrvghplhihsehmmhholhgriiihrdgvuheqnecuffhomhgrihhnpehmmhholhgriiihrdgtohhmnecujfgurhepfffvhffkgggtgffroffusehtkeertdertddu
Return-Path: noreply@mmolazy.eu
X-OriginalArrivalTime: 27 Aug 2012 16:58:39.0006 (UTC) FILETIME=[3479F3E0:01CD8475]


DO NOT REPLY TO THIS EMAIL!
***************************

Dear Knowledge,

You have received a new private message at WoW Bot for PVP Leveling Gathering -- MMOLAZY from Just1k, entitled "Re: Problem with subscription".

To read the original version, respond to, or delete this message, you must log in here:
http://www.mmolazy.com/forum/private.php

This is the message that was sent:
***************

---Quote (Originally by Knowledge)---
Activated :)

Hope you enjoy our service :)
---End Quote---
THX a lot for your work
***************

Again, please do not reply to this email. You must go to the following page to reply to this private message:
http://www.mmolazy.com/forum/private.php

All the best,
WoW Bot for PVP Leveling Gathering -- MMOLAZY

Et voici le contenu du mail ne traversant pas le filtre hotmail :

Code:
x-store-info:4r51+eLowCe79NzwdU2kRyU+pBy2R9QCDI9u8Kc1JenbBviQU0AU6Kli9AdDxcYz1r1gzhbuA4XXOYcb8e/uO54GS0yjt6ni2jL37sVx+JYAKiXdwqkE2xc5HahC2dMAmCV7jx1YMqw=
Authentication-Results: hotmail.com; sender-id=pass (sender IP is 178.33.235.147) header.from=noreply@mmolazy.com; dkim=none header.d=mmolazy.com; x-hmca=pass
X-SID-PRA: noreply@mmolazy.com
X-DKIM-Result: None
X-SID-Result: Pass
X-AUTH-Result: PASS
X-Message-Status: n:n
X-Message-Delivery: Vj0xLjE7dXM9MDtsPTA7YT0wO0Q9MjtHRD0yO1NDTD02
X-Message-Info: 11chDOWqoTkAbM9mIE/dFCrSXbG8/bxXr+EJWR7TVya1olQ+dhqNq2iIymAMm3yJoNUpDTox3oMLG//XPcu2645f46wIudnfvMU9fLrqAGwId16dboz2mYT7YwAfnP4regGM9Q3NCWw=
Received: from ns236138.ovh.net ([178.33.235.147]) by COL0-MC4-F28.Col0.hotmail.com with Microsoft SMTPSVC(6.0.3790.4900);
	 Tue, 28 Aug 2012 10:55:22 -0700
Received: (qmail 9627 invoked from network); 28 Aug 2012 19:55:23 +0200
Received: from ns236138.ovh.net (HELO mmolazy.com) (178.33.235.147)
  by mmolazy.com with ESMTPA; 28 Aug 2012 19:55:22 +0200
Date: Tue, 28 Aug 2012 19:55:22 +0200
Return-Path: noreply@mmolazy.com
To: Hugo Trial 
From: MMOLazy 
Reply-to: MMOLazy 
Subject: MMOLazy - Newsletter
Message-ID: 
X-Priority: 1
X-Mailer: PHPMailer 5.1 (phpmailer.sourceforge.net)
Return-Path: noreply@mmolazy.com
MIME-Version: 1.0
Content-Type: multipart/alternative;
	boundary="b1_eb0a138f54f0e54fb7a3d14bcaace505"
X-OriginalArrivalTime: 28 Aug 2012 17:55:22.0798 (UTC) FILETIME=[4BB524E0:01CD8546]


--b1_eb0a138f54f0e54fb7a3d14bcaace505
Content-Type: text/plain; charset = "iso-8859-1"
Content-Transfer-Encoding: 8bit

To view the message, please use an HTML compatible email viewer!


--b1_eb0a138f54f0e54fb7a3d14bcaace505
Content-Type: text/html; charset = "iso-8859-1"
Content-Transfer-Encoding: 8bit



We make bots. And we do it well.


We make the best bots you'll ever use. Here's what we've got in store :

World of Warcraft


Guild Wars 2 - Soon


Tera


--b1_eb0a138f54f0e54fb7a3d14bcaace505--
Inutile de vous dire que les dns de mmolazy.com et de mmolazy.eu pointent vers le même serveur.

Voilà Help, ça fait deux jours que je m'arrache le cerveau sur certainement une futilité, alors que nous avons fais les demandes auprès d'hotmail pour être "whitelisté" il y a de ça plus d'un an, et qu'en utilisant le forum vbulletin nous n'avions jusqu'à présent rencontré aucun problème.

Avez-vous des pistes de réflexion ? Des éléments à rajouter dans le header du mail etc ???