Can I use the JavaMail APIs to implement a mail server?
The JavaMail APIs were not intended to help you implement a mail server. Nonetheless, some of the utility classes, such as the MIME message parsing classes, might be of use to you. In general you’ll find that the JavaMail API errs on the side of “simple” instead of “robust”. That’s appropriate for a mail client, but a mail server would likely make different tradeoffs.