I have postfix and mailx installed on a CentOS 7 server. I am able to send and receive email from the command line using the mailx command. I am also able to read email in each user's inbox using nano /var/spool/mail/username.

My impression is that mailx and postfix only support smtp. The problem is that I am trying to use another API (JavaMail) to read a user's inbox, and all the examples use imap or pop3 protocols. Is there a way that I can get postfix/mailx to be accessible via imap? Or do I have to also install dovecot before I can use imap to retrieve inbox contents?


Postfix is an SMTP server (and client, since it does relaying) and local delivery agent (to directories, mailbox files, etc).

mailx is a client for a variety of mail protocols and can access local mail in a variety of storage formats.

But if you want to be able to access your mail with the IMAP protocol (a communication protocol designed specifically for working with remote mailboxes, and which is hard to beat for this purpose) you will need an IMAP server. You can choose from Dovecot, Cyrus, Courier, or some others. I've had the best experience with Cyrus, but the configuration is a mess compared to the much easier Dovecot.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.