here is a description on how to fetch imap/pop3 through ssl, if thats what you're looking for.
If it's a need to setup a pop3/imap server which queries the users through ssl, then it's depending on which pop3/imap server you're running,
here is an example on setting up spop3 with qmail through ssl.