Retrieve Information From IMAP/POP3 Servers
curl -k 'imaps://$IP' --user $user:$password -vopenssl s_client -connect $IP:pop3s
#Once connected, we can use the protocol commands
USER $username #Set user
PASS $password #Set password and log in
LIST #List of mails available
RETR $index #Get the content of an email
DELE $index #Delete an email from the server
RSET #Reset deletion marks
QUIT #Close connectionopenssl s_client -connect $IP:imaps
#Once connected, we can use the protocol commands
A001 LOGIN $username $password #Log in to server
A002 LIST "" "*" #List all elements in the server
A003 SELECT $servername #Select a mail server to interact with
A005 FETCH $index BODY[] #Get the content of an email
EXPUNGE #Delete or mark emails
QUIT #Close connectionLast updated