I'd want to design import mail functionality for an email provider. The process is: user enters email and password for another service at my site and then site accesses another email provider and downloads messages from it via IMAP or POP3 over TLS/STARTTLS.
What security issues should be taken into account when designing such functionality? Can those emails have something that will make import process stuck? Do i need anything else besides antivirus?