Quick Python Script to assist with troubleshooting email

nickn

Well-Known Member
PartnerNOC
Jun 15, 2003
619
1
168
Hi folks -

Wrote this script last night mostly for myself, but thought others here might appreciate it.

Basically it allows you to quickly test a client's POP3/IMAP/IMAP-SSL account and verify whether the username/password work, and if it does, how much mail is in the account.

Good initial test with client's email accounts when they claim it doesn't work, if it doesn't work, it'll give you the error message returned.

Script can be found here:
http://aviator.elinuxservers.com/mailtroubleshoot.py

Quick example:

Code:
[email protected]/ttyp0(~)%] ./mailtroubleshoot.py

                        ---------------------------------------
                        POP3 / IMAP / IMAP-SSL Troubleshooter.
                        ---------------------------------------

Please enter protocol you wish to check :imap
Please enter server: httpme.com
Please enter account: nick+httpme.com
Please enter password:


Attempting to login using username nick+httpme.com ....
LOGIN failed
or, if it works...

Code:
 [[email protected]/ttyp0(~)%] ./mailtroubleshoot.py 
  
                         --------------------------------------- 
                         POP3 / IMAP / IMAP-SSL Troubleshooter. 
                         --------------------------------------- 
  
 Please enter protocol you wish to check :imap-ssl 
 Please enter server: httpme.com 
 Please enter account: nick+httpme.com 
 Please enter password: 
  
  
 Attempting to login using username nick+httpme.com .... 
 Login successful to httpme.com using IMAP-SSL 
 This mailbox has 2448 messages, totaling 37393268 bytes.
Mostly written to help me learn the pop3 and imap libs of Python, but should be useful regardless.
 
Last edited: