-
Notifications
You must be signed in to change notification settings - Fork 9
/
imap
33 lines (26 loc) · 841 Bytes
/
imap
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
Surada bu konuda guzel bir kaynak var: http://www.stat.ufl.edu/system/mailtesting.html
Su da imap komutlarini guzel anlatmis: http://bobpeers.com/technical/telnet_imap
nc imap.domain.com 143
1 LOGIN username password
12 LIST "" *
2 SELECT INBOX
04 STATUS INBOX (MESSAGES)
3 CLOSE
4 LOGOUT
#imtest from cyrus-clients-2.2 package:
# normal login
imtest -m login imap.domain.com -a [email protected]
# test using tls
imtest -m login -t "" imap.domain.com -a [email protected]
openssl s_client -connect imap.domain.com:143 -starttls imap
openssl s_client -connect imap.domain.com:443 -showcerts
#usr/bin/env python
import imaplib
import getpass
M = imaplib.IMAP4("imap.domain.com")
M.capabilities
M.login("[email protected]", getpass.getpass())
typ, data = M.search(None, 'ALL')
print M.fetch(1, '(RFC822)')[1][0][1]
M.close()
M.logout()