SMTP
De DokuWikiExperience.
Smtp est le protocole d'échange pour les e-mails. Il ne faut surtout pas confondre SMTP et POP/IMAP (qui ne font que relever le courrier)
Envoyer un mail en telnet
voici un échange avec un serveur de mail :
$ telnet localhost 25 Trying 127.0.0.1... Connected to localhost Escape character is '^]'. 220 yanntech.net ESMTP Postfix (Debian GNU/Linux) ehlo itsatest 250-osmose.yanntech.net 250-PIPELINING 250-SIZE 10240000 250-VRFY 250-ETRN 250 8BITMIME mail from:<yanntech_ _@_ _yanntech.net> 250 Ok rcpt to:<postmaster _@_ yanntech.net> 250 Ok data 354 End data with <CR><LF>.<CR><LF> Subject: Ceci est un test de mail From:yanntech@yanntech.net To:postmaster_ @ _yanntech.net Coucou, ceci est un test d'e-mail en telnet Un point fin du mail, deux un point .. . 250 Ok: queued as 72A57D0E17 quit 221 Bye Connection closed by foreign host.
*E-mail brouillé pour la lutte contre le spam
On voit parfaitement l'échange, on commence par se connecter sur le port SMTP standart (25) on dit "bonjour" au serveur, on décline notre identité (notre e-mail), ensuite le destinataire, et on fini par la primitive "data" qui indique le début du mail.