Trying to retrieve mail information using pop3 from "fake smtp server"

148 Views Asked by At

I have 3 virtual machines:

xxx.xxx.xxx.44 (server)
xxx.xxx.xxx.55 (send mails)
xxx.xxx.xxx.66 (read mails)

For the server, I have this line:

python3 -m smtpd -c DebuggingServer -n  XXX.XXX.XXX.44:25

to host the "smtp server"

When i use xxx.xxx.xxx.55 to send an email using a python code, I am able to get this result:

---------- MESSAGE FOLLOWS ----------

b'From:[email protected]'

b'To:[email protected]'

b'Date:03/01/2023 15:45:06'

b'Subject:lol'

b'X-Peer: XXX.XXX.XXX.55'

b''

b'lol'

------------ END MESSAGE ------------

I was wondering if it is possible to retrieve this "message" using pop/imap on xxx.xxx.xxx.66

It would also help if anyone knows where this "message" is stored on the email server so that I could use poplib to retrieve this message.

0

There are 0 best solutions below