0
INDEX
Comment tester un serveur POP3 ?
iMac-de-Germain-:~ germain$ telnet mail.testdomaine.fr 110 Trying 212.43.245.241... Connected to mail.testdomaine.fr. Escape character is '^]'. +OK host1.germain.co.uk Cyrus POP3 v2.3.8-OS X Server 10.5: 9C31 server ready <328828657.1234107880@host1.germain.co.uk> user test@testdomaine.fr +OK Name is a valid mailbox pass votre_mot_de_passe +OK Mailbox locked and ready list +OK scan listing follows 1 908 . retr 1 +OK Message follows Return-Path: <germain@germain.net> Received: from host1.germain.co.uk ([unix socket]) by host1.germain.co.uk (Cyrus v2.3.8-OS X Server 10.5: 9C31) with LMTPA; Sun, 08 Feb 2009 16:43:02 +0100 X-Sieve: CMU Sieve 2.3 Received: from [192.168.0.1] (mon75-17-88-175-208-34.fbx.proxad.net [88.175.208.34]) by host1.germain.co.uk (Postfix) with ESMTP id 461B6E1437 for <test@testdomaine.fr>; Sun, 8 Feb 2009 16:43:02 +0100 (CET) Message-Id: <82BC4299-AE0E-4A58-B3F8-2033C0A1B2D3@germain.net> From: Germain germain <germain@germain.net> To: test@testdomaine.fr Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v930.3) Subject: Test Date: Sun, 8 Feb 2009 16:43:01 +0100 X-Mailer: Apple Mail (2.930.3) Germain germain +33 (0) 6 777 66 285 germain@germain.net . quit +OK Connection closed by foreign host.
À retenir :
– se connecter avec user
– s’identifier avec pass – liste des mails avec list
– lecture d’un mail avec retr <id_du_mail>
Comment tester un serveur IMAP4 ?
iMac-de-Germain-:~ germain$ telnet mail.testdomaine.fr 143 Trying 212.43.245.241... Connected to mail.testdomaine.fr. Escape character is '^]'. * OK [CAPABILITY IMAP4 IMAP4rev1 LITERAL+ ID STARTTLS AUTH=PLAIN AUTH=LOGIN AUTH=CRAM-MD5] host1.germain.co.uk Cyrus IMAP4 v2.3.8-OS X Server 10.5: 9C31 server ready test login test@testdomaine.fr monpasswd test OK [CAPABILITY IMAP4 IMAP4rev1 LITERAL+ ID LOGINDISABLED AUTH=PLAIN AUTH=LOGIN AUTH=CRAM-MD5 ACL RIGHTS=kxte QUOTA MAILBOX-REFERRALS NAMESPACE UIDPLUS NO_ATOMIC_RENAME UNSELECT CHILDREN MULTIAPPEND BINARY SORT SORT=MODSEQ THREAD=ORDEREDSUBJECT THREAD=REFERENCES ANNOTATEMORE CATENATE CONDSTORE IDLE URLAUTH] user logged in test select inbox * FLAGS (\Answered \Flagged \Draft \Deleted \Seen $NotJunk $Junk) * OK [PERMANENTFLAGS (\Answered \Flagged \Draft \Deleted \Seen $NotJunk $Junk \*)] * 1 EXISTS * 0 RECENT * OK [UIDVALIDITY 1234024423] * OK [UIDNEXT 2] * OK [NOMODSEQ] Sorry, modsequences have not been enabled on this mailbox * OK [URLMECH INTERNAL] test OK [READ-WRITE] Completed test fetch 1 body * 1 FETCH (BODY ("TEXT" "PLAIN" ("CHARSET" "US-ASCII" "FORMAT" "flowed") NIL NIL "7BIT" 86 8)) test OK Completed (0.000 sec) test fetch 2 body[text] * 2 FETCH (FLAGS (\Recent \Seen) BODY[TEXT] {86} Germain germain +33 (0) 6 777 66 285 germain@germain.net ) test OK Completed (0.000 sec) test close test OK Completed test logout * BYE LOGOUT received test OK Completed Connection closed by foreign host.
À retenir :
– se connecter avec login
– naviguer avec select (exemple : inbox)
– lire un mail avec fetch body[text]
– le flag peut être n’importe quoi, dans mon exemple c’est test.
Comment tester un serveur SMTP ?
iMac-de-Germain-:~ germain$ telnet mail.testdomaine.fr 25 Trying 212.43.245.241... Connected to mail.testdomaine.fr. Escape character is '^]'. 220 host1.germain.co.uk ESMTP Postfix EHLO testdomaine.fr 250-host1.germain.co.uk 250-PIPELINING 250-SIZE 15728640 250-VRFY 250-AUTH LOGIN PLAIN CRAM-MD5 250-ETRN 250-ENHANCEDSTATUSCODES 250-8BITMIME 250 DSN MAIL FROM:test@testdomaine.fr 250 2.1.0 Ok RCPT TO:germain@gmail.com 554 5.7.1 <germain@gmail.com>: Relay access denied RCPT TO:germain@germain.net 450 4.2.0 <germain@germain.net>: Recipient address rejected: Greylisted, see https://postgrey.schweikert.ch/help/germain.net.html
5 minutes plus tard…
RCPT TO:germain@germain.net 250 2.1.5 Ok DATA 354 End data with <CR><LF>.<CR><LF> Subject: un petit test Voila un test . 250 2.0.0 Ok: queued as 40125E147C QUIT 221 2.0.0 Bye Connection closed by foreign host.
À retenir :
– signaler sa présence avec EHLO
– initialiser un mail avec MAIL FROM:<expéditeur>
– router un mail avec RCPT TO:
– remplir le mail avec DATA :
– le sujet se met avec Subject: puis passer 2 lignes
– le corps se met avec normalement mails à la fin passez 2 lignes et taper un point. C’est le point qui déclenche l’envoi du mail.
DATE 08 Fév 2009