URL: https://linuxfr.org/forums/linux-general/posts/probl%C3%A8me-avec-sendmail-no-such-user-here Title: Problème avec Sendmail : No such user here Authors: Thomas Debesse Date: 2006年10月11日T13:09:03+02:00 Tags: Score: 0 Suite à mes déboires que l'on peut suivre là : [https://linuxfr.org/forums/21/19085.html](https://linuxfr.org/forums/21/19085.html) je suis allé un peu plus loin dans mes tests avec sendmail... Pour récapituler brièvement le pourquoi de ma recherche : À la base c'est un code php simple qui ne fonctionne pas comme on le voudrait : $Email="adressedetest@yahoo.fr"; mail($Email , "essai" , "test", "Content-type: text/plain\r\nFrom: " . $Email . "\r\n"); (je ne fais que m'envoyer un mail sur une adresse bidon). Ce script marche en cli en root, mais pas en cli en user ni en module apache (donc en user). le /var/log/maillog m'affiche ceci : Oct 11 11:57:49 machine sendmail[29914]: k9B9vnf0029914: to=adressedetest@yahoo.fr, ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30090, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (k9B9vntf029915 Message accepted for delivery) Oct 11 11:57:53 machine sendmail[29918]: k9B9vntf029915: to=<adressedetest@yahoo.fr>, delay=00:00:04, xdelay=00:00:04, mailer=esmtp, pri=120325, relay=mx1.mail.yahoo.com. [67.28.113.71], dsn=2.0.0, stat=Sent (ok dirdel) Oct 11 11:58:16 machine sendmail[29940]: k9B9wBtI029940: to=adressedetest@yahoo.fr, ctladdr=user (517/512), delay=00:00:05, xdelay=00:00:00, mailer=relay, pri=30090, relay=[127.0.0.1] [127.0.0.1], dsn=5.6.0, stat=Data format error Oct 11 11:58:37 machine sendmail[29947]: k9B9wW9D029947: to=adressedetest@yahoo.fr, ctladdr=user@lesite.com (48/48), delay=00:00:05, xdelay=00:00:05, mailer=relay, pri=30090, relay=[127.0.0.1] [127.0.0.1], dsn=5.6.0, stat=Data format error avec à 11h57 un message envoyé par le script, en cli en root, ensuite à 11h58:16 et 11h58:37 les deux echecs, en cli en user, puis en module en user. Au vu de mes recherches, le message "stat=Data format error" du maillog semble être très vague, ce n'est pas spécifique à une erreur particulière, ce qui ne m'avance pas beaucoup malheureusement. J'ai donc tenté d'envoyer un mail avec la commande unix "mail", en root, puis en user, avec le paramêtre -v pour qu'il en dise un maximum : en root : # mail -v -s test adressedetest@yahoo.fr essai Cc: adressedetest@yahoo.fr... Connecting to [127.0.0.1] via relay... 220 machine.domaine.local ESMTP Sendmail 8.13.6/8.13.6; 2006年10月11日 12:31:06 +0200 >>> EHLO machine.domaine.local 250-machine.domaine.local Hello localhost.localdomain [127.0.0.1], pleased to meet you 250-ENHANCEDSTATUSCODES 250-PIPELINING 250-8BITMIME 250-SIZE 250-DSN 250-ETRN 250-DELIVERBY 250 HELP >>> MAIL From:<root@machine.domaine.local> SIZE=44 250 2.1.0 <root@machine.domaine.local>... Sender ok >>> RCPT To:<adressedetest@yahoo.fr> >>> DATA 250 2.1.5 <adressedetest@yahoo.fr>... Recipient ok 354 Enter mail, end with "." on a line by itself >>> . 250 2.0.0 k9BAV6WO031410 Message accepted for delivery adressedetest@yahoo.fr... Sent (k9BAV6WO031410 Message accepted for delivery) Closing connection to [127.0.0.1] >>> QUIT 221 2.0.0 machine.domaine.local closing connection Puis en user : # su user $ mail -v -s test adressedetest@yahoo.fr essai Cc: adressedetest@yahoo.fr... Connecting to [127.0.0.1] via relay... 220 machine.domaine.local ESMTP Sendmail 8.13.6/8.13.6; 2006年10月11日 12:39:56 +0200 >>> EHLO machine.domaine.local 250-machine.domaine.local Hello localhost.localdomain [127.0.0.1], pleased to meet you 250-ENHANCEDSTATUSCODES 250-PIPELINING 250-8BITMIME 250-SIZE 250-DSN 250-ETRN 250-DELIVERBY 250 HELP >>> MAIL From:<user@machine.domaine.local> SIZE=44 553 5.3.0 <user@machine.domaine.local>... No such user here user... Using cached ESMTP connection to [127.0.0.1] via relay... >>> RSET 250 2.0.0 Reset state >>> MAIL From:<> SIZE=1068 250 2.1.0 <>... Sender ok >>> RCPT To:<user@machine.domaine.local> >>> DATA 553 5.3.0 <user@machine.domaine.local>... No such user here 503 5.0.0 Need RCPT (recipient) >>> RSET 250 2.0.0 Reset state >>> RSET 250 2.0.0 Reset state postmaster... Using cached ESMTP connection to [127.0.0.1] via relay... >>> MAIL From:<> SIZE=2092 250 2.1.0 <>... Sender ok >>> RCPT To:<postmaster@machine.domaine.local> >>> DATA 553 5.3.0 <postmaster@machine.domaine.local>... No such user here 503 5.0.0 Need RCPT (recipient) >>> RSET 250 2.0.0 Reset state Closing connection to [127.0.0.1] >>> QUIT 221 2.0.0 machine.domaine.local closing connection Voilà, en user, ça me renvoie "no such user here", et ça échoue. :/ Au moins, je suis content mon problème est beaucoup plus cerné ! Alors si il y a des experts en sendmail qui passeraient dans le coin, je vous remercie !

AltStyle によって変換されたページ (->オリジナル) /