Python x Exchange 2013

FelipeSantosBRA 1 Reputation point


I work in the IT sector of a company in Brazil. I am supporting the Systems team in creating a Python script that performs the following functions:

1- Connection to an Exchange email account.

2- Read the messages in your inbox.

3- Analyze the collected data.

My part in this task is related to items 1 and 2.

This is the case:

a) An email account has been created for this project.

b) Connection to this email account using IMAP4 and POP3 works normally (without Outlook). But when performing an inbox search, it returns an error.

c) This error appears to be related to Exchange Server, which does not allow passwords to be sent unencrypted over the network. Source:

d) As we are deploying a Wildcard SSL certificate on the Exchange Server Standard 2013 server (latest build available), a script was run to connect to the email account using IMAPS and POP3S, but it did not work (protocol error).

e) As a last alternative, a script that uses the Exchange connection instead of IMAP4/IMAPS or POP3/POP3S was executed:

  • A script was attempted with AUTODISCOVER enabled (error in the validation process).
  • Then another with Exchange server information enabled (the connection was refused).

f) All the tests mentioned were carried out on the computer of the programmer responsible for the project, who is authenticated in the domain. This machine is also with a fixed IP and running Windows 11 Pro 22H2 (latest build available).

Finally, it was agreed that the programmer would seek help on the Python forums, while I would seek help here.

Has anyone here participated in a similar project (creating a Python script that connects to an Exchange email account, to read emails from the inbox and then process the data obtained) and had a similar problem? If so, how was it possible to resolve it?

I appreciate everyone's patience in reading my case.

Exchange Server
Exchange Server
A family of Microsoft client/server messaging and collaboration software.
809 questions
Windows Server
Windows Server
A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.
11,098 questions
Windows 11
Windows 11
A Microsoft operating system designed for productivity, creativity, and ease of use.
6,699 questions
{count} votes

1 answer

Sort by: Most helpful
  1. FelipeSantosBRA 1 Reputation point

    Hi, @Yuki Sun-MSFT ,

    It's done.

    0 comments No comments