IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Linux Discussion :

Config pour tester fonction mail() php en local


Sujet :

Linux

  1. #1
    Membre à l'essai
    Homme Profil pro
    Développeur Web
    Inscrit en
    Avril 2019
    Messages
    20
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 42
    Localisation : France, Haute Garonne (Midi Pyrénées)

    Informations professionnelles :
    Activité : Développeur Web

    Informations forums :
    Inscription : Avril 2019
    Messages : 20
    Points : 13
    Points
    13
    Par défaut Config pour tester fonction mail() php en local
    Bonjour à tous,

    Voilà mon souci : je développe une appli en local et je voudrais tester la fonction mail() de php. Jusque là, c'est assez simple...

    Sauf que...

    Je n'arrive pas a configurer mon php.ini correctement...

    J'ai fait ça :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    [mail function]
    ; For Win32 only.
    ; http://php.net/smtp
    SMTP = localhost
    ; http://php.net/smtp-port
    smtp_port = 1025
     
    ; For Win32 only.
    ; http://php.net/sendmail-from
    ;sendmail_from = me@example.com
     
    ; For Unix only.  You may supply arguments as well (default: "sendmail -t -i").
    ; http://php.net/sendmail-path
    sendmail_path = "sendmail -t -i"

    Impossible pour moi de trouver une info correct et constructive afin d'arriver à mes fins... (et j'en ai fait un paquet !)

    J'ai essayer d'utiliser un "mailcatcher" afin de pouvoir tester le bordel mais impossible a configurer... (J'ai testé avec mailDev mais je n'arrive pas a le configurer normalement étant donné que je n'utilise pas Node sur mon appli du coup, je pense que c'est mort, non?)

    Rien à faire...

    Il se trouve que mon test est une vérification d'email qui, en cliquant dessus, modifie ma BdD donc je suis carrément bloqué pour continuer... (D'ailleurs, c'est mon dernier barrage avant de passer a PayPal)

    Je précise que je veux tester en local et que je bosse avec lampp, php 7.2 et Apache2...

    Si qqn avait une idée, je suis preneur...

    Merci à vous !

  2. #2
    Expert éminent sénior Avatar de Flodelarab
    Homme Profil pro
    Inscrit en
    Septembre 2005
    Messages
    5 243
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Charente (Poitou Charente)

    Informations forums :
    Inscription : Septembre 2005
    Messages : 5 243
    Points : 13 458
    Points
    13 458
    Par défaut
    Bonjour

    Le serveur php va chercher le serveur de courrier par la commande sendmail.
    sendmail est un raccourci pour le vrai serveur de courrier. (exim4 ?)
    As-tu configurer exim4 ?
    Si ce n'est pas le cas, peut-être choisiras-tu la première configuration donnée dans ce lien (clic), pour rester totalement local ?
    Cette réponse vous apporte quelque chose ? Cliquez sur en bas à droite du message.

  3. #3
    Membre à l'essai
    Homme Profil pro
    Développeur Web
    Inscrit en
    Avril 2019
    Messages
    20
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 42
    Localisation : France, Haute Garonne (Midi Pyrénées)

    Informations professionnelles :
    Activité : Développeur Web

    Informations forums :
    Inscription : Avril 2019
    Messages : 20
    Points : 13
    Points
    13
    Par défaut
    Merci pour l'info... mais ça ne m'aide pas bcp...

    Je vais essayer d'être plus clair sur ce que j'essaie de faire....

    Je développe une appli en local (sur un virtualHost ! Je me rend dans mes dossier via http://private/... et pas http://localhost/... )

    Je veux utiliser la fonction mail() de php pour envoyer un mail afin de confirmer l'inscription...

    Pour le moment, la fonction mail() me renvoie "false" ! Donc ne fonctionne pas... (1er problème...)

    J'ai essayé d'utiliser "maildev" qui est censé "capté" les mails qui sont envoyé via "localhost" avec la config suivante :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    [mail function]
    ; For Win32 only.
    ; http://php.net/smtp
    SMTP = localhost
    ; http://php.net/smtp-port
    smtp_port = 1025
    J'arrive bien a me connecter sur mailDev via "localhost:1080" mais évidemment, ça ne récupère rien...

    Je ne veux pas configurer quoi que ce soit pour récupérer mes test sur mon adresse gmail (par exemple) car il me semble que mailDev est fait pour ça, pour tester l'envoi de mail...

    Je pense que mon problème vient de ma config de php mais bon... Je ne trouve pas d'info concrète et ça me désespère...

    Si y a des pistes...

    Merci à vous...

  4. #4
    Membre à l'essai
    Homme Profil pro
    Développeur Web
    Inscrit en
    Avril 2019
    Messages
    20
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 42
    Localisation : France, Haute Garonne (Midi Pyrénées)

    Informations professionnelles :
    Activité : Développeur Web

    Informations forums :
    Inscription : Avril 2019
    Messages : 20
    Points : 13
    Points
    13
    Par défaut
    Bon, ça avance...

    J'ai réussi a faire fonctionner la fonction mail() car ça me renvoie "true" et mon code continue (j'ai installer sendmail que je n'avais pas...)

    Par contre, je ne récupère toujours rien dans maildev...

    mon php.ini est configuré comme ça :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    [mail function]
    ; For Win32 only.
    ; http://php.net/smtp
    SMTP = localhost
    ; http://php.net/smtp-port
    smtp_port = 1025
     
    ; For Win32 only.
    ; http://php.net/sendmail-from
    ;sendmail_from = me@example.com
     
    ; For Unix only.  You may supply arguments as well (default: "sendmail -t -i").
    ; http://php.net/sendmail-path
    ;sendmail_path = "sendmail -t -i"
    C'est dingue qd même de ne trouver aucune solution clair pour ce genre de problème qui doit qd être récurrent vu qu'on utilise souvent la fonction mail()... Ou alors je suis un abruti complet, ce qui est possible aussi ... :D

  5. #5
    Expert éminent sénior Avatar de Flodelarab
    Homme Profil pro
    Inscrit en
    Septembre 2005
    Messages
    5 243
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Charente (Poitou Charente)

    Informations forums :
    Inscription : Septembre 2005
    Messages : 5 243
    Points : 13 458
    Points
    13 458
    Par défaut
    j'ai installer sendmail que je n'avais pas...
    Et oui. Je te le disais. Le code php n'est qu'une coquille vide. Il faut un serveur totalement fonctionnel. Mais on n'a pas, par défaut, un serveur de courrier.

    J'ai réussi a faire fonctionner la fonction mail() car ça me renvoie "true"
    Cela veut juste dire que le courrier est accepté pour la livraison. Cela ne veut pas dire que le courrier est livré.

    mon php.ini est configuré comme ça :
    Donc il n'a pas bougé. Tu répètes les informations que l'on a, mais tu ne complètes pas celles qui nous manquent.
    Quels sont les messages d'erreurs du serveur de courrier?
    Que disent les fichiers de traces du serveur de courrier ?


    Je me rend dans mes dossier via http://private/... et pas http://localhost/
    Sans conséquences. Le serveur DNS change tout ça en 127.0.0.1. N'est-ce pas ?
    Mais le web est un service et le courrier est un autre service.
    Cette réponse vous apporte quelque chose ? Cliquez sur en bas à droite du message.

  6. #6
    Membre à l'essai
    Homme Profil pro
    Développeur Web
    Inscrit en
    Avril 2019
    Messages
    20
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 42
    Localisation : France, Haute Garonne (Midi Pyrénées)

    Informations professionnelles :
    Activité : Développeur Web

    Informations forums :
    Inscription : Avril 2019
    Messages : 20
    Points : 13
    Points
    13
    Par défaut
    Merci de ta réponse !

    Voilà déjà plus d'info :

    mail.err :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    May  2 23:03:36 koffee-X406UAR sendmail[7662]: My unqualified host name (koffee-X406UAR) unknown; sleeping for retry
    May  2 23:04:36 koffee-X406UAR sendmail[7662]: unable to qualify my own domain name (koffee-X406UAR) -- using short name
    May  2 23:04:36 koffee-X406UAR sm-mta[7761]: My unqualified host name (koffee-X406UAR) unknown; sleeping for retry
    May  2 23:04:38 koffee-X406UAR sm-msp-queue[7768]: My unqualified host name (koffee-X406UAR) unknown; sleeping for retry
    May  2 23:05:36 koffee-X406UAR sm-mta[7761]: unable to qualify my own domain name (koffee-X406UAR) -- using short name
    May  2 23:05:38 koffee-X406UAR sm-msp-queue[7768]: unable to qualify my own domain name (koffee-X406UAR) -- using short name
    May  3 09:15:26 koffee-X406UAR sendmail[17493]: My unqualified host name (koffee-X406UAR) unknown; sleeping for retry
    May  3 09:16:26 koffee-X406UAR sendmail[17493]: unable to qualify my own domain name (koffee-X406UAR) -- using short name
    May  3 09:16:30 koffee-X406UAR sm-mta[17585]: My unqualified host name (koffee-X406UAR) unknown; sleeping for retry
    May  3 09:16:32 koffee-X406UAR sm-msp-queue[17591]: My unqualified host name (koffee-X406UAR) unknown; sleeping for retry
    May  3 09:17:30 koffee-X406UAR sm-mta[17585]: unable to qualify my own domain name (koffee-X406UAR) -- using short name
    May  3 09:17:32 koffee-X406UAR sm-msp-queue[17591]: unable to qualify my own domain name (koffee-X406UAR) -- using short name
    May  3 09:20:01 koffee-X406UAR sm-msp-queue[17737]: My unqualified host name (koffee-X406UAR) unknown; sleeping for retry
    May  3 09:21:01 koffee-X406UAR sm-msp-queue[17737]: unable to qualify my own domain name (koffee-X406UAR) -- using short name
    May  3 09:21:15 koffee-X406UAR sendmail[18029]: My unqualified host name (koffee-X406UAR) unknown; sleeping for retry
    May  3 09:22:15 koffee-X406UAR sendmail[18029]: unable to qualify my own domain name (koffee-X406UAR) -- using short name
    May  3 09:34:36 koffee-X406UAR sendmail[18600]: My unqualified host name (koffee-X406UAR) unknown; sleeping for retry
    May  3 09:35:36 koffee-X406UAR sendmail[18600]: unable to qualify my own domain name (koffee-X406UAR) -- using short name
    May  3 09:40:01 koffee-X406UAR sm-msp-queue[18746]: My unqualified host name (koffee-X406UAR) unknown; sleeping for retry
    May  3 09:41:01 koffee-X406UAR sm-msp-queue[18746]: unable to qualify my own domain name (koffee-X406UAR) -- using short name
    May  3 10:00:01 koffee-X406UAR sm-msp-queue[19169]: My unqualified host name (koffee-X406UAR) unknown; sleeping for retry
    May  3 10:01:01 koffee-X406UAR sm-msp-queue[19169]: unable to qualify my own domain name (koffee-X406UAR) -- using short name
    May  3 10:03:47 koffee-X406UAR sendmail[19283]: My unqualified host name (koffee-X406UAR) unknown; sleeping for retry
    May  3 10:04:47 koffee-X406UAR sendmail[19283]: unable to qualify my own domain name (koffee-X406UAR) -- using short name
    May  3 10:15:47 koffee-X406UAR sendmail[19561]: My unqualified host name (koffee-X406UAR) unknown; sleeping for retry
    May  3 10:15:52 koffee-X406UAR sendmail[19562]: My unqualified host name (koffee-X406UAR) unknown; sleeping for retry
    May  3 10:16:32 koffee-X406UAR sendmail[19566]: My unqualified host name (koffee-X406UAR) unknown; sleeping for retry
    May  3 10:16:47 koffee-X406UAR sendmail[19561]: unable to qualify my own domain name (koffee-X406UAR) -- using short name
    May  3 10:16:52 koffee-X406UAR sendmail[19562]: unable to qualify my own domain name (koffee-X406UAR) -- using short name
    May  3 10:17:06 koffee-X406UAR sendmail[19579]: My unqualified host name (koffee-X406UAR) unknown; sleeping for retry
    May  3 10:17:10 koffee-X406UAR sendmail[19580]: My unqualified host name (koffee-X406UAR) unknown; sleeping for retry
    May  3 10:17:32 koffee-X406UAR sendmail[19566]: unable to qualify my own domain name (koffee-X406UAR) -- using short name
    May  3 10:18:06 koffee-X406UAR sendmail[19579]: unable to qualify my own domain name (koffee-X406UAR) -- using short name
    May  3 10:18:10 koffee-X406UAR sendmail[19580]: unable to qualify my own domain name (koffee-X406UAR) -- using short name
    May  3 10:20:01 koffee-X406UAR sm-msp-queue[19635]: My unqualified host name (koffee-X406UAR) unknown; sleeping for retry
    May  3 10:21:01 koffee-X406UAR sm-msp-queue[19635]: unable to qualify my own domain name (koffee-X406UAR) -- using short name
    May  3 10:31:23 koffee-X406UAR sendmail[19943]: My unqualified host name (koffee-X406UAR) unknown; sleeping for retry
    May  3 10:32:23 koffee-X406UAR sendmail[19943]: unable to qualify my own domain name (koffee-X406UAR) -- using short name
    May  3 10:37:47 koffee-X406UAR sm-mta[1061]: My unqualified host name (koffee-X406UAR) unknown; sleeping for retry
    May  3 10:37:49 koffee-X406UAR sm-msp-queue[1166]: My unqualified host name (koffee-X406UAR) unknown; sleeping for retry
    May  3 10:38:47 koffee-X406UAR sm-mta[1061]: unable to qualify my own domain name (koffee-X406UAR) -- using short name
    May  3 10:38:49 koffee-X406UAR sm-msp-queue[1166]: unable to qualify my own domain name (koffee-X406UAR) -- using short name
    May  3 10:40:01 koffee-X406UAR sm-msp-queue[1254]: My unqualified host name (koffee-X406UAR) unknown; sleeping for retry
    May  3 10:41:01 koffee-X406UAR sm-msp-queue[1254]: unable to qualify my own domain name (koffee-X406UAR) -- using short name
    May  3 10:49:53 koffee-X406UAR sendmail[2700]: My unqualified host name (koffee-X406UAR) unknown; sleeping for retry
    May  3 10:50:53 koffee-X406UAR sendmail[2700]: unable to qualify my own domain name (koffee-X406UAR) -- using short name
    May  3 11:00:01 koffee-X406UAR sm-msp-queue[3554]: My unqualified host name (koffee-X406UAR) unknown; sleeping for retry
    May  3 11:01:01 koffee-X406UAR sm-msp-queue[3554]: unable to qualify my own domain name (koffee-X406UAR) -- using short name
    May  3 11:20:01 koffee-X406UAR sm-msp-queue[3952]: My unqualified host name (koffee-X406UAR) unknown; sleeping for retry
    May  3 11:21:01 koffee-X406UAR sm-msp-queue[3952]: unable to qualify my own domain name (koffee-X406UAR) -- using short name
    May  3 11:40:01 koffee-X406UAR sm-msp-queue[4384]: My unqualified host name (koffee-X406UAR) unknown; sleeping for retry
    May  3 11:41:01 koffee-X406UAR sm-msp-queue[4384]: unable to qualify my own domain name (koffee-X406UAR) -- using short name
    May  3 11:48:34 koffee-X406UAR sendmail[5128]: My unqualified host name (koffee-X406UAR) unknown; sleeping for retry
    May  3 11:49:34 koffee-X406UAR sendmail[5128]: unable to qualify my own domain name (koffee-X406UAR) -- using short name
    May  3 11:50:49 koffee-X406UAR sm-mta[1173]: My unqualified host name (koffee-X406UAR) unknown; sleeping for retry
    May  3 11:51:49 koffee-X406UAR sm-mta[1173]: unable to qualify my own domain name (koffee-X406UAR) -- using short name
    et mail.log :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    May  3 09:40:01 koffee-X406UAR sm-msp-queue[18746]: My unqualified host name (koffee-X406UAR) unknown; sleeping for retry
    May  3 09:41:01 koffee-X406UAR sm-msp-queue[18746]: unable to qualify my own domain name (koffee-X406UAR) -- using short name
    May  3 10:00:01 koffee-X406UAR sm-msp-queue[19169]: My unqualified host name (koffee-X406UAR) unknown; sleeping for retry
    May  3 10:01:01 koffee-X406UAR sm-msp-queue[19169]: unable to qualify my own domain name (koffee-X406UAR) -- using short name
    May  3 10:03:47 koffee-X406UAR sendmail[19283]: My unqualified host name (koffee-X406UAR) unknown; sleeping for retry
    May  3 10:04:47 koffee-X406UAR sendmail[19283]: unable to qualify my own domain name (koffee-X406UAR) -- using short name
    May  3 10:04:47 koffee-X406UAR sendmail[19283]: x4384lOH019283: from=www-data, size=407, class=0, nrcpts=0, msgid=<201905030804.x4384lOH019283@koffee-X406UAR>, relay=www-data@localhost
    May  3 10:15:47 koffee-X406UAR sendmail[19561]: My unqualified host name (koffee-X406UAR) unknown; sleeping for retry
    May  3 10:15:52 koffee-X406UAR sendmail[19562]: My unqualified host name (koffee-X406UAR) unknown; sleeping for retry
    May  3 10:16:32 koffee-X406UAR sendmail[19566]: My unqualified host name (koffee-X406UAR) unknown; sleeping for retry
    May  3 10:16:47 koffee-X406UAR sendmail[19561]: unable to qualify my own domain name (koffee-X406UAR) -- using short name
    May  3 10:16:52 koffee-X406UAR sendmail[19562]: unable to qualify my own domain name (koffee-X406UAR) -- using short name
    May  3 10:17:06 koffee-X406UAR sendmail[19579]: My unqualified host name (koffee-X406UAR) unknown; sleeping for retry
    May  3 10:17:10 koffee-X406UAR sendmail[19580]: My unqualified host name (koffee-X406UAR) unknown; sleeping for retry
    May  3 10:17:32 koffee-X406UAR sendmail[19566]: unable to qualify my own domain name (koffee-X406UAR) -- using short name
    May  3 10:18:06 koffee-X406UAR sendmail[19579]: unable to qualify my own domain name (koffee-X406UAR) -- using short name
    May  3 10:18:10 koffee-X406UAR sendmail[19580]: unable to qualify my own domain name (koffee-X406UAR) -- using short name
    May  3 10:20:01 koffee-X406UAR sm-msp-queue[19635]: My unqualified host name (koffee-X406UAR) unknown; sleeping for retry
    May  3 10:21:01 koffee-X406UAR sm-msp-queue[19635]: unable to qualify my own domain name (koffee-X406UAR) -- using short name
    May  3 10:31:23 koffee-X406UAR sendmail[19943]: My unqualified host name (koffee-X406UAR) unknown; sleeping for retry
    May  3 10:32:23 koffee-X406UAR sendmail[19943]: unable to qualify my own domain name (koffee-X406UAR) -- using short name
    May  3 10:32:23 koffee-X406UAR sendmail[19943]: x438WNMS019943: from=www-data, size=410, class=0, nrcpts=0, msgid=<201905030832.x438WNMS019943@koffee-X406UAR>, relay=www-data@localhost
    May  3 10:37:07 koffee-X406UAR sendmail[19580]: x438IAqO019580: from=koffee, size=0, class=0, nrcpts=0, msgid=<201905030818.x438IAqO019580@koffee-X406UAR>, relay=koffee@localhost
    May  3 10:37:07 koffee-X406UAR sendmail[19562]: x438GqU5019562: from=koffee, size=0, class=0, nrcpts=0, msgid=<201905030816.x438GqU5019562@koffee-X406UAR>, relay=koffee@localhost
    May  3 10:37:07 koffee-X406UAR sendmail[19561]: x438GlZt019561: from=koffee, size=0, class=0, nrcpts=0, msgid=<201905030816.x438GlZt019561@koffee-X406UAR>, relay=koffee@localhost
    May  3 10:37:07 koffee-X406UAR sendmail[19579]: x438I6bw019579: from=koffee, size=0, class=0, nrcpts=0, msgid=<201905030818.x438I6bw019579@koffee-X406UAR>, relay=koffee@localhost
    May  3 10:37:07 koffee-X406UAR sendmail[19566]: x438HW4N019566: from=koffee, size=0, class=0, nrcpts=0, msgid=<201905030817.x438HW4N019566@koffee-X406UAR>, relay=koffee@localhost
    May  3 10:37:47 koffee-X406UAR sm-mta[1061]: My unqualified host name (koffee-X406UAR) unknown; sleeping for retry
    May  3 10:37:49 koffee-X406UAR sm-msp-queue[1166]: My unqualified host name (koffee-X406UAR) unknown; sleeping for retry
    May  3 10:38:47 koffee-X406UAR sm-mta[1061]: unable to qualify my own domain name (koffee-X406UAR) -- using short name
    May  3 10:38:47 koffee-X406UAR sm-mta[1173]: starting daemon (8.15.2): SMTP+queueing@00:10:00
    May  3 10:38:49 koffee-X406UAR sm-msp-queue[1166]: unable to qualify my own domain name (koffee-X406UAR) -- using short name
    May  3 10:40:01 koffee-X406UAR sm-msp-queue[1254]: My unqualified host name (koffee-X406UAR) unknown; sleeping for retry
    May  3 10:41:01 koffee-X406UAR sm-msp-queue[1254]: unable to qualify my own domain name (koffee-X406UAR) -- using short name
    May  3 10:49:53 koffee-X406UAR sendmail[2700]: My unqualified host name (koffee-X406UAR) unknown; sleeping for retry
    May  3 10:50:53 koffee-X406UAR sendmail[2700]: unable to qualify my own domain name (koffee-X406UAR) -- using short name
    May  3 10:50:53 koffee-X406UAR sendmail[2700]: x438orcM002700: from=www-data, size=410, class=0, nrcpts=0, msgid=<201905030850.x438orcM002700@koffee-X406UAR>, relay=www-data@localhost
    May  3 11:00:01 koffee-X406UAR sm-msp-queue[3554]: My unqualified host name (koffee-X406UAR) unknown; sleeping for retry
    May  3 11:01:01 koffee-X406UAR sm-msp-queue[3554]: unable to qualify my own domain name (koffee-X406UAR) -- using short name
    May  3 11:20:01 koffee-X406UAR sm-msp-queue[3952]: My unqualified host name (koffee-X406UAR) unknown; sleeping for retry
    May  3 11:21:01 koffee-X406UAR sm-msp-queue[3952]: unable to qualify my own domain name (koffee-X406UAR) -- using short name
    May  3 11:40:01 koffee-X406UAR sm-msp-queue[4384]: My unqualified host name (koffee-X406UAR) unknown; sleeping for retry
    May  3 11:41:01 koffee-X406UAR sm-msp-queue[4384]: unable to qualify my own domain name (koffee-X406UAR) -- using short name
    May  3 11:48:34 koffee-X406UAR sendmail[5128]: My unqualified host name (koffee-X406UAR) unknown; sleeping for retry
    May  3 11:49:34 koffee-X406UAR sendmail[5128]: unable to qualify my own domain name (koffee-X406UAR) -- using short name
    May  3 11:49:37 koffee-X406UAR sendmail[5128]: alias database /etc/mail/aliases rebuilt by koffee
    May  3 11:49:37 koffee-X406UAR sendmail[5128]: /etc/mail/aliases: 1 aliases, longest 4 bytes, 14 bytes total
    May  3 11:50:49 koffee-X406UAR sm-mta[1173]: restarting /usr/sbin/sendmail-mta due to signal
    May  3 11:50:49 koffee-X406UAR sm-mta[1173]: My unqualified host name (koffee-X406UAR) unknown; sleeping for retry
    May  3 11:51:49 koffee-X406UAR sm-mta[1173]: unable to qualify my own domain name (koffee-X406UAR) -- using short name
    May  3 11:51:49 koffee-X406UAR sm-mta[5217]: starting daemon (8.15.2): SMTP+queueing@00:10:00
    j'espère que ça t'éclaires un peu plus...

  7. #7
    Membre à l'essai
    Homme Profil pro
    Développeur Web
    Inscrit en
    Avril 2019
    Messages
    20
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 42
    Localisation : France, Haute Garonne (Midi Pyrénées)

    Informations professionnelles :
    Activité : Développeur Web

    Informations forums :
    Inscription : Avril 2019
    Messages : 20
    Points : 13
    Points
    13
    Par défaut
    et pour info, mon fichier /etc/hosts est comme ça :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    127.0.0.1       localhost
    127.0.1.1       koffee-X406UAR
    127.0.0.1       wordpress
    127.0.0.1       private
     
    # The following lines are desirable for IPv6 capable hosts
    ::1     ip6-localhost ip6-loopback
    fe00::0 ip6-localnet
    ff00::0 ip6-mcastprefix
    ff02::1 ip6-allnodes
    ff02::2 ip6-allrouters
    et mon fichier /etc/hostname est :
    Je pense qu'il faut que je rajoute qqes choses mais je ne sait pas trop quoi et je ne veux pas faire de co..... non plus...

  8. #8
    Membre à l'essai
    Homme Profil pro
    Développeur Web
    Inscrit en
    Avril 2019
    Messages
    20
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 42
    Localisation : France, Haute Garonne (Midi Pyrénées)

    Informations professionnelles :
    Activité : Développeur Web

    Informations forums :
    Inscription : Avril 2019
    Messages : 20
    Points : 13
    Points
    13
    Par défaut
    Je pense que j'avance un peu...

    Dans mon fichier mail.log j'ai ça maintenant :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    May  3 15:20:01 koffee-X406UAR sm-msp-queue[9889]: My unqualified host name (koffee-X406UAR) unknown; sleeping for retry
    May  3 15:21:01 koffee-X406UAR sm-msp-queue[9889]: unable to qualify my own domain name (koffee-X406UAR) -- using short name
    May  3 15:40:01 koffee-X406UAR sm-msp-queue[10473]: My unqualified host name (koffee-X406UAR) unknown; sleeping for retry
    May  3 15:41:01 koffee-X406UAR sm-msp-queue[10473]: unable to qualify my own domain name (koffee-X406UAR) -- using short name
    May  3 16:26:13 koffee-X406UAR sendmail[11862]: x43EQDN0011862: from=www-data, size=410, class=0, nrcpts=0, msgid=<201905031426.x43EQDN0011862@localhost.localdomain>, relay=www-data@localhost
    May  3 16:34:14 koffee-X406UAR sendmail[12045]: x43EYEdP012045: from=www-data, size=410, class=0, nrcpts=0, msgid=<201905031434.x43EYEdP012045@localhost.localdomain>, relay=www-data@localhost
    May  3 16:37:17 koffee-X406UAR sendmail[13018]: x43EbHj1013018: from=www-data, size=410, class=0, nrcpts=0, msgid=<201905031437.x43EbHj1013018@localhost.localdomain>, relay=www-data@localhost
    May  3 16:41:05 koffee-X406UAR sendmail[13187]: x43Ef5lZ013187: from=www-data, size=410, class=0, nrcpts=0, msgid=<201905031441.x43Ef5lZ013187@localhost.localdomain>, relay=www-data@localhost
    May  3 21:28:16 localhost msmtp: host=localhost tls=off auth=off from=koffee@localhost recipients=user@example.com errormsg='cannot connect to localhost, port 1025: Connexion refusée' exitcode=EX_TEMPFAIL
    May  3 21:56:29 localhost sendmail[7850]: alias database /etc/mail/aliases rebuilt by koffee
    May  3 21:56:29 localhost sendmail[7850]: /etc/mail/aliases: 1 aliases, longest 4 bytes, 14 bytes total
    May  3 21:56:29 localhost sm-mta[7950]: starting daemon (8.15.2): SMTP+queueing@00:10:00
    May  3 21:58:46 localhost sendmail[8042]: x43Jwkpj008042: from=www-data, size=410, class=0, nrcpts=0, msgid=<201905031958.x43Jwkpj008042@localhost.localdomain>, relay=www-data@localhost
    May  3 22:03:39 localhost sendmail[8147]: x43K3dKq008147: from=www-data, size=410, class=0, nrcpts=0, msgid=<201905032003.x43K3dKq008147@localhost.localdomain>, relay=www-data@localhost
    May  4 21:04:23 localhost sm-mta[1098]: starting daemon (8.15.2): SMTP+queueing@00:10:00
    May  4 22:12:06 localhost sendmail[5458]: x44KC6Y6005458: from=www-data, size=410, class=0, nrcpts=0, msgid=<201905042012.x44KC6Y6005458@localhost.localdomain>, relay=www-data@localhost
    (Est-ce que ça veut dire que c'est bien parti? )

    Et ça depuis que j'ai modifié mon fichier /etc/hosts comme ça :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    127.0.0.1       localhost localhost.localdomain koffee-X406UAR
    127.0.1.1       koffee-X406UAR
    127.0.0.1       wordpress
    127.0.0.1       private
     
    # The following lines are desirable for IPv6 capable hosts
    ::1     ip6-localhost ip6-loopback
    fe00::0 ip6-localnet
    ff00::0 ip6-mcastprefix
    ff02::1 ip6-allnodes
    ff02::2 ip6-allrouters
    Bon, par contre, quand je vais dans /var/mail je n'ai rien...

  9. #9
    Responsable Systèmes


    Homme Profil pro
    Gestion de parcs informatique
    Inscrit en
    Août 2011
    Messages
    17 437
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Paris (Île de France)

    Informations professionnelles :
    Activité : Gestion de parcs informatique
    Secteur : High Tech - Matériel informatique

    Informations forums :
    Inscription : Août 2011
    Messages : 17 437
    Points : 43 078
    Points
    43 078
    Par défaut
    Ton serveur est mal configuré :
    My unqualified host name (koffee-X406UAR) unknown; sleeping for retry
    Je sais pas si c'est bloquant.

    comme dit par Flodelarab
    Cela veut juste dire que le courrier est accepté pour la livraison. Cela ne veut pas dire que le courrier est livré.
    Il faut regarder dans la queue de sendmail :
    Et utilises plutôt postfix ou Exim.
    Ma page sur developpez.com : http://chrtophe.developpez.com/ (avec mes articles)
    Mon article sur le P2V, mon article sur le cloud
    Consultez nos FAQ : Windows, Linux, Virtualisation

  10. #10
    Membre à l'essai
    Homme Profil pro
    Développeur Web
    Inscrit en
    Avril 2019
    Messages
    20
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 42
    Localisation : France, Haute Garonne (Midi Pyrénées)

    Informations professionnelles :
    Activité : Développeur Web

    Informations forums :
    Inscription : Avril 2019
    Messages : 20
    Points : 13
    Points
    13
    Par défaut
    Citation Envoyé par chrtophe Voir le message
    Ton serveur est mal configuré :

    My unqualified host name (koffee-X406UAR) unknown; sleeping for retry

    Et quel est la bonne configuration ? Une piste ?

    Et depuis que j'ai changé /etc/hosts, j'ai ça dans mon mail.log :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    May  3 21:56:29 localhost sendmail[7850]: alias database /etc/mail/aliases rebuilt by koffee
    May  3 21:56:29 localhost sendmail[7850]: /etc/mail/aliases: 1 aliases, longest 4 bytes, 14 bytes total
    May  3 21:56:29 localhost sm-mta[7950]: starting daemon (8.15.2): SMTP+queueing@00:10:00
    May  3 21:58:46 localhost sendmail[8042]: x43Jwkpj008042: from=www-data, size=410, class=0, nrcpts=0, msgid=<201905031958.x43Jwkpj008042@localhost.localdomain>, relay=www-data@localhost
    May  3 22:03:39 localhost sendmail[8147]: x43K3dKq008147: from=www-data, size=410, class=0, nrcpts=0, msgid=<201905032003.x43K3dKq008147@localhost.localdomain>, relay=www-data@localhost
    May  4 21:04:23 localhost sm-mta[1098]: starting daemon (8.15.2): SMTP+queueing@00:10:00
    May  4 22:12:06 localhost sendmail[5458]: x44KC6Y6005458: from=www-data, size=410, class=0, nrcpts=0, msgid=<201905042012.x44

    Citation Envoyé par chrtophe Voir le message
    Il faut regarder dans la queue de sendmail :
    J'ai ça :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    MSP Queue status...
    /var/spool/mqueue-client is empty
                    Total requests: 0
    MTA Queue status...
    /var/spool/mqueue is empty
                    Total requests: 0

    Citation Envoyé par chrtophe Voir le message
    Et utilises plutôt postfix ou Exim.
    Beaucoup de monde me disent ça, pourquoi c'est mieux?

    Merci d'avance !

  11. #11
    Responsable Systèmes


    Homme Profil pro
    Gestion de parcs informatique
    Inscrit en
    Août 2011
    Messages
    17 437
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Paris (Île de France)

    Informations professionnelles :
    Activité : Gestion de parcs informatique
    Secteur : High Tech - Matériel informatique

    Informations forums :
    Inscription : Août 2011
    Messages : 17 437
    Points : 43 078
    Points
    43 078
    Par défaut
    c'est surtout plus répandu, donc tu trouves plus facilement de la doc.

    La queue étant vide, on va supposer que les mails sont partis. Essaye de tester avec une adresse genre free, et regardes dans les spams si tu vois le mail.
    Ma page sur developpez.com : http://chrtophe.developpez.com/ (avec mes articles)
    Mon article sur le P2V, mon article sur le cloud
    Consultez nos FAQ : Windows, Linux, Virtualisation

  12. #12
    Rédacteur/Modérateur
    Avatar de Winnt
    Homme Profil pro
    budget et contrôle de gestion
    Inscrit en
    Décembre 2006
    Messages
    1 978
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 56
    Localisation : France

    Informations professionnelles :
    Activité : budget et contrôle de gestion
    Secteur : Administration - Collectivité locale

    Informations forums :
    Inscription : Décembre 2006
    Messages : 1 978
    Points : 4 130
    Points
    4 130
    Par défaut
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    127.0.0.1       localhost localhost.localdomain koffee-X406UAR
    127.0.1.1       koffee-X406UAR
    Perso, j'essayerai de commenter la seconde ligne pour tester.
    Winnt
    Merci de lire les règles du forum LaTeX et Qu'est ce qu'un ECM ?.
    N'hésitez pas à parcourir la FAQ la réponse y est peut-être déjà.
    Pensez au bouton si votre problème est résolu.


    C'est en Linuxant qu'on devient .... geek
    Et c'est en LateXant qu'on devient flemmard
    Mon blog tout neuf.
    Articles : présentation de la distribution Gentoo, Les index sous LaTeX et leur personnalisation.

Discussions similaires

  1. [PHP5] tester fonction mail en local
    Par sandro11 dans le forum Langage
    Réponses: 0
    Dernier message: 24/12/2015, 17h10
  2. [FLASH MX] Problème flash et fonction mail() php
    Par proutcore dans le forum Flash
    Réponses: 7
    Dernier message: 21/05/2007, 12h21
  3. [Configuration] petit problème avec php.ini pour la fonction mail()
    Par momoh dans le forum EDI, CMS, Outils, Scripts et API
    Réponses: 2
    Dernier message: 06/04/2007, 01h39
  4. Réponses: 1
    Dernier message: 05/04/2006, 14h22
  5. [Configuration] CONFIG pour envoie de mail d'un serveur local
    Par i_shinji dans le forum EDI, CMS, Outils, Scripts et API
    Réponses: 2
    Dernier message: 14/03/2006, 13h39

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo