Simple Mail Transfer protocol
Transcription
Simple Mail Transfer protocol
SMTP Simple Mail Transfer protocol Arnaud Fabre Vocabulaire ● MUA (Mail User Agent) – ● MTA (Mail Transfert Agent) – ● client de messagerie (Outlook Express, Thunderbird,...) Agent de transfert (serveurs smtp) MDA (Mail Delivery Agent) – Agent de récupération (pop3, imap) Arnaud Fabre IETF RFC ● Internet Engineering Task Force ● Request for Comments ● SMTP ● – http://tools.ietf.org/html/rfc821 (old) – http://tools.ietf.org/html/rfc2821 (new) Service Extensions – http://tools.ietf.org/html/rfc1869 Arnaud Fabre Principe ● Transfert de fichiers entre serveurs de messageries [email protected] smtp.cretin.fr SMTP SMTP [email protected] POP3 smtp.debile.com pop.debile.com Arnaud Fabre Simplicité ● ● Spécifier – Destinataire – Expéditeur – Corps du message On peut utiliser telnet sur le port 25 pour se connecter à un serveur smtp. Arnaud Fabre Poster « à la main » HELO machine.toto.com MAIL FROM:<[email protected]> RCPT TO:<[email protected]> DATA Subjet: Courrier From: [email protected] To: [email protected] Je suis le facteur ! . QUIT Arnaud Fabre Inconvénients ● Pas de sécurité – ● Solution : chiffrer son message Ne transmet que du texte (ASCII) – Solution : encoder les autres documents en texte ● ● ● Types MIME Base64 HTML Arnaud Fabre MTA ● Sendmail ● Qmail ● Postfix ● Exim ● Microsoft Exchange Server Arnaud Fabre Postfix sous Ubuntu ● Installer – ● Configurer – ● apt-get install postfix /etc/postfix/main.cf Gérer – /etc/init.d/postfix {start|stop|restart|reload|flush| check|abort|force-reload} Arnaud Fabre Configuration postfix ● myhostname : nom d'hôte du serveur ● mydomain : nom de domaine (monsite.com) ● mydestination : adresses gérées par postfix ● mynetworks : adresse IP du réseau ● relayhost : la passerelle – ● smtp.free.fr par exemple home_mailbox : répertoire de courrier Arnaud Fabre Exercice ● Installer postfix sur une machine Linux et configurer le pour envoyer et recevoir des courriers pour un hypothétique nom de domaine : mondomaine.com Arnaud Fabre